Skip to main content
Version: 1.28 (Current)

Cancel Task

Concept

Built-in Tasks is a concept feature. It's still being developed and can change before it's released. It's available only when the site's license includes the Concept feature Tasks.

Audience: Low-code Engineers

Skill Prerequisites: Actions, Tokens, Workflows

Cancels an open task. The creator of the task and the Task administrators of its type may cancel it.

Typical Use Cases​

  • Cancel the open tasks of a purchase request that was withdrawn, together with Get Tasks
  • Cancel a task a workflow created earlier, when it's no longer needed
  • Add a Cancel button that asks why, as the task panel of My Tasks does

Don't use it to​

  • Finish a task whose work is done. Use Complete Task instead.
  • Cancel the open tasks of a checklist when a record leaves a state. Set Open checklist tasks on the lifecycle transition instead. See Checklists on Lifecycle States.
Action NameDescription
Complete TaskCompletes a task with an outcome.
Get TasksLists tasks, for example the open ones attached to a record.
Create TaskCreates a task. Its creator may cancel it.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
Task IdThe id of the task, usually a token such as [Task] in an escalation or event workflow, or [Id] in a grid row.YesemptyYes
CommentWhy the task is cancelled. It's saved on the task as its completion comment, and the event workflows get it as [Comment].YesemptyWith Require Comment
Require CommentWhen checked, the action refuses to cancel the task without a comment, as the task panel of My Tasks does.NofalseNo
Output Token NameThe name of a token, without brackets, that receives the task after the change, for example Task. See Task fields in tokens.NoemptyNo
On ErrorActions to run when the task can't be cancelled. [ExceptionMessage] holds the reason. See Errors and refusals.NoemptyNo

Output​

TokenDescription
[<Output Token Name>]The id of the task.
[<Output Token Name>:Status], [<Output Token Name>:CompletionComment] and the other fieldsThe cancelled task. See Task fields in tokens.

Considerations​

  • Who may cancel. The creator of the task, the Task administrators of its type, superusers, and escalation steps' workflows, which act as the system. The assignee may cancel only a task they created.
  • Tasks without a creator. Tasks created by a lifecycle checklist, or in an escalation step's workflow, have no creator, so only Task administrators can cancel them.
  • Cancelling is final. A cancelled task can't be reopened. Create a new task if the work is needed again.
  • After cancelling. The task's escalation steps stop, and the workflow the type binds to Cancelled runs with the comment. A BPMN 2.0 user task waiting for the task continues with an error. See User Tasks.

The action can fail with these messages, besides the ones in Errors and refusals:

MessageWhy
Write why you're cancelling this task.Require Comment is checked and Comment is empty.
Only the creator or a Task administrator can cancel this task.The user running the action is neither.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. A Cancel button that asks why​

Add this action to a button of a form with a TaskId field and a Reason field. Without a reason, the user sees Write why you're cancelling this task.

{
"Title": "Cancel Task",
"ActionType": "PlantAnApp.Tasks.CancelTask",
"Description": "Cancel the task",
"Condition": null,
"Parameters": {
"TaskId": "[TaskId]",
"Comment": "[Reason]",
"RequireComment": true,
"OutputToken": "Task",
"OnError": [
{
"Title": "Display Error Message",
"ActionType": "ShowError",
"Parameters": {
"Message": "<p>[ExceptionMessage]</p>"
}
}
]
}
}

2. Cancel a task the workflow created​

Run this action later in the same workflow as Create Task, whose Output Token Name is SupplierCheck. The user the workflow runs as created the task, so they may cancel it. The condition skips the action when no task was created.

{
"Title": "Cancel Task",
"ActionType": "PlantAnApp.Tasks.CancelTask",
"Description": "The supplier check is no longer needed",
"Condition": "[SupplierCheck] != \"\"",
"Parameters": {
"TaskId": "[SupplierCheck]",
"Comment": "The purchase request was withdrawn.",
"OnError": []
}
}

For cancelling every open task of a record, see Get Tasks.

Revised 11/12/2026