我必须根据decider的响应执行一个tasklet。下面的代码片段。
COMLPETED场景运作良好。但是,FAILED场景无效。有什么建议。感谢
public FlowExecutionStatus decide(JobExecution jobExecution,
StepExecution stepExecution)
{
LOGGER.info("Entering Decider");
if(stepExecution.getExitStatus().equals(ExitStatus.FAILED))
{
LOGGER.info("Exit Status Failed");
return FlowExecutionStatus.FAILED;
}
return FlowExecutionStatus.COMPLETED;
// TODO Auto-generated method stub
}
<batch:decision decider="fileCopyDecider" id="fileCopyDecider">
<batch:next on="FAILED" to="FailureFolder"/>
<batch:next on="COMPLETED" to="SuccessFolder"/>
</batch:decision>
<batch:step id ="SuccessFolder">
<batch:tasklet ref="filecopyTaskletOnSuccess"></batch:tasklet>
</batch:step>
<batch:step id ="FailureFolder">
<batch:tasklet ref="filecopyTaskletOnFailure"></batch:tasklet>
</batch:step>