microsoft / durabletask-java

Java SDK for Durable Functions and the Durable Task Framework
MIT License
14 stars 7 forks source link

Support orchestration ID reuse policy #190

Open kaibocai opened 10 months ago

kaibocai commented 10 months ago

durabletask-go now support orchestration ID reuse policy, customer can reuse the orchestration ID with three different action ERROR, IGNORE, and TERMINATE with a target runtime status set.

ERROR- If there is an existing workflow then the scheduler throws an exception (this is the current behavior). IGNORE- If there is an existing workflow already scheduled, then the scheduler does nothing. TERMINATE- Terminates any existing workflows with the same instance ID and then schedules a new instance as one atomic action, similar to on-demand ContinueAsNew.

SDK needs to expose those options to customer orchestration ID reuse support.

Reference:

  1. https://github.com/microsoft/durabletask-go/pull/46