Unverified Commit 21eb6f70 authored by bao liang's avatar bao liang Committed by GitHub
Browse files

Merge pull request #338 from lenboo/branch-1.0.2

 add tolerance tasks when start failure task
parents 298fc6f1 6ea71e1e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -588,10 +588,12 @@ public class ProcessDao extends AbstractBaseDao {
            case START_FAILURE_TASK_PROCESS:
                // find failed tasks and init these tasks
                List<Integer> failedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.FAILURE);
                List<Integer> toleranceList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.NEED_FAULT_TOLERANCE);
                List<Integer> killedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL);
                cmdParam.remove(Constants.CMDPARAM_RECOVERY_START_NODE_STRING);

                failedList.addAll(killedList);
                failedList.addAll(toleranceList);
                for(Integer taskId : failedList){
                    initTaskInstance(this.findTaskInstanceById(taskId));
                }