perf(模型工具类): 优化模型工具获取开始节点方法。
This commit is contained in:
@@ -44,8 +44,11 @@ public class ModelUtils {
|
||||
*/
|
||||
public static StartEvent getStartEvent(BpmnModel model) {
|
||||
Process process = model.getMainProcess();
|
||||
Collection<FlowElement> flowElements = process.getFlowElements();
|
||||
return getStartEvent(flowElements);
|
||||
FlowElement startElement = process.getInitialFlowElement();
|
||||
if (startElement instanceof StartEvent) {
|
||||
return (StartEvent) startElement;
|
||||
}
|
||||
return getStartEvent(process.getFlowElements());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user