> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noxus.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Ending a Case's Work

> Close or cancel a case, or cancel its run, and its tasks and flows stop

A case's work is its process run and its open tasks, some of them worked by a task automation. You end that work from the case or from the run.

## Close or cancel the case

Closing or cancelling a case by hand, or through the API, cancels its open tasks and stops its running flows: its process run and the runs that work its tasks. When there is work to stop, the status menu asks first. The timeline marks each task **Cancelled** and adds a **Task cancelled** line that names it.

A flow's own **Close Case** or **Cancel Case** step leaves its run to finish. Reopening the case does not restart the flow.

## Cancel a process run or a task automation run

A process run and a task automation run cannot resume, so they are never paused. While one runs, waits in the queue or waits on a task, **Past usage** offers **Cancel run** in its row menu, the run drawer offers it in its header, and the run window of a V1 flow offers it beside its run controls. **Pause** and **Resume** do not show for these runs.

Cancelling either run needs **Edit cases**, in the workspace or shared on the process, the case or the task. **Cancel run** shows with **Edit cases** in the workspace, or shared on the process for a process run; shared only on the case or the task, the cancel works through the API. Without it, a stop through the API is refused and says why.

A run whose case or task was deleted has nothing left to cancel, so it just stops.

**1. Choose Cancel run**

Open the run's row menu in **Past usage**, or its run drawer, and choose **Cancel run**.

**2. Read what it ends, then confirm**

The dialog says what else the cancel ends. Choose **Cancel run** to go on, or **Go back** to leave the run as it is.

What the cancel ends depends on the run:

* **A process run.** Its case and the case's open tasks are cancelled, as when you cancel the case. When the flow already closed the case and then created a task, the case keeps its status and only the open tasks are cancelled.
* **A task automation run.** Only its task is cancelled. The process step that waits on the task fails with *The task was cancelled.* and follows its **On failure** path. The case stays open.

The cancelled run reads **Stopped**, and so does the step it was working on, which says the run was cancelled. It offers no **Resume**, and a **Run Status Changed** trigger that watches for **Stopped** fires. The API's stop cancels these runs the same way, with an API key or a person's token, and a bulk pause skips them and gives the reason.

> [!NOTE]
>
> A task automation runs inside the **Create Task** step that starts it, so it also ends when that step reaches its **Timeout** (240 seconds by default, on the step's **Error handling** tab). Its run then reads **Failed**, the timeline adds **Task automation failed**, and the task stays open for a person. When the step ends because its process run was cancelled or its flow was paused, the automation's run reads **Stopped** instead.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.