# Terminate Workflow

> `System.Activities.Statements.TerminateWorkflow`

`System.Activities.Statements.TerminateWorkflow`

Ends the workflow immediately, raising the configured exception. Once **Terminate Workflow** is reached, no further activities are executed. **Terminate Workflow** is intended for cases where the process has hit an unrecoverable state and execution must stop explicitly.

This activity is distinct from the [Terminate](https://docs.uipath.com/activities/other/latest/workflow/terminate-end-event) end event used in business-process diagrams.

## Project compatibility

**Windows - Legacy** | **Windows** | **Cross-Platform**

## Properties

### Common

| Parameter | Description |
| --- | --- |
| **DisplayName** | The display name of the activity. |

### Misc

| Parameter | Description |
| --- | --- |
| **Exception** | The exception to throw when the workflow terminates. |
| **Reason** | A description of the reason the workflow is being terminated. Used when **Exception** is not provided. |
| **Private** | When selected, the values of variables and arguments are no longer logged at Verbose level. |

This activity is built by Microsoft. For more information, see [their official documentation](https://learn.microsoft.com/en-us/dotnet/api/system.activities.statements.terminateworkflow?view=netframework-4.8.1).
