Activity External Call Idempotency

Hi,

I have a workflow with an activity with an external call to a third-party API. What I mean by third-party is that it is not in control of me and it is not idempotent. How can I make the activity method idempotent?

Thanks.

It is not possible. And it is not Temporal specific. If an API is not idempotent, it is impossible to guarantee that it will be called exactly once in the presence of timeouts.

Thanks.

Ok I think it is a common problem with external calls that are outside of our control. Maybe we can have a wrapper for them. I don’t mean in temporal but as an extension.

This is impossible in principle. No wrapper can solve this problem. The only solutions are making the external API idempotent or having another external API that allows checking a result to see if the failed request was applied.