/** * Delegate to the flow provided for the execution of the step. * * @see AbstractStep#doExecute(StepExecution) */ @Override protected void doExecute(StepExecution stepExecution) throws Exception { try { stepExecution.getExecutionContext().put(STEP_TYPE_KEY, this.getClass().getName()); StepHandler stepHandler = new SimpleStepHandler(getJobRepository(), stepExecution.getExecutionContext()); FlowExecutor executor = new JobFlowExecutor(getJobRepository(), stepHandler, stepExecution.getJobExecution()); executor.updateJobExecutionStatus(flow.start(executor).getStatus()); stepExecution.upgradeStatus(executor.getJobExecution().getStatus()); stepExecution.setExitStatus(executor.getJobExecution().getExitStatus()); } catch (FlowExecutionException e) { if (e.getCause() instanceof JobExecutionException) { throw (JobExecutionException) e.getCause(); } throw new JobExecutionException("Flow execution ended unexpectedly", e); } }
/** * Delegate to the flow provided for the execution of the step. * * @see AbstractStep#doExecute(StepExecution) */ @Override protected void doExecute(StepExecution stepExecution) throws Exception { try { stepExecution.getExecutionContext().put(STEP_TYPE_KEY, this.getClass().getName()); StepHandler stepHandler = new SimpleStepHandler(getJobRepository(), stepExecution.getExecutionContext()); FlowExecutor executor = new JobFlowExecutor(getJobRepository(), stepHandler, stepExecution.getJobExecution()); executor.updateJobExecutionStatus(flow.start(executor).getStatus()); stepExecution.upgradeStatus(executor.getJobExecution().getStatus()); stepExecution.setExitStatus(executor.getJobExecution().getExitStatus()); } catch (FlowExecutionException e) { if (e.getCause() instanceof JobExecutionException) { throw (JobExecutionException) e.getCause(); } throw new JobExecutionException("Flow execution ended unexpectedly", e); } }
/** * Delegate to the flow provided for the execution of the step. * * @see AbstractStep#doExecute(StepExecution) */ @Override protected void doExecute(StepExecution stepExecution) throws Exception { try { stepExecution.getExecutionContext().put(STEP_TYPE_KEY, this.getClass().getName()); StepHandler stepHandler = new SimpleStepHandler(getJobRepository(), stepExecution.getExecutionContext()); FlowExecutor executor = new JobFlowExecutor(getJobRepository(), stepHandler, stepExecution.getJobExecution()); executor.updateJobExecutionStatus(flow.start(executor).getStatus()); stepExecution.upgradeStatus(executor.getJobExecution().getStatus()); stepExecution.setExitStatus(executor.getJobExecution().getExitStatus()); } catch (FlowExecutionException e) { if (e.getCause() instanceof JobExecutionException) { throw (JobExecutionException) e.getCause(); } throw new JobExecutionException("Flow execution ended unexpectedly", e); } }
/** * Delegate to the flow provided for the execution of the step. * * @see AbstractStep#doExecute(StepExecution) */ @Override protected void doExecute(StepExecution stepExecution) throws Exception { try { StepHandler stepHandler = new SimpleStepHandler(getJobRepository(), stepExecution.getExecutionContext()); FlowExecutor executor = new JobFlowExecutor(getJobRepository(), stepHandler, stepExecution.getJobExecution()); executor.updateJobExecutionStatus(flow.start(executor).getStatus()); stepExecution.upgradeStatus(executor.getJobExecution().getStatus()); stepExecution.setExitStatus(executor.getJobExecution().getExitStatus()); } catch (FlowExecutionException e) { if (e.getCause() instanceof JobExecutionException) { throw (JobExecutionException) e.getCause(); } throw new JobExecutionException("Flow execution ended unexpectedly", e); } }
/** * Delegate to the flow provided for the execution of the step. * * @see AbstractStep#doExecute(StepExecution) */ @Override protected void doExecute(StepExecution stepExecution) throws Exception { try { StepHandler stepHandler = new SimpleStepHandler(getJobRepository(), stepExecution.getExecutionContext()); FlowExecutor executor = new JobFlowExecutor(getJobRepository(), stepHandler, stepExecution.getJobExecution()); executor.updateJobExecutionStatus(flow.start(executor).getStatus()); stepExecution.upgradeStatus(executor.getJobExecution().getStatus()); stepExecution.setExitStatus(executor.getJobExecution().getExitStatus()); } catch (FlowExecutionException e) { if (e.getCause() instanceof JobExecutionException) { throw (JobExecutionException) e.getCause(); } throw new JobExecutionException("Flow execution ended unexpectedly", e); } }