|
|
@@ -46,4 +46,23 @@ public class StartNode extends AbstractWorkflowNode {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ protected void postExecute(ExecutionContext context, ExecutionResult result){
|
|
|
+ super.postExecute(context, result);
|
|
|
+ CompanyAiWorkflowExec exec = companyAiWorkflowExecMapper.selectByWorkflowInstanceId(context.getWorkflowInstanceId());
|
|
|
+ List<CompanyWorkflowEdge> edges = companyWorkflowEdgeMapper.selectListByWorkflowIdAndNodeKey(exec.getWorkflowId(), nodeKey);
|
|
|
+ this.runNextNode(context,edges.get(0));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 运行下一个节点
|
|
|
+ * @param context
|
|
|
+ * @param edge
|
|
|
+ */
|
|
|
+ private void runNextNode(ExecutionContext context, CompanyWorkflowEdge edge){
|
|
|
+ ExecutionContext nextContext = context.clone();
|
|
|
+ nextContext.setCurrentNodeKey(edge.getTargetNodeKey());
|
|
|
+ super.execPointNextNode(nextContext);
|
|
|
+ super.execute(nextContext);
|
|
|
+ }
|
|
|
}
|