List of usage examples for org.springframework.batch.core StepExecution toString
@Override
public String toString()
From source file:uk.ac.ebi.intact.editor.batch.admin.MailNotifierStepExecutionListener.java
public ExitStatus afterStep(StepExecution stepExecution) { SimpleMailMessage message = newSimpleMessage(); message.setSubject("[Editor_import] Finished step: " + stepExecution.getStepName() + " Exit status: " + stepExecution.getExitStatus().getExitCode()); message.setText(stepExecution.toString() + "\n" + stepExecution.getExecutionContext()); message.setText(stepExecution.toString() + "\n" + stepExecution.getSummary() + "\n" + stepExecution.getJobExecution()); message.setTo(stepExecution.getJobParameters().getString("email.recipient")); try {// w w w.j a v a 2 s . c o m mailSender.send(message); } catch (MailException e) { log.error("Impossible to send e-mail", e); } return stepExecution.getExitStatus(); }
From source file:org.springframework.batch.core.launch.support.SimpleJobOperator.java
@Override public Map<Long, String> getStepExecutionSummaries(long executionId) throws NoSuchJobExecutionException { JobExecution jobExecution = findExecutionById(executionId); Map<Long, String> map = new LinkedHashMap<Long, String>(); for (StepExecution stepExecution : jobExecution.getStepExecutions()) { map.put(stepExecution.getId(), stepExecution.toString()); }//from ww w.jav a 2 s. co m return map; }
From source file:uk.ac.ebi.intact.dataexchange.dbimporter.listener.MailNotifierStepExecutionListener.java
public ExitStatus afterStep(StepExecution stepExecution) { SimpleMailMessage message = newSimpleMessage(); message.setSubject("[IntAct_import] Finished step: " + stepExecution.getStepName() + " Exit status: " + stepExecution.getExitStatus().getExitCode()); message.setText(stepExecution.toString() + "\n" + stepExecution.getExecutionContext()); message.setText(stepExecution.toString() + "\n" + stepExecution.getSummary() + "\n" + stepExecution.getJobExecution()); message.setTo(stepExecution.getJobParameters().getString("email.recipient")); // try{ // mailSender.send(message); // }//from w ww. j av a2 s . co m // catch (MailException e){ // log.error("Impossible to send e-mail", e); // } return stepExecution.getExitStatus(); }
From source file:uk.ac.ebi.intact.dataexchange.psimi.exporter.listener.MailNotifierStepExecutionListener.java
public ExitStatus afterStep(StepExecution stepExecution) { SimpleMailMessage message = newSimpleMessage(); message.setSubject("[IntAct_export] Finished step: " + stepExecution.getStepName() + " Exit status: " + stepExecution.getExitStatus().getExitCode()); message.setText(stepExecution.toString() + "\n" + stepExecution.getExecutionContext()); message.setText(stepExecution.toString() + "\n" + stepExecution.getSummary() + "\n" + stepExecution.getJobExecution()); message.setTo(recipients);/*from w w w .j av a 2 s .c om*/ try { mailSender.send(message); } catch (MailException e) { log.error("Impossible to send e-mail", e); } return stepExecution.getExitStatus(); }