# WorkflowIdReusePolicy question and potentially bug or documentation error

**URL:** <https://community.temporal.io/t/workflowidreusepolicy-question-and-potentially-bug-or-documentation-error/972>\
**Category:** Community Support\
**Created:** [November 12, 2020, 8:37pm UTC](https://community.temporal.io/t/workflowidreusepolicy-question-and-potentially-bug-or-documentation-error/972 "2020-11-12T20:37:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gordon\_Sun](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/gordon_sun/32/82_2.png) [@Gordon\_Sun](https://community.temporal.io/u/Gordon_Sun)\
**Post date:** [November 12, 2020, 8:37pm UTC](https://community.temporal.io/t/workflowidreusepolicy-question-and-potentially-bug-or-documentation-error/972/1 "2020-11-12T20:37:31Z")

</div>

First of all, this pages says The default is `AllowDuplicateFailedOnly`

> **[Workflows | Temporal](https://docs.temporal.io/docs/workflows/#id-uniqueness)**
>
> Temporal core abstraction is a fault-oblivious stateful Workflow. The state of the Workflow code, including local variables and threads it creates, is immune to process and Temporal service failures.

But when I print out the default it is “null”  
System.out.println("Default option is: " + options.getWorkflowIdReusePolicy());

And the result is I can start workflow execution with the same workflow id. So either it’s a bug or a documentation error

My other question is this: this option is set when the client start the execution and what if the client forgot to properly set it? Should it be defined on the workflow itself so no client can mess it up and for example re run the same successful executions?

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [November 13, 2020, 12:28am UTC](https://community.temporal.io/t/workflowidreusepolicy-question-and-potentially-bug-or-documentation-error/972/2 "2020-11-13T00:28:21Z")

</div>

It is documentation error. I reported it and we will fix it. The default is `AllowDuplicate`.

> My other question is this: this option is set when the client start the execution and what if the client forgot to properly set it? Should it be defined on the workflow itself so no client can mess it up and for example re run the same successful executions?

This is an interesting idea. Would you file an issue to get this considered as a feature request?

---

<div class="post-metadata">

**Author:** ![Gordon\_Sun](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/gordon_sun/32/82_2.png) [@Gordon\_Sun](https://community.temporal.io/u/Gordon_Sun)\
**Post date:** [November 13, 2020, 6:10pm UTC](https://community.temporal.io/t/workflowidreusepolicy-question-and-potentially-bug-or-documentation-error/972/3 "2020-11-13T18:10:50Z")

</div>

> [@Mechanism to control WorkflowIdReusePolicy at the Workflow definition/implementation](https://community.temporal.io/t/mechanism-to-control-workflowidreusepolicy-at-the-workflow-definition-implementation/988):
>
> Maxim said to create a feature request for this [https://community.temporal.io/t/workflowidreusepolicy-question-and-potentially-bug-or-documentation-error/972](https://community.temporal.io/t/workflowidreusepolicy-question-and-potentially-bug-or-documentation-error/972) Right now, this policy is set by the client before start the workflow execution. This means different client can use different policy. It might be useful to have a mechanism to give the option to lock this policy at the workflow definition/implementation level, so no client can mess it up. Maybe have it on WorkflowServiceStubsOptions
