I have an activity which attempts a payment (not idempotent) and I want to limit the automatic retry to one so I have max retry at 1.
If I want to retry the payment manually I tried to reset the workflow (while retaining the history) but it tells me that it has already reached the max number of attempts.
I am not able to easily reproduce this error but should I have just used “–type=LastContinuedAsNew” option if I want to reattempt?
It looks like this will retry the workflow, programatically. Is that different than the CLI/UI options because when I retried there I still ran into the max retry limit.
If this is different, is there a way to do this using the UI/CLI to get around the max retry limit when running it manually?
Reset is not intended for normal business logic. It is a mechanism to deal with bugs, etc.
Coding the interaction into the workflow logic is the recommended approach. I don’t understand the issue with the max retry limit. You said that you set attempts to 1.
I don’t understand what “retry limit” means. Temporal doesn’t have such a concept.
The interceptor just executes the same activity again when a signal is received. BTW you can implement this logic in the workflow directly if you don’t want to make it generic through an interceptor.