# Cancel a workflow from an activity

**URL:** <https://community.temporal.io/t/cancel-a-workflow-from-an-activity/8691>\
**Category:** Community Support\
**Tags:** go-sdk, general-impl\
**Created:** [June 29, 2023, 3:48pm UTC](https://community.temporal.io/t/cancel-a-workflow-from-an-activity/8691 "2023-06-29T15:48:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mc8](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mc8](https://community.temporal.io/u/mc8)\
**Post date:** [June 29, 2023, 3:48pm UTC](https://community.temporal.io/t/cancel-a-workflow-from-an-activity/8691/1 "2023-06-29T15:48:49Z")

</div>

Hi there, I have a parent workflow that spawns multiple child workflows, and each child workflow runs a set of activities. One of these activities makes an RPC call to another service. I would like to kill the entire workflow (all child workflows and the parent workflow) if we get a specific response from the RPC call. This RPC will return the same thing for all the activities running in all the child workflows, so it’s really a matter of which child workflow + activity makes this RPC call first, and is the first to trigger the kill-all.

I’m having some trouble figuring out how to relay this “cancel everything” info up from the activity through to the child and parent workflows. Could you please advise? Thank you.

---

<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:** [June 29, 2023, 3:51pm UTC](https://community.temporal.io/t/cancel-a-workflow-from-an-activity/8691/2 "2023-06-29T15:51:28Z")

</div>

I would fail that specific activity and then the child workflow in case of that error. Then the parent would cancel all the currently running child workflows as error-handling logic.

See [samples-go/cancellation at main · temporalio/samples-go · GitHub](https://github.com/temporalio/samples-go/tree/main/cancellation)
