For example, suppose in the middle of a workflow I have two activities
ActivityA modifies the state of some external system, and
ActivityB can only run while this external system is in a compatible state. If
ActivityB fails and retries, it’s possible that the external system state is no longer compatible, and we need to retry both
ActivityB . What’s the recommended way to express this? I can see a few approaches:
- Merge the logic for
ActivityBinto a new
ActivityC, which can be retried as a whole.
- Create a child workflow containing
ActivityBand invoke this child from the original workflow.
- Some other approach? Maybe some custom “precondition failed” error from
ActivityBthat the workflow can use to retry starting at