Get Event Subscriptions

Queries for event subscriptions that fulfill given parameters. The size of the result set can be retrieved by using the Get Event Subscription Count method.

Method

GET /event-subscription

Parameters

Query Parameters

Name Description
eventSubscriptionId Only select subscription with the given id.
eventName Only select subscriptions for events with the given name.
eventType Only select subscriptions for events with the given type. Valid values: message, signal, compensate, and conditional.
executionId Only select subscriptions that belong to an execution with the given id.
processInstanceId Only select subscriptions that belong to a process instance with the given id.
activityId Only select subscriptions that belong to an activity with the given id.
tenantIdIn Filter by a comma-separated list of tenant ids. Only select subscriptions that belong to one of the given tenant ids.
withoutTenantId Only select subscriptions which have no tenant id. Value may only be true, as false is the default behavior.
includeEventSubscriptionsWithoutTenantId Select event subscriptions which have no tenant id. Can be used in combination with tenantIdIn parameter. Value may only be true, as false is the default behavior.
sortBy Sort the results lexicographically by a given criterion. Valid values are created and tenantId. Must be used in conjunction with the sortOrder parameter.
sortOrder Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
firstResult Pagination of results. Specifies the index of the first result to return.
maxResults Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

Result

A JSON array of event subscription objects. Each event subscription object has the following properties:

Name Value Description
id String The id of the event subscription.
eventType String The type of the event subscription.
eventName String The name of the event this subscription belongs to as defined in the process model.
executionId String The execution that is subscribed on the referenced event.
processInstanceId String The process instance this subscription belongs to.
activityId String The identifier of the activity that this event subscription belongs to. This could for example be the id of a receive task.
createdDate Date The time this event subscription was created.
tenantId String The id of the tenant this event subscription belongs to. Can be null if the subscription belongs to no single tenant.

Response Codes

Code Media type Description
200 application/json Request successful.
400 application/json Returned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy. See the Introduction for the error response format.

Example

Request

GET /event-subscription?eventType=message&sortBy=created&sortOrder=desc

Response

[
  {
    "id": "anId",
    "eventType": "message",
    "eventName": "anEventName",
    "executionId": "anExecutionId",
    "processInstanceId": "aProcessInstanceId",
    "activityId": "anActivityId",
    "createdDate": "2020-04-20T15:23:12.229+0200",
    "tenantId": null
  },
  {
    "id": "anotherId",
    "eventType": "message",
    "eventName": "anotherEventName",
    "executionId": "anotherExecutionId",
    "processInstanceId": "anotherProcessInstanceId",
    "activityId": "anotherActivityId",
    "createdDate": "2020-04-20T15:20:12.229+0200",
    "tenantId": null
  }
]

On this Page: