JinyLeeChina commented on PR #10952:
URL: 
https://github.com/apache/dolphinscheduler/pull/10952#issuecomment-1205164147

   > Depending on a single task will also have this bug, please fix it
   Can refer to
   `    private DependResult getDependTaskResult(ProcessInstance 
processInstance, long taskCode, DateInterval dateInterval) {
           TaskInstance taskInstance = 
processService.findLastTaskInstanceInterval(taskCode, dateInterval);
           if (taskInstance == null) {
               TaskDefinition taskDefinition = 
processService.findTaskDefinitionByCode(taskCode);
               if (taskDefinition == null) {
                   logger.error("Cannot find the task definition, something 
error, taskCode: {}", taskCode);
                   return DependResult.FAILED;
               }
               if (taskDefinition.getFlag() == Flag.NO) {
                   logger.warn("Cannot find the task instance, but the task is 
forbidden, so dependent success, taskCode: {}, taskName: {}", taskCode, 
taskDefinition.getName());
                   return DependResult.SUCCESS;
               }
               if (!processInstance.getState().typeIsFinished()) {
                   logger.info("Wait for the dependent workflow to complete, 
taskCode:{}, processInstanceId:{}, processInstance state:{}",
                           taskCode, processInstance.getId(), 
processInstance.getState());
                   return DependResult.WAITING;
               }
               logger.warn("Cannot find the task in the process instance when 
the ProcessInstance is finish, taskCode: {}, taskName: {}", taskCode, 
taskDefinition.getName());
               return DependResult.FAILED;
           } else {
               logger.info("The running task, taskId:{}, taskCode:{}, 
taskName:{}", taskInstance.getId(), taskInstance.getTaskCode(), 
taskInstance.getName());
               return getDependResultByState(taskInstance.getState());
           }
       }`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to