The initiator of a background execution may, in some cases, wish to cancel an background execution.
It does this by using the cancel action, passing in the token.
{
"name": "cancelCallback",
"script": "stepTypeCallback",
"config": {
"callbackToken": "%{param:token}",
"callbackAction": "cancel"
},
"next": false
}This will set the status on the callback to cancel.
This does not cancel the background execution straight away. However, if the background execution runs a callback start, progress or complete action, the state from that action will be set to cancel, which indicates that the process should not continue.
{
"name": "start",
"script": "stepTypeCallback",
"config": {
"callbackAction": "start"
},
"next": {
"start": "startEvent",
"*": false
}
}In this example, there is no "cancel" on the next clause, so if the parent has cancelled the task before the start, the processing will not continue to the startEvent step.