|
|
@ -286,8 +286,8 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> { |
|
|
|
// The state should always handle success except database error.
|
|
|
|
// The state should always handle success except database error.
|
|
|
|
checkProcessInstance(stateEvent); |
|
|
|
checkProcessInstance(stateEvent); |
|
|
|
|
|
|
|
|
|
|
|
StateEventHandler stateEventHandler |
|
|
|
StateEventHandler stateEventHandler = |
|
|
|
= StateEventHandlerManager.getStateEventHandler(stateEvent.getType()) |
|
|
|
StateEventHandlerManager.getStateEventHandler(stateEvent.getType()) |
|
|
|
.orElseThrow(() -> new StateEventHandleError("Cannot find handler for the given state event")); |
|
|
|
.orElseThrow(() -> new StateEventHandleError("Cannot find handler for the given state event")); |
|
|
|
if (stateEventHandler.handleStateEvent(this, stateEvent)) { |
|
|
|
if (stateEventHandler.handleStateEvent(this, stateEvent)) { |
|
|
|
this.stateEvents.remove(stateEvent); |
|
|
|
this.stateEvents.remove(stateEvent); |
|
|
@ -787,8 +787,8 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> { |
|
|
|
errorTaskMap.clear(); |
|
|
|
errorTaskMap.clear(); |
|
|
|
|
|
|
|
|
|
|
|
if (!isNewProcessInstance()) { |
|
|
|
if (!isNewProcessInstance()) { |
|
|
|
List<TaskInstance> validTaskInstanceList |
|
|
|
List<TaskInstance> validTaskInstanceList = |
|
|
|
= processService.findValidTaskListByProcessId(processInstance.getId()); |
|
|
|
processService.findValidTaskListByProcessId(processInstance.getId()); |
|
|
|
for (TaskInstance task : validTaskInstanceList) { |
|
|
|
for (TaskInstance task : validTaskInstanceList) { |
|
|
|
if (validTaskMap.containsKey(task.getTaskCode())) { |
|
|
|
if (validTaskMap.containsKey(task.getTaskCode())) { |
|
|
|
int oldTaskInstanceId = validTaskMap.get(task.getTaskCode()); |
|
|
|
int oldTaskInstanceId = validTaskMap.get(task.getTaskCode()); |
|
|
@ -1193,10 +1193,8 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void submitPostNode(String parentNodeCode) throws StateEventHandleException { |
|
|
|
private void submitPostNode(String parentNodeCode) throws StateEventHandleException { |
|
|
|
Set<String> submitTaskNodeList = DagHelper.parsePostNodes(parentNodeCode, |
|
|
|
Set<String> submitTaskNodeList = |
|
|
|
skipTaskNodeMap, |
|
|
|
DagHelper.parsePostNodes(parentNodeCode, skipTaskNodeMap, dag, getCompleteTaskInstanceMap()); |
|
|
|
dag, |
|
|
|
|
|
|
|
getCompleteTaskInstanceMap()); |
|
|
|
|
|
|
|
List<TaskInstance> taskInstances = new ArrayList<>(); |
|
|
|
List<TaskInstance> taskInstances = new ArrayList<>(); |
|
|
|
for (String taskNode : submitTaskNodeList) { |
|
|
|
for (String taskNode : submitTaskNodeList) { |
|
|
|
TaskNode taskNodeObject = dag.getNode(taskNode); |
|
|
|
TaskNode taskNodeObject = dag.getNode(taskNode); |
|
|
@ -1859,7 +1857,6 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> { |
|
|
|
return waitToRetryTaskInstanceMap; |
|
|
|
return waitToRetryTaskInstanceMap; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setGlobalParamIfCommanded(ProcessDefinition processDefinition, Map<String, String> cmdParam) { |
|
|
|
private void setGlobalParamIfCommanded(ProcessDefinition processDefinition, Map<String, String> cmdParam) { |
|
|
|
// get start params from command param
|
|
|
|
// get start params from command param
|
|
|
|
Map<String, String> startParamMap = new HashMap<>(); |
|
|
|
Map<String, String> startParamMap = new HashMap<>(); |
|
|
|