# Web Service: What is the best way to cancel an action?

**URL:** <https://discuss.workflowgen.com/t/web-service-what-is-the-best-way-to-cancel-an-action/310>\
**Category:** Web API\
**Created:** [July 20, 2013, 10:14pm UTC](https://discuss.workflowgen.com/t/web-service-what-is-the-best-way-to-cancel-an-action/310 "2013-07-20T22:14:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [July 20, 2013, 10:14pm UTC](https://discuss.workflowgen.com/t/web-service-what-is-the-best-way-to-cancel-an-action/310/1 "2013-07-20T22:14:07Z")

</div>

### Issue

What is the best way to cancel an action (`CompleteActivityInstance `or `RaiseCancelExceptionOnActivityInstance`/ `RaiseCancelExceptionOnActivityInstanceByName` method)?

### Solution

Use the `RaiseCancelExceptionOnActivityInstance` web method.  
You have to add an exception transition on the corresponding action as well in order to properly handle the exception.
