Use Case : We connect to external endpoints. There are two steps.
- First call to external endpoint to place request.
- Sebequent calls to external endpoint to check the request status (Repeat the call with 2min delay if the request status returned is ‘IN_PROGRESS’ and stop when the status returned is ‘COMPLETED’)
We have an 2 activites, one for the first step and the second one to check status.
Requirement : When we run the get Status Activity, and if the response returned from the external endpoint is ‘IN_PROGRESS’ how to retry the get Status Activity?
Currently we throw an exception to fail the activity if the status returned is 'IN_PROGRESS’and that will retrigger the activity based on retry policy.
Is there a better way to do it?