static ExecutionStatus updatedFlowExecutionStatus ( ExecutionStatus jobExecutionStatus , ExecutionStatus currentFlowExecutionStatus ) { // if any job failed or flow has failed then return failed status if ( currentFlowExecutionStatus == ExecutionStatus . FAILED || jobExecutionStatus == ExecutionStatus . FAILED ) { return ExecutionStatus . FAILED ; } // if any job is cancelled or flow has failed then return failed status if ( currentFlowExecutionStatus == ExecutionStatus . CANCELLED || jobExecutionStatus == ExecutionStatus . CANCELLED ) { return ExecutionStatus . CANCELLED ; } if ( currentFlowExecutionStatus == ExecutionStatus . RUNNING || jobExecutionStatus == ExecutionStatus . RUNNING || jobExecutionStatus == ExecutionStatus . ORCHESTRATED || jobExecutionStatus == ExecutionStatus . COMPILED ) { return ExecutionStatus . RUNNING ; } return currentFlowExecutionStatus ; }
Determines the new flow status based on the current flow status and new job status