卫生间的爱11.flowable流程实例跟踪流程1.演⽰
淘气包马小跳书
2、代码
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();
processDefinitionId = ProcessDefinitionId();
//3.3. 获取结束节点列表
List<HistoricActivityInstance> historicEnds = ateHistoricActivityInstanceQuery()
.processInstanceId(processInstanceId).activityType(BpmnXMLConstants.ELEMENT_EVENT_END).list();
List<String> finalActiveActivityIds = activeActivityIds;儿童白斑
historicEnds.forEach(historicActivityInstance -> finalActiveActivityIds.ActivityId()));
}
//4. 获取bpmnModel对象
BpmnModel bpmnModel = BpmnModelByProcessDefId(processDefinitionId);
//5. ⽣成图⽚流
InputStream inputStream = ateDiagram(bpmnModel, activeActivityIds, highLightedFlows);
//6. 转化成byte便于⽹络传输
byte[] datas = adInputStream(inputStream,"image inputStream name");
return datas;
}
长征经过的省份