Spring batch Spring批处理决策器未执行
我有一个简单的分批工作与决策者。decider实现只将错误添加到列表中,然后返回原始的FlowExecutionStatus。解析器失败并退出,而不是失败并执行决策步骤。为什么?(我知道没有调用ErrorHandler,因为输出从不包括记录器输出“in decider asdf”。还有什么是调试xml的最佳方法?如果您能提供任何帮助,我们将不胜感激Spring batch Spring批处理决策器未执行,spring-batch,Spring Batch,我有一个简单的分批工作与决策者。decider实现只将错误添加到列表中,然后返回原始的FlowExecutionStatus。解析器失败并退出,而不是失败并执行决策步骤。为什么?(我知道没有调用ErrorHandler,因为输出从不包括记录器输出“in decider asdf”。还有什么是调试xml的最佳方法?如果您能提供任何帮助,我们将不胜感激 <batch:job id="testDecider"> <batch:step id="testme" next="te
<batch:job id="testDecider">
<batch:step id="testme" next="testerDecider">
<batch:tasklet>
<batch:chunk reader="csvSLHistoryFileReader"
processor="stationSendStatsCalculator" skip-limit="5" commit-interval="10"
writer="noOpWriter">
<batch:skippable-exception-classes>
<batch:include class="org.springframework.batch.item.file.FlatFileParseException"/>
</batch:skippable-exception-classes>
</batch:chunk>
</batch:tasklet>
</batch:step>
<!-- this commit interval can be 1 because all the input from previous step will be completed and this step will
iterate through the created to-from list -->
<batch:step id="doTallies">
<batch:tasklet>
<batch:chunk reader="stationSendCountsListReader"
processor="passThrough" commit-interval="100000"
writer="stationSubtotalsFileWriter">
</batch:chunk>
</batch:tasklet>
</batch:step>
<batch:step id="tryTesterInput">
<batch:tasklet>
<batch:chunk reader="csvSSHistoryFileReader"
processor="stationSendStatsCalculator" skip-limit="5" commit-interval="10"
writer="noOpWriter">
<batch:skippable-exception-classes>
<batch:include class="org.springframework.batch.item.file.FlatFileParseException"/>
</batch:skippable-exception-classes>
</batch:chunk>
</batch:tasklet>
</batch:step>
<batch:decision id="testerDecider" decider="errorHandler">
<batch:next on="FAILED" to="tryTesterInput"/>
<batch:next on="*" to="doTallies"/>
</batch:decision>
</batch:job>
例外情况非常明显,因为已达到跳过限制5,这将导致步骤失败。当对下一个状态使用
表示法时,仅当步骤成功完成时才执行下一个状态(在您的案例中没有)。因此,您的决定不会执行。相反,您需要使用较长的版本来定义要去哪里:
<step>
...
<next on="FAILED" to="testerDecider"/>
</step>
...
例外情况非常明显,因为已达到跳过限制5,这将导致步骤失败。当使用
符号表示下一个状态时,仅当步骤成功完成时才执行下一个状态(在您的案例中没有)。因此,您的决定不会执行。相反,您需要使用较长的版本来定义要去哪里:
<step>
...
<next on="FAILED" to="testerDecider"/>
</step>
...
例外情况非常明显,因为已达到跳过限制5,这将导致步骤失败。当使用
符号表示下一个状态时,仅当步骤成功完成时才执行下一个状态(在您的案例中没有)。因此,您的决定不会执行。相反,您需要使用较长的版本来定义要去哪里:
<step>
...
<next on="FAILED" to="testerDecider"/>
</step>
...
例外情况非常明显,因为已达到跳过限制5,这将导致步骤失败。当使用
符号表示下一个状态时,仅当步骤成功完成时才执行下一个状态(在您的案例中没有)。因此,您的决定不会执行。相反,您需要使用较长的版本来定义要去哪里:
<step>
...
<next on="FAILED" to="testerDecider"/>
</step>
...
非常感谢您的大力支持!这(当然)奏效了。非常感谢您的大力支持!这(当然)奏效了。非常感谢您的大力支持!这(当然)奏效了。非常感谢您的大力支持!这(当然)奏效了。