This operation builds a delete-process request payload. Use it to request deletion of a process instance
The base command is:
processPayloadBuilder.delete()
You can use the following options:
| Option | Description |
|---|---|
| withProcessInstance(processInstance: ProcessInstance) | Specifies the process instance to delete. |
| withProcessInstanceId(processDefinitionId: string) | Specifies the ID of the process instance to delete. |
| withReason(reason: string) | Provides a reason for deleting the process instance. |
The following is the command example:
processPayloadBuilder
.delete()
.withProcessInstanceId(variables.processInstanceId)
.build();
The processPayloadBuilder.delete() creates a delete-process payload builder. withProcessInstanceId(variables.processInstanceId) specifies the process instance to delete by using the value stored in the processInstanceId process variable. build() creates the final command payload that can be sent to the runtime command channel.