@Override protected void invokePostStepArtifacts() { // Invoke the subjob analayzer at the end of each step if (this.analyzerProxy != null) { this.analyzerProxy.analyzeExitStatus(stepStatus.getExitStatus()); } // Call @AfterStep on all the step listeners if (stepListeners != null) { for (StepListenerProxy listenerProxy : stepListeners) { listenerProxy.afterStep(); } } }
@Override protected void invokePreStepArtifacts() { if (stepListeners == null) { return; } /** * Inject job flow, split, and step contexts into partition artifacts like collectors and * listeners some of these contexts may be null */ if (this.collectorProxy != null) { this.collectorProxy.setJobContext(jobExecutionImpl.getJobContext()); this.collectorProxy.setSplitContext(splitContext); this.collectorProxy.setFlowContext(flowContext); this.collectorProxy.setStepContext(stepContext); } for (StepListenerProxy listenerProxy : stepListeners) { listenerProxy.setJobContext(jobExecutionImpl.getJobContext()); listenerProxy.setSplitContext(splitContext); listenerProxy.setFlowContext(flowContext); listenerProxy.setStepContext(stepContext); } // Call @BeforeStep on all the job listeners for (StepListenerProxy listenerProxy : stepListeners) { listenerProxy.beforeStep(); } // // ServicesManager.getInstance().setStepForThread(stepContext); }