Merge branch 'dev' into featrue/test_featrue

This commit is contained in:
wangli 2023-07-10 20:38:01 +08:00
commit ff3dcc2f71

View File

@ -38,9 +38,15 @@ public class BpmTransformUtil {
bpmnModel.addProcess(process);
process.setId(model.getKey());
StartEvent startEvent = createStartEvent();
process.addFlowElement(startEvent);
process.setName(model.getName());
StartEvent startEvent = new StartEvent();
if (BpmFlowNodeType.NODE_STARTER.getType().equals(bpmnJson.getType())) {
startEvent.setId(bpmnJson.getId());
startEvent.setInitiator("applyUserId");
process.addFlowElement(startEvent);
}
List<SequenceFlow> sequenceFlows = Lists.newArrayList();
Map<String,BpmJsonNode> childNodeMap=new HashMap<>();
// JSONObject jsonObject = (JSONObject) JSONObject.toJSON(bpmnJson);
@ -53,7 +59,7 @@ public class BpmTransformUtil {
String lastNode = null;
try {
lastNode = create(startEvent.getId(), bpmnJson,process, bpmnModel, sequenceFlows, childNodeMap);
lastNode = create(startEvent.getId(), bpmnJson.getChildren(),process, bpmnModel, sequenceFlows, childNodeMap);
} catch (Exception e) {
e.printStackTrace();
throw new WorkflowEngineException(BPM_META_DATA_FORMAT_ERROR);
@ -114,13 +120,6 @@ public class BpmTransformUtil {
return flow;
}
public static StartEvent createStartEvent() {
StartEvent startEvent = new StartEvent();
startEvent.setId(START_EVENT_ID);
startEvent.setInitiator("applyUserId");
return startEvent;
}
public static EndEvent createEndEvent() {
EndEvent endEvent = new EndEvent();
endEvent.setId(END_EVENT_ID);