Our application makes API calls. We use a workflow to prepare the request, and process the response. And an activity to make the API call.
In some cases, the API will return 200 but It may say that the intended action couldn’t be completed for XYZ reason.
Once the activity is completed, the workflow will review the response. As the intended action coulnd’t be completed, this is a failure from Business perspective even though we got HTTP 200.
Currently, we are throwing a non retryable exception to fail the workflow, so that the workflow status reflects the business status which is failure in this case.
- What are the downsides of failing a workflow to have the workflow status reflect business status ?
- Is there a better way to fail a workflow other than by throwing a non retryable exception? I