Skip to content

Commit

Permalink
fix fault tolerant enviroment missing (#14735)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8e64026)
  • Loading branch information
jieguangzhou authored and zhongjiajie committed Aug 30, 2023
1 parent c49d583 commit 8e4d022
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1292,10 +1292,13 @@ private void submitPostNode(Long parentNodeCode) throws StateEventHandleExceptio
Optional<TaskInstance> existTaskInstanceOptional = getTaskInstance(taskNodeObject.getCode());
if (existTaskInstanceOptional.isPresent()) {
TaskInstance existTaskInstance = existTaskInstanceOptional.get();
if (existTaskInstance.getState() == TaskExecutionStatus.RUNNING_EXECUTION
|| existTaskInstance.getState() == TaskExecutionStatus.DISPATCH) {
TaskExecutionStatus state = existTaskInstance.getState();
if (state == TaskExecutionStatus.RUNNING_EXECUTION
|| state == TaskExecutionStatus.DISPATCH
|| state == TaskExecutionStatus.SUBMITTED_SUCCESS) {
// try to take over task instance
if (tryToTakeOverTaskInstance(existTaskInstance)) {
if (state != TaskExecutionStatus.SUBMITTED_SUCCESS
&& tryToTakeOverTaskInstance(existTaskInstance)) {
log.info("Success take over task {}", existTaskInstance.getName());
continue;
} else {
Expand Down

0 comments on commit 8e4d022

Please sign in to comment.