Throw a Signal

A signal is an event of global scope (broadcast semantics) and is delivered to all active handlers. Internally this maps to the engine’s signal event received builder method RuntimeService#createSignalEvent(). For more information about the signal behavior, see the Signal Events section of the BPMN 2.0 Implementation Reference.

Method

POST /signal

Parameters

Request Body

A JSON object with the following properties:

Name Description
name The name of the signal to deliver.
Note: This property is mandatory.
executionId Specifies a single execution which is notified by the signal.
Note: If no execution id is defined the signal is broadcasted to all subscribed handlers.
variables A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object.

Name Description
value The variable's value. For variables of type Object, the serialized value has to be submitted as a String value.

For variables of type File the value has to be submitted as Base64 encoded string.

type The value type of the variable.
valueInfo A JSON object containing additional, value-type-dependent properties.

For serialized variables of type Object, the following properties can be provided:

  • objectTypeName: A string representation of the object's type name.
  • serializationDataFormat: The serialization format used to store the variable.

For serialized variables of type File, the following properties can be provided:

  • filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.
  • mimetype: The MIME type of the file that is being uploaded.
  • encoding: The encoding of the file that is being uploaded.

tenantId Specifies a tenant to deliver the signal. The signal can only be received on executions or process definitions which belongs to the given tenant.
Note: Cannot be used in combination with executionId.
withoutTenantId If true the signal can only be received on executions or process definitions which belongs to no tenant. Value may not be false as this is the default behavior.
Note: Cannot be used in combination with executionId.

Result

This method returns no content.

Response Codes

Code Media type Description
204 Request successful.
400 application/json
  • If no name was given
  • If the variable value or type is invalid, for example if the value could not be parsed to an integer value or the passed variable type is not supported
  • If a tenant id and an execution id is specified
403 application/json If the user is not allowed to throw a signal event.
500 application/json If a single execution is specified and no such execution exists or has not subscribed to the signal.

Also see the introduction for the error response format.

Example

Request

POST /signal

Request Body:

{
  "name": "Policy conditions changed",
  "executionId": "b527879e-790a-11e7-8c05-ee1718a0e301",
  "variables": {
    "newTimePeriodInMonth": {
      "value": 24
    }
  }
}

Response

Status 204. No content.

On this Page: