This operation deletes a process instance.
The base request is:
deleteProcessInstance()
The following example deletes a process instance using an ID stored in a process variable:
new RuntimeProcessInstanceService()
.deleteProcessInstance(variables.processInstanceId);
After the operation completes, the specified process instance is removed from the runtime and can no longer be used by the process engine.