11.flowable流程实例跟踪流程1.演⽰
2、代码
transmate
public byte[]createImage(String processInstanceId){
//1.获取当前的流程实例去痘食疗
ProcessInstance processInstance = ateProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
String processDefinitionId = null;
List<String> activeActivityIds =new ArrayList<>();
List<String> highLightedFlows =new ArrayList<>();
//2.获取所有的历史轨迹线对象
List<HistoricActivityInstance> historicSquenceFlows = ateHistoricActivityInstanceQuery()
.processInstanceId(processInstanceId).activityType(BpmnXMLConstants.ELEMENT_SEQUENCE_FLOW).list();
historicSquenceFlows.forEach(historicActivityInstance -> highLightedFlows.ActivityId()));
耻辱的意思//3. 获取流程定义id和⾼亮的节点id
小学英语手抄报内容if(processInstance != null){
//3.1. 正在运⾏的流程实例
processDefinitionId = ProcessDefinitionId();
activeActivityIds = ActiveActivityIds(processInstanceId);
}el{
平面设计培训基地//3.2. 已经结束的流程实例
HistoricProcessInstance historicProcessInstance = ateHistoricProcessInstanceQuery().processInstanceId(processInstanceId).sing leResult();
marketplaceprocessDefinitionId = ProcessDefinitionId();
//3.3. 获取结束节点列表
List<HistoricActivityInstance> historicEnds = ateHistoricActivityInstanceQuery()
.processInstanceId(processInstanceId).activityType(BpmnXMLConstants.ELEMENT_EVENT_END).list();
List<String> finalActiveActivityIds = activeActivityIds;
historicEnds.forEach(historicActivityInstance -> finalActiveActivityIds.ActivityId()));
邱政政
gli}
//4. 获取bpmnModel对象
BpmnModel bpmnModel = BpmnModelByProcessDefId(processDefinitionId);
//5. ⽣成图⽚流
InputStream inputStream = ateDiagram(bpmnModel, activeActivityIds, highLightedFlows);
//6. 转化成byte便于⽹络传输
byte[] datas = adInputStream(inputStream,"image inputStream name");
return datas;
duke university
}
雅思口语预测