Thinking out loud a bit:
- When the workflow does retry itself with different arguments or “at most once” is the desired behavior.
- When invoking multiple times isn’t the end of the world e.g. sending an email/SMS
Thinking out loud a bit:
Great question. Maybe it’s implicit but if the Activity does not mutate state it can be run an infinite number of times.
Even if the activity failed the error handling logic in the workflow is guaranteed to run
The problem is that “at most once” means that activity might not run but return a timeout. In this case, the workflow can:
In some rare cases, losing is OK for some nonessential notification activities.
Idempotency is usually preferred.
Another activity sometimes is used mostly to cleanup possible state changes from the failed activity.