This operation builds an update-process command payload. Use it to update process instance metadata through the runtime command channel.
The base command is:
processPayloadBuilder.update()
You can use the following options:
| Option | Description |
|---|---|
| withProcessDefinitionId(processDefinitionId: string) | Specifies the process definition ID associated with the process instance. |
| withProcessDefinitionKey(processDefinitionKey: string) | Specifies the process definition key associated with the process instance. |
| withBusinessKey(businessKey: string) | Sets or updates the business key for the process instance. |
| withName(name: string) | Sets or updates the process instance name. |
| withVariable(name: string, value: any) | Adds or updates a process variable and its value. |
The following is the command example:
processPayloadBuilder .update() .withProcessInstanceId(variables.processInstanceId) .build();
processPayloadBuilder.update() creates an update-process payload builder. withProcessInstanceId(variables.processInstanceId) specifies the process instance to update 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.