How to trigger activity retry without throwing an exception to fail it?

Use Case : We connect to external endpoints. There are two steps.

  1. First call to external endpoint to place request.
  2. 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?

Hi @Vikas_NS, check out this post - Activity retries without exception
which has a similar question that Maxim responded to. Hope it helps!