on 08-09-2018 10:43 AM
Hi everyone!
We currently have "known issues" with our tax calculator third party due to timeouts or the server being down so as part of the order-process we need to add retries (3-5) before failing the process altogether but I was not able to find a way to state that in the XML file so the idea would be something like this:
<action id="calculateTAX" bean="calculateTAXbean">
<transition name="OK" to="successful"/>
<transition name="NOK" to="checkAction"/>
</action>
<action id="checkAction" bean="checkActionBean">
<transition name="OK" to="successful"/>
<transition name="NOK" to="calculateTAX"/> <!-- 3-5 times only! Otherwise, fail the process -->
</action>
The "manual" way to achieve this would be to add as many actions as retry attempts I need but I was wondering if there's a better way to achieve this?
An additional way to handle this would be to have the code for calculateTAX and checkAction in the same bean but it might be more invasive that way.
Thanks in advance!
See the doc on retry mechanism
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fernandez,
in your ActionBean you have to throw an exception:
throw new RetryLaterException();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fernandez,
To get around this problem you may try with Hystrix or take a look into SpringRetry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.