This operation builds a start-process command payload. Use it to start another process asynchronously from the script.
The base command is:
processPayloadBuilder.start()
You can use the following options:
| Option | Description |
|---|---|
| withProcessDefinitionId(processDefinitionId: string) | Specifies the ID of the process definition to start. |
| withProcessDefinitionKey(processDefinitionKey: string) | Specifies the process definition key of the process to start. |
| withBusinessKey(businessKey: string) | Assigns a business key to the new process instance. |
| withName(name: string) | Sets a name for the process instance. |
| withVariable(name: string, value: any) | Adds a process variable and value to the process instance. |
The following is the command example:
processPayloadBuilder
.start()
.withProcessDefinitionKey(variables.processKey)
.build();
The processPayloadBuilder.start() creates a start-process payload builder, in which withProcessDefinitionKey(variables.processKey) specifies the process definition to start using the value stored in the processKey process variable. build() creates the final command payload.