This operation deletes a task. Use it when a script needs to remove a task as part of a cleanup or cancellation scenario.
The base request is:
deleteTask(taskId)
Use deleteTask(...) to delete the task that matches the specified identifier.
The following example deletes a task using an identifier stored in a process variable:
new RuntimeTaskService()
.deleteTask(variables.taskId);