# Is there a way to terminate the current workflow execution from the workflowMethod

**URL:** https://community.temporal.io/t/is-there-a-way-to-terminate-the-current-workflow-execution-from-the-workflowmethod/4940
**Category:** Community Support
**Tags:** java-sdk
**Created:** [June 11, 2022, 1:00am UTC](https://community.temporal.io/t/is-there-a-way-to-terminate-the-current-workflow-execution-from-the-workflowmethod/4940 "2022-06-11T01:00:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pvs\_praneeth](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/pvs_praneeth/32/2116_2.png) [@pvs\_praneeth](https://community.temporal.io/u/pvs_praneeth)
#### Post date: [June 11, 2022, 1:00am UTC](https://community.temporal.io/t/is-there-a-way-to-terminate-the-current-workflow-execution-from-the-workflowmethod/4940/1 "2022-06-11T01:00:54Z")

</div>

I am trying to find a way to terminate the current workflow execution from the workflow method. For reference, if there is an exception in the workflow method then I want to terminate the workflow execution.

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [June 11, 2022, 2:17am UTC](https://community.temporal.io/t/is-there-a-way-to-terminate-the-current-workflow-execution-from-the-workflowmethod/4940/2 "2022-06-11T02:17:09Z")

</div>

Take a look at responses in posts [here](https://community.temporal.io/t/best-practice-for-explicitly-failing-workflow-execution/3414/2) and [here](https://community.temporal.io/t/what-are-the-different-ways-temporal-handles-exceptions-thrown-in-workflows/2789/3).

Note that If you want your workflow to fail on any exception type, you could set WorkflowImplementationOptions -\>FailWorkflowExceptionTypes to Throwable.class.

---

<div class="post-metadata">

### Author: ![pvs\_praneeth](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/pvs_praneeth/32/2116_2.png) [@pvs\_praneeth](https://community.temporal.io/u/pvs_praneeth)
#### Post date: [June 14, 2022, 3:41pm UTC](https://community.temporal.io/t/is-there-a-way-to-terminate-the-current-workflow-execution-from-the-workflowmethod/4940/3 "2022-06-14T15:41:03Z")

</div>

Thanks, @tihomir. This helped me.
