| 8 | import java.util.List; |
| 9 | |
| 10 | public 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected