-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
for: backport-to-5.1.xIssues that will be back-ported to the 5.1.x lineIssues that will be back-ported to the 5.1.x linehas: minimal-exampleBug reports that provide a minimal complete reproducible exampleBug reports that provide a minimal complete reproducible examplein: coretype: bug
Milestone
Description
Chris Haas opened BATCH-2315 and commented
In our jobs we use the following construct to conditionally stop a job based on a property passed into the job:
<decision id="decisionId" decider="decider">
<stop on="NEEDS_FINALIZATION" restart="placeAccounts"/>
<next on="*" to="placeAccounts"/>
</decision>
In Spring Batch 2.1, "placeAccounts" is executed when the job is restarted. In Spring Batch 3, the decision is re-executed, which of course means the job immediately stops again.
In 3.0.1, the job's flow has stateTransitions for the decision look like
StateTransition: [state=placementImport.placementFinalizationDecision, pattern=*, next=placementImport.placeAccounts],
StateTransition: [state=placementImport.placementFinalizationDecision, pattern=NEEDS_FINALIZATION, next=placementImport.stop60],
StateTransition: [state=placementImport.stop60, pattern=*, next=null],
but in 2.1, they look like:
StateTransition: [state=placementImport.placementFinalizationDecision, pattern=*, next=placementImport.placeAccounts],
StateTransition: [state=placementImport.placementFinalizationDecision, pattern=NEEDS_FINALIZATION, next=placementImport.stop60],
StateTransition: [state=placementImport.stop60, pattern=*, next=placementImport.placeAccounts],
Notice that the next element on stop60 is blank, which is probably the cause of the problem.
Affects: 3.0.1
2 votes, 3 watchers
Metadata
Metadata
Assignees
Labels
for: backport-to-5.1.xIssues that will be back-ported to the 5.1.x lineIssues that will be back-ported to the 5.1.x linehas: minimal-exampleBug reports that provide a minimal complete reproducible exampleBug reports that provide a minimal complete reproducible examplein: coretype: bug