MCPcopy Create free account
hub / github.com/L1yp/van-app / FlowableUtil

Class FlowableUtil

src/main/java/com/l1yp/util/FlowableUtil.java:10–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8import java.util.List;
9
10public class FlowableUtil {
11
12 public static String readFormKeyByProcessDefinitionId(String processDefinitionId) {
13 org.flowable.bpmn.model.Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
14 if (process == null) {
15 return null;
16 }
17 FlowElement initialFlowElement = process.getInitialFlowElement();
18 if (initialFlowElement instanceof StartEvent) {
19
20 StartEvent startEvent = (StartEvent) initialFlowElement;
21 return startEvent.getFormKey();
22 }
23 return null;
24 }
25
26 public static StartEvent readStartEventByProcessDefinitionId(String processDefinitionId) {
27 org.flowable.bpmn.model.Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
28 if (process == null) {
29 return null;
30 }
31 FlowElement initialFlowElement = process.getInitialFlowElement();
32 if (initialFlowElement instanceof StartEvent) {
33 return (StartEvent) initialFlowElement;
34 }
35 return null;
36 }
37
38}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected