public RuntimeStepExecution(StepThreadExecutionEntity stepThreadExecution) { this.stepName = stepThreadExecution.getStepName(); this.batchStatus = stepThreadExecution.getBatchStatus(); this.exitStatus = stepThreadExecution.getExitStatus(); this.stepCtx = new StepContextImpl(this); this.startTime = stepThreadExecution.getStartTime(); this.endTime = stepThreadExecution.getEndTime(); this.internalStepThreadExecutionId = stepThreadExecution.getStepExecutionId(); this.topLevelStepExecutionId = stepThreadExecution.getTopLevelStepExecution().getStepExecutionId(); this.persistentUserDataObject = initializePersistentUserDataObject(stepThreadExecution.getPersistentUserDataBytes()); //Adding the metrics which we want to be rolled back this.tranCoordinatedMetricTypes.add(MetricImpl.MetricType.COMMIT_COUNT); this.tranCoordinatedMetricTypes.add(MetricImpl.MetricType.READ_COUNT); this.tranCoordinatedMetricTypes.add(MetricImpl.MetricType.FILTER_COUNT); this.tranCoordinatedMetricTypes.add(MetricImpl.MetricType.WRITE_COUNT); }
private IExecutionElementController getNextElementController() { IExecutionElementController elementController =null; if (currentExecutionElement instanceof Decision) { Decision decision = (Decision)currentExecutionElement; elementController = ExecutionElementControllerFactory.getDecisionController(jobExecution, decision); DecisionControllerImpl decisionController = (DecisionControllerImpl)elementController; decisionController.setPreviousStepExecutions(previousExecutionElement, previousElementController); } else if (currentExecutionElement instanceof Flow) { Flow flow = (Flow)currentExecutionElement; elementController = ExecutionElementControllerFactory.getFlowController(jobExecution, flow, rootJobExecutionId); } else if (currentExecutionElement instanceof Split) { Split split = (Split)currentExecutionElement; elementController = ExecutionElementControllerFactory.getSplitController(jobExecution, split, rootJobExecutionId); } else if (currentExecutionElement instanceof Step) { Step step = (Step)currentExecutionElement; StepContextImpl stepContext = new StepContextImpl(step.getId()); elementController = ExecutionElementControllerFactory.getStepController(jobExecution, step, stepContext, rootJobExecutionId, analyzerQueue); } logger.fine("Next execution element controller = " + elementController); return elementController; }
private IExecutionElementController getNextElementController() { IExecutionElementController elementController =null; if (currentExecutionElement instanceof Decision) { Decision decision = (Decision)currentExecutionElement; elementController = ExecutionElementControllerFactory.getDecisionController(jobExecution, decision); DecisionControllerImpl decisionController = (DecisionControllerImpl)elementController; decisionController.setPreviousStepExecutions(previousExecutionElement, previousElementController); } else if (currentExecutionElement instanceof Flow) { Flow flow = (Flow)currentExecutionElement; elementController = ExecutionElementControllerFactory.getFlowController(jobExecution, flow, rootJobExecutionId); } else if (currentExecutionElement instanceof Split) { Split split = (Split)currentExecutionElement; elementController = ExecutionElementControllerFactory.getSplitController(jobExecution, split, rootJobExecutionId); } else if (currentExecutionElement instanceof Step) { Step step = (Step)currentExecutionElement; StepContextImpl stepContext = new StepContextImpl(step.getId()); elementController = ExecutionElementControllerFactory.getStepController(jobExecution, step, stepContext, rootJobExecutionId, analyzerQueue); } logger.fine("Next execution element controller = " + elementController); return elementController; }
stepCtx = new StepContextImpl(null); runtimeStepCtx = mockery.mock(RuntimeStepExecution.class); jobCtx = new JobContextImpl(null);