Skip to content

Commit

Permalink
Set the workflow instance ready state to running in failover
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanwenjun committed Feb 6, 2024
1 parent 73a5a77 commit b812b8c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,14 @@ private Boolean checkCmdParam(Command command, Map<String, String> cmdParam) {
break;
case RECOVER_TOLERANCE_FAULT_PROCESS:
// recover tolerance fault process
// If the workflow instance is in ready state, we will change to running, this can avoid the workflow
// instance
// status is not correct with taskInsatnce status
if (processInstance.getState() == WorkflowExecutionStatus.READY_PAUSE
|| processInstance.getState() == WorkflowExecutionStatus.READY_STOP) {
// todo: If we handle the ready state in WorkflowExecuteRunnable then we can remove below code
processInstance.setState(WorkflowExecutionStatus.RUNNING_EXECUTION);
}
processInstance.setRecovery(Flag.YES);
processInstance.setRunTimes(runTime + 1);
runStatus = processInstance.getState();
Expand Down

0 comments on commit b812b8c

Please sign in to comment.