Java Code Examples for org.springframework.batch.core.ExitStatus#COMPLETED
The following examples show how to use
org.springframework.batch.core.ExitStatus#COMPLETED .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpringBatchFlowRunner.java From spring-cloud-release-tools with Apache License 2.0 | 5 votes |
private StepExecutionListener releaserListener(NamedArgumentsSupplier argsSupplier, ReleaserTask releaserTask) { return new StepExecutionListenerSupport() { @Override public ExitStatus afterStep(StepExecution stepExecution) { Arguments args = argsSupplier.get(); FlowRunner.Decision decision = afterTask(args.options, args.properties, releaserTask); if (decision == FlowRunner.Decision.ABORT) { return ExitStatus.FAILED; } ExecutionResult result = (ExecutionResult) stepExecution .getExecutionContext().get("result"); if (result == null || result.isSuccess()) { return stepExecution.getExitStatus(); } else if (result.isUnstable()) { return ExitStatus.COMPLETED .addExitDescription(BuildUnstableException.DESCRIPTION); } else if (result.isFailure()) { return ExitStatus.FAILED; } return ExitStatus.COMPLETED; } }; }
Example 2
Source File: FailedStepStepExecutionListener.java From batchers with Apache License 2.0 | 5 votes |
@Override public ExitStatus afterStep(StepExecution stepExecution) { if (someItemsGotSkippedDueToTaxWebServiceExceptions(stepExecution)) { //stepExecution.setStatus(BatchStatus.FAILED); return ExitStatus.FAILED; } return ExitStatus.COMPLETED; }
Example 3
Source File: LinesReader.java From tutorials with MIT License | 5 votes |
@Override public ExitStatus afterStep(StepExecution stepExecution) { fu.closeReader(); stepExecution .getJobExecution() .getExecutionContext() .put("lines", this.lines); logger.debug("Lines Reader ended."); return ExitStatus.COMPLETED; }
Example 4
Source File: LinesProcessor.java From tutorials with MIT License | 4 votes |
@Override public ExitStatus afterStep(StepExecution stepExecution) { logger.debug("Lines Processor ended."); return ExitStatus.COMPLETED; }
Example 5
Source File: LinesWriter.java From tutorials with MIT License | 4 votes |
@Override public ExitStatus afterStep(StepExecution stepExecution) { fu.closeWriter(); logger.debug("Lines Writer ended."); return ExitStatus.COMPLETED; }
Example 6
Source File: LineProcessor.java From tutorials with MIT License | 4 votes |
@Override public ExitStatus afterStep(StepExecution stepExecution) { logger.debug("Line Processor ended."); return ExitStatus.COMPLETED; }
Example 7
Source File: LineReader.java From tutorials with MIT License | 4 votes |
@Override public ExitStatus afterStep(StepExecution stepExecution) { fu.closeReader(); logger.debug("Line Reader ended."); return ExitStatus.COMPLETED; }
Example 8
Source File: LinesWriter.java From tutorials with MIT License | 4 votes |
@Override public ExitStatus afterStep(StepExecution stepExecution) { fu.closeWriter(); logger.debug("Line Writer ended."); return ExitStatus.COMPLETED; }