This operation builds a signal command payload. Use it to publish a process signal from a script.
The base command is:
processPayloadBuilder.signal()
You can use the following options:
| Option | Description |
|---|---|
| withName(name: string) | Specifies the name of the signal to publish. |
| withVariable(name: string, value: any) | Adds a single variable and value to the signal payload. |
| withVariables(variables: { [key: string]: any;}) | Adds multiple variables to the signal payload. |
The following is the command example:
processPayloadBuilder
.signal()
.withName('approvalReceived')
.withVariable('approved', true)
.build();
processPayloadBuilder.signal() creates a signal payload builder. withName('approvalReceived') specifies the name of the signal to publish. withVariable('approved', true) adds an approved variable with a value of true to the signal payload. build() creates the final command payload.