|
|
@ -1292,10 +1292,13 @@ public class WorkflowExecuteRunnable implements IWorkflowExecuteRunnable { |
|
|
|
Optional<TaskInstance> existTaskInstanceOptional = getTaskInstance(taskNodeObject.getCode()); |
|
|
|
Optional<TaskInstance> existTaskInstanceOptional = getTaskInstance(taskNodeObject.getCode()); |
|
|
|
if (existTaskInstanceOptional.isPresent()) { |
|
|
|
if (existTaskInstanceOptional.isPresent()) { |
|
|
|
TaskInstance existTaskInstance = existTaskInstanceOptional.get(); |
|
|
|
TaskInstance existTaskInstance = existTaskInstanceOptional.get(); |
|
|
|
if (existTaskInstance.getState() == TaskExecutionStatus.RUNNING_EXECUTION |
|
|
|
TaskExecutionStatus state = existTaskInstance.getState(); |
|
|
|
|| existTaskInstance.getState() == TaskExecutionStatus.DISPATCH) { |
|
|
|
if (state == TaskExecutionStatus.RUNNING_EXECUTION |
|
|
|
|
|
|
|
|| state == TaskExecutionStatus.DISPATCH |
|
|
|
|
|
|
|
|| state == TaskExecutionStatus.SUBMITTED_SUCCESS) { |
|
|
|
// try to take over task instance
|
|
|
|
// try to take over task instance
|
|
|
|
if (tryToTakeOverTaskInstance(existTaskInstance)) { |
|
|
|
if (state != TaskExecutionStatus.SUBMITTED_SUCCESS |
|
|
|
|
|
|
|
&& tryToTakeOverTaskInstance(existTaskInstance)) { |
|
|
|
log.info("Success take over task {}", existTaskInstance.getName()); |
|
|
|
log.info("Success take over task {}", existTaskInstance.getName()); |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|