private WorkflowStatusDataResult executeWFSectionNodeDispatch ( StepExecutionContext executionContext , int stepCount , List < StepExecutionResult > results , Map < String , Collection < StepExecutionResult > > failures , final Map < Integer , StepExecutionResult > stepFailures , IWorkflow flowsection , WFSharedContext sharedContext ) throws ExecutionServiceException , DispatcherException { logger . debug ( "Node dispatch for " + flowsection . getCommands ( ) . size ( ) + " steps" ) ; final DispatcherResult dispatch ; final WorkflowExecutionItem innerLoopItem = createInnerLoopItem ( flowsection ) ; final Dispatchable dispatchedWorkflow = new DispatchedWorkflow ( getFramework ( ) . getWorkflowExecutionService ( ) , innerLoopItem , stepCount , executionContext . getStepContext ( ) ) ; WFSharedContext dispatchSharedContext = new WFSharedContext ( sharedContext ) ; //dispatch the sequence of dispatched items to each node dispatch = getFramework ( ) . getExecutionService ( ) . dispatchToNodes ( ExecutionContextImpl . builder ( executionContext ) . sharedDataContext ( dispatchSharedContext ) . stepNumber ( stepCount ) . build ( ) , dispatchedWorkflow ) ; logger . debug ( "Node dispatch result: " + dispatch ) ; WFSharedContext resultData = extractWFDispatcherResult ( dispatch , results , failures , stepFailures , flowsection . getCommands ( ) . size ( ) , stepCount ) ; return workflowResult ( dispatch . isSuccess ( ) , null , ControlBehavior . Continue , resultData ) ; }
Execute a workflow section that should be dispatched across nodes