Payment Activity, Failed. Reset is hitting max retry limit

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?

Have you seen samples-java/core/src/main/java/io/temporal/samples/retryonsignalinterceptor at main · temporalio/samples-java · GitHub?

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.

In a scenario where its expensive to retry, I want it to automatically retry only once, so I set the max retry to 1.

If I then want to manually retry after the automatic one failed, I am hitting the retry limit.
Is the right approach then to add the interceptor?

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.