Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow reuse policy docs confusing #2280

Open
amcurative opened this issue Aug 10, 2023 · 0 comments
Open

Workflow reuse policy docs confusing #2280

amcurative opened this issue Aug 10, 2023 · 0 comments

Comments

@amcurative
Copy link

Is your feature request related to a problem? Please describe.

Docs are a bit confusing and contradictory on the workflow id reuse policy

On this page https://docs.temporal.io/workflows#workflow-id-reuse-policy it says:

The Workflow Id Reuse Policy can have one of the following values:

Allow Duplicate: The Workflow Execution is allowed to exist regardless of the Closed status of a previous Workflow Execution with the same Workflow Id. This is the default policy, if one is not specified. Use this when it is OK to have a Workflow Execution with the same Workflow Id as a previous, but now Closed, Workflow Execution.

Its contradictory because it says "The Workflow Execution is allowed to exist regardless of the Closed status of a previous Workflow Execution" which means closed status does not matter but then later it says "Use this when it is OK to have a Workflow Execution with the same Workflow Id as a previous, but now Closed, Workflow Execution." which means it does care about Closed.

Digging I found this post: https://community.temporal.io/t/execute-a-workflow-multi-times-with-the-same-workflowid/6031/3 where someone says

WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE is the default behavior, the term “Allow duplicate” can be a bit confusing, it allows you to reuse the workflowId when there is no other workflow running with the same workflowId.

So I take that to mean that with this policy, if there is a current execution, it won't start another one with the same id. Only if all existing runs have closed out and there is no active running workflow with this id, it will execute.

please see enums package - go.temporal.io/api/enums/v1 - Go Packages 4

Describe the solution you'd like

Update the docs to reflect the correct behavior

Describe alternatives you've considered

None

Additional context
Add any other context or screenshots about the feature request here.

@yiminc yiminc transferred this issue from temporalio/temporal Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant