当前位置:网站首页>Flowable get the input stream of the current task process picture
Flowable get the input stream of the current task process picture
2022-06-24 02:01:00 【FHAdmin】
/**
* Gets the input stream of the current task process picture
* @param PROC_INST_ID_ Process instance ID
* @from fhadmin.cn
*/
public InputStream genProcessDiagram(String PROC_INST_ID_, String type){
/* Get the active node */
String processDefinitionId = "";
if (this.isFinished(PROC_INST_ID_)) { // If the process has ended , End node
HistoricProcessInstance pi = historyService.createHistoricProcessInstanceQuery().processInstanceId(PROC_INST_ID_).singleResult();
processDefinitionId=pi.getProcessDefinitionId();
} else { // If the process does not end , Then take the current active node
/* According to the process example ID Get the currently active ActivityId Collection */
ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(PROC_INST_ID_).singleResult();
processDefinitionId = pi.getProcessDefinitionId();
}
/* Get the active node object */
List<HistoricActivityInstance> highLightedActivitList = historyService.createHistoricActivityInstanceQuery().processInstanceId(PROC_INST_ID_).orderByHistoricActivityInstanceStartTime().asc().list();
List<String> highLightedActivitis = new ArrayList<String>(); // Node object ID
for(HistoricActivityInstance tempActivity : highLightedActivitList){
String activityId = tempActivity.getActivityId();
highLightedActivitis.add(activityId);
}
BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId); // Get the flow chart
ProcessEngineConfiguration engconf = processEngine.getProcessEngineConfiguration();
/* Get active connection object */
List<String> flows = new ArrayList<>(); // attachment ID
if("RU".equals(type)) {
List<ActivityInstance> highLightedFlowInstances = runtimeService.createActivityInstanceQuery().activityType(BpmnXMLConstants.ELEMENT_SEQUENCE_FLOW).processInstanceId(PROC_INST_ID_).list();
for(ActivityInstance ai : highLightedFlowInstances) {
flows.add(ai.getActivityId());
}
}else {
List<HistoricActivityInstance> highLightedFlowInstances = historyService.createHistoricActivityInstanceQuery().activityType(BpmnXMLConstants.ELEMENT_SEQUENCE_FLOW).processInstanceId(PROC_INST_ID_).list();
for(HistoricActivityInstance ha : highLightedFlowInstances) {
flows.add(ha.getActivityId());
}
}
ProcessDiagramGenerator diagramGenerator = engconf.getProcessDiagramGenerator();
InputStream in = diagramGenerator.generateDiagram(bpmnModel, "png", highLightedActivitis, flows, engconf.getActivityFontName(), engconf.getLabelFontName(), engconf.getAnnotationFontName(), engconf.getClassLoader(), 1.0, true);
return in;
}边栏推荐
- BIM model example
- Looking at the future development direction of industrial Internet from the transformation of circulation links of large building materials
- Tcapulusdb Jun · industry news collection
- LeetCode 120. Triangle minimum path sum
- Grp: implement GRP timeout interceptor
- [tcapulusdb knowledge base] how does tcapulusdb add a business cluster cluster?
- 163 mailbox login portal display, enterprise mailbox computer version login portal
- Implementing cos signature with postman
- How to set up a cloud desktop server? What are the advantages of cloud desktop?
- Five things programmers need to consider when developing with low code – thenewstack
猜你喜欢

If there are enumerations in the entity object, the conversion of enumerations can be carried out with @jsonvalue and @enumvalue annotations

Introduction to development model + test model

How to fill in and register e-mail, and open mass mailing software for free

layer 3 switch

It's too difficult for me. Ali has had 7 rounds of interviews (5 years of experience and won the offer of P7 post)

I, a 27 year old female programmer, feel that life is meaningless, not counting the accumulation fund deposit of 430000
![[SQL injection 13] referer injection foundation and Practice (based on burpseuite tool and sqli labs less19 target platform)](/img/b5/a8c4bbaf868dd20b7dc9449d2a4378.jpg)
[SQL injection 13] referer injection foundation and Practice (based on burpseuite tool and sqli labs less19 target platform)

Stm32g474 infrared receiving based on irtim peripherals

163 mailbox login portal display, enterprise mailbox computer version login portal
![[SQL injection 12] user agent injection foundation and Practice (based on burpsuite tool and sqli labs LESS18 target machine platform)](/img/c8/f6c2a62b8ab8fa88bd2b3d8f35f592.jpg)
[SQL injection 12] user agent injection foundation and Practice (based on burpsuite tool and sqli labs LESS18 target machine platform)
随机推荐
What does fortress server mean? What are the benefits of Fortress server installation
Global and Chinese micro focus X-ray tube industry competitiveness analysis and Investment Strategy Research Report 2022-2028
How to use voice synthesis? Can voice synthesis modify the voice?
How to do AI speech synthesis? How to download the voice of AI speech synthesis?
BIM model example
6、 Symbols and commands for numerical calculation of variables
Wechat open platform: OpenAPI, cloud development and basic management capability upgrade
Global and Chinese dealox industry development status and demand trend forecast report 2022-2028
Gin framework: adding tracing Middleware
[read together] Web penetration attack and defense practice (I)
[seckill] new / old users lock in the "explosive seckill zone" and snap up the one-year validity cloud function resource yyds for 63 yuan!
Gin framework: implementing timeout Middleware
[software cost consulting] information project bidding process and precautions
SAP WM displays the standard report lx09 of TR item
Clean system cache and free memory under Linux
LeetCode 931. Descent path min sum
8、 Pipeline pipeline construction project
Embedded hardware development tutorial -- Xilinx vivado HLS case (2)
How about speech synthesis? Is speech synthesis effective?
Tencent cloud database tdsql elite challenge --q & A