Skip to content

Commit 92cb47b

Browse files
authored
Doc: Add clarity to WorkflowIdReusePolicy for server behavior (#559)
<!-- Describe what has changed in this PR --> **What changed?** Add a little more clarity that this is the server/client behavior, not SDK behavior. <!-- Tell your future self why have you made these changes --> **Why?** There was feedback that this could use more clarity. temporalio/sdk-go#1857 <!-- Are there any breaking changes on binary or code level? --> No, comment only change
1 parent 3400eb6 commit 92cb47b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: openapi/openapiv2.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14752,7 +14752,7 @@
1475214752
"WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING"
1475314753
],
1475414754
"default": "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED",
14755-
"description": "Defines whether to allow re-using a workflow id from a previously *closed* workflow.\nIf the request is denied, a `WorkflowExecutionAlreadyStartedFailure` is returned.\n\nSee `WorkflowIdConflictPolicy` for handling workflow id duplication with a *running* workflow.\n\n - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: Allow starting a workflow execution using the same workflow id.\n - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: Allow starting a workflow execution using the same workflow id, only when the last\nexecution's final state is one of [terminated, cancelled, timed out, failed].\n - WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: Do not permit re-use of the workflow id for this workflow. Future start workflow requests\ncould potentially change the policy, allowing re-use of the workflow id.\n - WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: This option belongs in WorkflowIdConflictPolicy but is here for backwards compatibility.\nIf specified, it acts like ALLOW_DUPLICATE, but also the WorkflowId*Conflict*Policy on\nthe request is treated as WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING.\nIf no running workflow, then the behavior is the same as ALLOW_DUPLICATE."
14755+
"description": "Defines whether to allow re-using a workflow id from a previously *closed* workflow.\nIf the request is denied, the server returns a `WorkflowExecutionAlreadyStartedFailure` error.\n\nSee `WorkflowIdConflictPolicy` for handling workflow id duplication with a *running* workflow.\n\n - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: Allow starting a workflow execution using the same workflow id.\n - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: Allow starting a workflow execution using the same workflow id, only when the last\nexecution's final state is one of [terminated, cancelled, timed out, failed].\n - WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: Do not permit re-use of the workflow id for this workflow. Future start workflow requests\ncould potentially change the policy, allowing re-use of the workflow id.\n - WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: This option belongs in WorkflowIdConflictPolicy but is here for backwards compatibility.\nIf specified, it acts like ALLOW_DUPLICATE, but also the WorkflowId*Conflict*Policy on\nthe request is treated as WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING.\nIf no running workflow, then the behavior is the same as ALLOW_DUPLICATE."
1475614756
},
1475714757
"v1WorkflowPropertiesModifiedEventAttributes": {
1475814758
"type": "object",

Diff for: temporal/api/enums/v1/workflow.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ option ruby_package = "Temporalio::Api::Enums::V1";
3232
option csharp_namespace = "Temporalio.Api.Enums.V1";
3333

3434
// Defines whether to allow re-using a workflow id from a previously *closed* workflow.
35-
// If the request is denied, a `WorkflowExecutionAlreadyStartedFailure` is returned.
35+
// If the request is denied, the server returns a `WorkflowExecutionAlreadyStartedFailure` error.
3636
//
3737
// See `WorkflowIdConflictPolicy` for handling workflow id duplication with a *running* workflow.
3838
enum WorkflowIdReusePolicy {

0 commit comments

Comments
 (0)