# Enum CancellationTokenHandling OptimaJet.Workflow.Core.Runtime.CancellationTokenHandling Specifies whether workflow execution checks a [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) at the post-activity checkpoint before continuing the process. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public enum CancellationTokenHandling ``` ## Fields `Ignore = 0` Skips the post-activity cancellation check and allows the execution loop to continue. ### Remarks If cancellation has already been requested at the checkpoint, the runtime may still create fork subprocesses, follow automatic transitions, or complete idle or final processing. A later token-aware operation may still observe cancellation. This is the default value of [WorkflowRuntimeSettings.CancellationTokenHandling](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeSettings/). `Throw = 1` Checks the token at the post-activity checkpoint and stops continuation when cancellation has been requested. ### Remarks The runtime calls [CancellationToken.ThrowIfCancellationRequested()](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken.throwifcancellationrequested) before starting the continuation work. The check does not roll back persistence updates already performed for the completed activity. In the standard execution loop, the resulting [OperationCanceledException](https://learn.microsoft.com/dotnet/api/system.operationcanceledexception) is handled as an execution failure: the runtime records the error, changes the process status to `Error` when the current activity has command transitions or the process has active timers and to `Terminated` otherwise, and then throws an [ProcessExecutionException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/ProcessExecutionException/) that wraps the cancellation exception. ## Remarks The checkpoint is reached after the activity executor returns successfully and the runtime performs the configured persistence updates for the completed activity. It precedes fork subprocess creation, automatic transition execution, break request processing, and completion of the process as idle or finalized. This setting controls only that explicit checkpoint. The token is still passed to asynchronous actions, conditions, custom activities, event handlers, and other token-aware operations, which may observe cancellation independently. [Previous BulkOperationOptions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/BulkOperationOptions/) [Next CodeActionsCompiledEventArgs](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/CodeActionsCompiledEventArgs/)