# Ensure Exclusive Execution: Among Concurrent Workflows with the same ID, run only the latest Workflow and terminate others

**URL:** <https://community.temporal.io/t/ensure-exclusive-execution-among-concurrent-workflows-with-the-same-id-run-only-the-latest-workflow-and-terminate-others/11499>\
**Category:** Community Support\
**Tags:** java-sdk, general-impl\
**Created:** [March 25, 2024, 10:57pm UTC](https://community.temporal.io/t/ensure-exclusive-execution-among-concurrent-workflows-with-the-same-id-run-only-the-latest-workflow-and-terminate-others/11499 "2024-03-25T22:57:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonomixd](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sonomixd](https://community.temporal.io/u/sonomixd)\
**Post date:** [March 25, 2024, 10:57pm UTC](https://community.temporal.io/t/ensure-exclusive-execution-among-concurrent-workflows-with-the-same-id-run-only-the-latest-workflow-and-terminate-others/11499/1 "2024-03-25T22:57:29Z")

</div>

I have a situation where my application can invoke Concurrent Workflows with the same ID. I would like to check which one is the most recent Workflow and keep it running, and terminate all the other Workflows with the same Workflow ID

---

<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:** [March 25, 2024, 11:20pm UTC](https://community.temporal.io/t/ensure-exclusive-execution-among-concurrent-workflows-with-the-same-id-run-only-the-latest-workflow-and-terminate-others/11499/2 "2024-03-25T23:20:02Z")

</div>

Temporal doesn’t support running concurrent workflows with the same ID at all. Any attempt to start a duplicated workflow will be rejected. You can choose to connect to an already running workflow.

You can specify an option (see WorkflowIdReuseOption.TERMINATE) to start a new workflow terminating an already-running one atomically.
