This operation builds a pause-process command payload. Use it to pause a running process instance.
The base command is:
processPayloadBuilder.suspend()
You can use the following options:
| Option | Description |
|---|---|
| withProcessInstance(processInstance: ProcessInstance) | Specifies the process instance to pause. |
| withProcessInstanceId(processDefinitionId: string) | Specifies the ID of the process instance to pause. |
The following is the command example:
processPayloadBuilder
.suspend()
.withProcessInstanceId(variables.processInstanceId)
.build();
processPayloadBuilder.suspend() creates a suspend-process payload builder. withProcessInstanceId(variables.processInstanceId) specifies the process instance to suspend 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.