-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of Transition Elements Still Does Not completely adhere to documentation #3996
Comments
Thank you for opening this issue. We do not exclude that this could be a bug in Spring Batch. However, we would like to validate that with a minimal complete verifiable example. Could you please take some time to create a minimal example that reproduces the problem? To help you in reporting your issue, we have prepared a project template that you can use as a starting point. Please check the Issue Reporting Guidelines for more details about this. Thank you for your collaboration. |
Hi fmbenhassine, |
Thanks @chpasha for the sample. I easily got it running on my machine and can see the issue. After entering my own issue #4456 that @hpoettker helped me sort out I came back to this and suggested a fix with a PR. I was able to point your sample at my local Spring Batch build using this code and it should now have the expected behavior. There is also a new test Looking for feedback... |
Bug description
The original issue was fixed here #3638 but the the way the DefaultStateTransitionComparator works is stll different from what documentation says:
it states that
but the javadoc in comparator says
this looks wrong to me since foo* is more specific pattern then * so it should fire before. Consider situation where Step execution can return COMPLETED or COMPLETED_PARTIALLY (alongside other possible statuses) and those two completed states should lead to different flow then FAILED (or any other) but conditional flow
doesn't work as expected because * fires and leads to step2 even on exit statuses like COMPLETED or COMPLETED_PARTIALLY
Current workaround is to use ** instead of single * so that COMPLETED* is considered "more important"
Environment
Spring Batch version : 4.3.3,
Java version 11
Expected behavior
standalone * should be never first but always the last in the pipeline since it is a catchall pattern and any other pattern containing characters other than * is "more specific"
The text was updated successfully, but these errors were encountered: