Advertisement
richieriviere

Untitled

Aug 10th, 2016
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1. @Component
  2. public class CustomStepExecutionListener implements StepExecutionListener {
  3.  
  4.     @Value("#{jobExecutionContext['" + ExecutionContextConstants.JOB_EXPORT_STAGING_PROMOTION_START_DATE_END_DATE_GROUPINGS +"']}")
  5.     List<PromotionStartDateEndDateGrouping> promotionStartDateEndDateGroupings;
  6.    
  7.     @Override
  8.     public void beforeStep(StepExecution stepExecution) {
  9.         System.err.println("StepExecutionListener - beforeStep");
  10.     }
  11.  
  12.    
  13.     @AfterStep
  14.     public ExitStatus afterStep(StepExecution stepExecution) {
  15.         System.err.println("StepExecutionListener - afterStep: " + promotionStartDateEndDateGroupings.size());
  16.        
  17.         return (!promotionStartDateEndDateGroupings.isEmpty() ? new ExitStatus("CONTINUE") : new ExitStatus("FINISHED"));
  18.     }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement