org.activiti.engine

## Interface RuntimeService

-     public interface RuntimeService

  Author:
    Tom Baeyens, Joram Barrez, Daniel Meyer

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activateProcessInstanceById(String processInstanceId)` Activates the process instance with the given id.
    `void` | `addEventListener(ActivitiEventListener listenerToAdd)` Adds an event-listener which will be notified of ALL events by the dispatcher.
    `void` | `addEventListener(ActivitiEventListener listenerToAdd, ActivitiEventType... types)` Adds an event-listener which will only be notified when an event occurs, which type is in the given types.
    `void` | `addGroupIdentityLink(String processInstanceId, String groupId, String identityLinkType)` Involves a group with a process instance.
    `void` | `addParticipantGroup(String processInstanceId, String groupId)` Convenience shorthand for `addGroupIdentityLink(String, String, String)`; with type `IdentityLinkType.CANDIDATE`
    `void` | `addParticipantUser(String processInstanceId, String userId)` Convenience shorthand for `addUserIdentityLink(String, String, String)`; with type `IdentityLinkType.CANDIDATE`
    `void` | `addUserIdentityLink(String processInstanceId, String userId, String identityLinkType)` Involves a user with a process instance.
    `ExecutionQuery` | `createExecutionQuery()` Creates a new `ExecutionQuery` instance, that can be used to query the executions and process instances.
    `NativeExecutionQuery` | `createNativeExecutionQuery()` creates a new `NativeExecutionQuery` to query `Execution`s by SQL directly
    `NativeProcessInstanceQuery` | `createNativeProcessInstanceQuery()` creates a new `NativeProcessInstanceQuery` to query `ProcessInstance`s by SQL directly
    `ProcessInstanceBuilder` | `createProcessInstanceBuilder()` Create a ProcessInstanceBuilder
    `ProcessInstanceQuery` | `createProcessInstanceQuery()` Creates a new `ProcessInstanceQuery` instance, that can be used to query process instances.
    `void` | `deleteGroupIdentityLink(String processInstanceId, String groupId, String identityLinkType)` Removes the association between a group and a process instance for the given identityLinkType.
    `void` | `deleteParticipantGroup(String processInstanceId, String groupId)` Convenience shorthand for `deleteGroupIdentityLink(String, String, String)`; with type `IdentityLinkType.CANDIDATE`
    `void` | `deleteParticipantUser(String processInstanceId, String userId)` Convenience shorthand for `deleteUserIdentityLink(String, String, String)`; with type `IdentityLinkType.CANDIDATE`
    `void` | `deleteProcessInstance(String processInstanceId, String deleteReason)` Delete an existing runtime process instance.
    `void` | `deleteUserIdentityLink(String processInstanceId, String userId, String identityLinkType)` Removes the association between a user and a process instance for the given identityLinkType.
    `void` | `dispatchEvent(ActivitiEvent event)` Dispatches the given event to any listeners that are registered.
    `List<String>` | `getActiveActivityIds(String executionId)` Finds the activity ids for all executions that are waiting in activities.
    `List<IdentityLink>` | `getIdentityLinksForProcessInstance(String instanceId)` Retrieves the `IdentityLink`s associated with the given process instance.
    `List<Event>` | `getProcessInstanceEvents(String processInstanceId)` The all events related to the given Process Instance.
    `Object` | `getVariable(String executionId, String variableName)` The variable value.
    `<T> T` | `getVariable(String executionId, String variableName, Class<T> variableClass)` The variable value.
    `org.activiti.engine.impl.persistence.entity.VariableInstance` | `getVariableInstance(String executionId, String variableName)` The variable.
    `org.activiti.engine.impl.persistence.entity.VariableInstance` | `getVariableInstance(String executionId, String variableName, String locale, boolean withLocalizationFallback)` The variable.
    `org.activiti.engine.impl.persistence.entity.VariableInstance` | `getVariableInstanceLocal(String executionId, String variableName)` The variable for an execution.
    `org.activiti.engine.impl.persistence.entity.VariableInstance` | `getVariableInstanceLocal(String executionId, String variableName, String locale, boolean withLocalizationFallback)` The variable for an execution.
    `Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance>` | `getVariableInstances(String executionId)` All variables visible from the given execution scope (including parent scopes).
    `Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance>` | `getVariableInstances(String executionId, Collection<String> variableNames)` The variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).
    `Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance>` | `getVariableInstances(String executionId, Collection<String> variableNames, String locale, boolean withLocalizationFallback)` The variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).
    `Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance>` | `getVariableInstances(String executionId, String locale, boolean withLocalizationFallback)` All variables visible from the given execution scope (including parent scopes).
    `List<org.activiti.engine.impl.persistence.entity.VariableInstance>` | `getVariableInstancesByExecutionIds(Set<String> executionIds)` All variables visible from the given execution scope (including parent scopes).
    `Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance>` | `getVariableInstancesLocal(String executionId)` All variable values that are defined in the execution scope, without taking outer scopes into account.
    `Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance>` | `getVariableInstancesLocal(String executionId, Collection<String> variableNames)` The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.
    `Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance>` | `getVariableInstancesLocal(String executionId, Collection<String> variableNames, String locale, boolean withLocalizationFallback)` The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.
    `Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance>` | `getVariableInstancesLocal(String executionId, String locale, boolean withLocalizationFallback)` All variable values that are defined in the execution scope, without taking outer scopes into account.
    `Object` | `getVariableLocal(String executionId, String variableName)` The variable value for an execution.
    `<T> T` | `getVariableLocal(String executionId, String variableName, Class<T> variableClass)` The variable value for an execution.
    `Map<String,Object>` | `getVariables(String executionId)` All variables visible from the given execution scope (including parent scopes).
    `Map<String,Object>` | `getVariables(String executionId, Collection<String> variableNames)` The variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).
    `Map<String,Object>` | `getVariablesLocal(String executionId)` All variable values that are defined in the execution scope, without taking outer scopes into account.
    `Map<String,Object>` | `getVariablesLocal(String executionId, Collection<String> variableNames)` The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.
    `boolean` | `hasVariable(String executionId, String variableName)` Check whether or not this execution has variable set with the given name, Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes).
    `boolean` | `hasVariableLocal(String executionId, String variableName)` Check whether or not this execution has a local variable set with the given name.
    `void` | `messageEventReceived(String messageName, String executionId)` Notifies the process engine that a message event with name 'messageName' has been received and has been correlated to an execution with id 'executionId'.
    `void` | `messageEventReceived(String messageName, String executionId, Map<String,Object> processVariables)` Notifies the process engine that a message event with the name 'messageName' has been received and has been correlated to an execution with id 'executionId'.
    `void` | `messageEventReceivedAsync(String messageName, String executionId)` Notifies the process engine that a message event with the name 'messageName' has been received and has been correlated to an execution with id 'executionId'.
    `void` | `removeEventListener(ActivitiEventListener listenerToRemove)` Removes the given listener from this dispatcher.
    `void` | `removeVariable(String executionId, String variableName)` Removes a variable for an execution.
    `void` | `removeVariableLocal(String executionId, String variableName)` Removes a variable for an execution (not considering parent scopes).
    `void` | `removeVariables(String executionId, Collection<String> variableNames)` Removes variables for an execution.
    `void` | `removeVariablesLocal(String executionId, Collection<String> variableNames)` Remove variables for an execution (not considering parent scopes).
    `void` | `setProcessInstanceName(String processInstanceId, String name)` Sets the name for the process instance with the given id.
    `void` | `setVariable(String executionId, String variableName, Object value)` Update or create a variable for an execution.
    `void` | `setVariableLocal(String executionId, String variableName, Object value)` Update or create a variable for an execution (not considering parent scopes).
    `void` | `setVariables(String executionId, Map<String,? extends Object> variables)` Update or create given variables for an execution (including parent scopes).
    `void` | `setVariablesLocal(String executionId, Map<String,? extends Object> variables)` Update or create given variables for an execution (not considering parent scopes).
    `void` | `signal(String executionId)` Sends an external trigger to an activity instance that is waiting inside the given execution.
    `void` | `signal(String executionId, Map<String,Object> processVariables)` Sends an external trigger to an activity instance that is waiting inside the given execution.
    `void` | `signalEventReceived(String signalName)` Notifies the process engine that a signal event of name 'signalName' has been received.
    `void` | `signalEventReceived(String signalName, Map<String,Object> processVariables)` Notifies the process engine that a signal event of name 'signalName' has been received.
    `void` | `signalEventReceived(String signalName, String executionId)` Notifies the process engine that a signal event of name 'signalName' has been received.
    `void` | `signalEventReceived(String signalName, String executionId, Map<String,Object> processVariables)` Notifies the process engine that a signal event of name 'signalName' has been received.
    `void` | `signalEventReceivedAsync(String signalName)` Notifies the process engine that a signal event of name 'signalName' has been received.
    `void` | `signalEventReceivedAsync(String signalName, String executionId)` Notifies the process engine that a signal event of name 'signalName' has been received.
    `void` | `signalEventReceivedAsyncWithTenantId(String signalName, String tenantId)` Similar to `signalEventReceivedAsync(String)`, but within the context of one tenant.
    `void` | `signalEventReceivedWithTenantId(String signalName, Map<String,Object> processVariables, String tenantId)` Similar to `#signalEventReceived(String, Map)`, but within the context of one tenant.
    `void` | `signalEventReceivedWithTenantId(String signalName, String tenantId)` Similar to `signalEventReceived(String)`, but within the context of one tenant.
    `ProcessInstance` | `startProcessInstanceById(String processDefinitionId)` Starts a new process instance in the exactly specified version of the process definition with the given id.
    `ProcessInstance` | `startProcessInstanceById(String processDefinitionId, Map<String,Object> variables)` Starts a new process instance in the exactly specified version of the process definition with the given id.
    `ProcessInstance` | `startProcessInstanceById(String processDefinitionId, String businessKey)` Starts a new process instance in the exactly specified version of the process definition with the given id.
    `ProcessInstance` | `startProcessInstanceById(String processDefinitionId, String businessKey, Map<String,Object> variables)` Starts a new process instance in the exactly specified version of the process definition with the given id.
    `ProcessInstance` | `startProcessInstanceByKey(String processDefinitionKey)` Starts a new process instance in the latest version of the process definition with the given key.
    `ProcessInstance` | `startProcessInstanceByKey(String processDefinitionKey, Map<String,Object> variables)` Starts a new process instance in the latest version of the process definition with the given key
    `ProcessInstance` | `startProcessInstanceByKey(String processDefinitionKey, String businessKey)` Starts a new process instance in the latest version of the process definition with the given key.
    `ProcessInstance` | `startProcessInstanceByKey(String processDefinitionKey, String businessKey, Map<String,Object> variables)` Starts a new process instance in the latest version of the process definition with the given key.
    `ProcessInstance` | `startProcessInstanceByKeyAndTenantId(String processDefinitionKey, Map<String,Object> variables, String tenantId)` Similar to `startProcessInstanceByKey(String, Map)`, but using a specific tenant identifier.
    `ProcessInstance` | `startProcessInstanceByKeyAndTenantId(String processDefinitionKey, String tenantId)` Similar to `startProcessInstanceByKey(String)`, but using a specific tenant identifier.
    `ProcessInstance` | `startProcessInstanceByKeyAndTenantId(String processDefinitionKey, String businessKey, Map<String,Object> variables, String tenantId)` Similar to `startProcessInstanceByKey(String, String, Map)`, but using a specific tenant identifier.
    `ProcessInstance` | `startProcessInstanceByKeyAndTenantId(String processDefinitionKey, String businessKey, String tenantId)` Similar to `startProcessInstanceByKey(String, String)`, but using a specific tenant identifier.
    `ProcessInstance` | `startProcessInstanceByMessage(String messageName)` Signals the process engine that a message is received and starts a new `ProcessInstance`.
    `ProcessInstance` | `startProcessInstanceByMessage(String messageName, Map<String,Object> processVariables)` Signals the process engine that a message is received and starts a new `ProcessInstance`.
    `ProcessInstance` | `startProcessInstanceByMessage(String messageName, String businessKey)` Signals the process engine that a message is received and starts a new `ProcessInstance`.
    `ProcessInstance` | `startProcessInstanceByMessage(String messageName, String businessKey, Map<String,Object> processVariables)` Signals the process engine that a message is received and starts a new `ProcessInstance`.
    `ProcessInstance` | `startProcessInstanceByMessageAndTenantId(String messageName, Map<String,Object> processVariables, String tenantId)` Similar to `RuntimeService#startProcessInstanceByMessage(String, Map)`, but with tenant context.
    `ProcessInstance` | `startProcessInstanceByMessageAndTenantId(String messageName, String tenantId)` Similar to `startProcessInstanceByMessage(String)`, but with tenant context.
    `ProcessInstance` | `startProcessInstanceByMessageAndTenantId(String messageName, String businessKey, Map<String,Object> processVariables, String tenantId)` Similar to `RuntimeService#startProcessInstanceByMessage(String, String, Map)`, but with tenant context.
    `ProcessInstance` | `startProcessInstanceByMessageAndTenantId(String messageName, String businessKey, String tenantId)` Similar to `startProcessInstanceByMessage(String, String)`, but with tenant context.
    `void` | `suspendProcessInstanceById(String processInstanceId)` Suspends the process instance with the given id.
    `void` | `updateBusinessKey(String processInstanceId, String businessKey)` Updates the business key for the provided process instance

- - ### Method Detail

    - #### startProcessInstanceByKey

          ProcessInstance startProcessInstanceByKey(String processDefinitionKey)

      Starts a new process instance in the latest version of the process definition with the given key.
      Parameters:
        `processDefinitionKey` - key of process definition, cannot be null.
      Throws:
        `ActivitiObjectNotFoundException` - when no process definition is deployed with the given key.

    - #### startProcessInstanceByKey

          ProcessInstance startProcessInstanceByKey(String processDefinitionKey,
                                                    String businessKey)

      Starts a new process instance in the latest version of the process definition with the given key. A business key can be provided to associate the process instance with a certain identifier that has a clear business meaning. For example in an order process, the business key could be an order id. This business key can then be used to easily look up that process instance , see `ProcessInstanceQuery.processInstanceBusinessKey(String)`. Providing such a business key is definitely a best practice.
      Parameters:
        `processDefinitionKey` - key of process definition, cannot be null.
        `businessKey` - a key that uniquely identifies the process instance in the context or the given process definition.
      Throws:
        `ActivitiObjectNotFoundException` - when no process definition is deployed with the given key.

    - #### startProcessInstanceByKey

          ProcessInstance startProcessInstanceByKey(String processDefinitionKey,
                                                    Map<String,Object> variables)

      Starts a new process instance in the latest version of the process definition with the given key
      Parameters:
        `processDefinitionKey` - key of process definition, cannot be null.
        `variables` - the variables to pass, can be null.
      Throws:
        `ActivitiObjectNotFoundException` - when no process definition is deployed with the given key.

    - #### startProcessInstanceByKey

          ProcessInstance startProcessInstanceByKey(String processDefinitionKey,
                                                    String businessKey,
                                                    Map<String,Object> variables)

      Starts a new process instance in the latest version of the process definition with the given key. A business key can be provided to associate the process instance with a certain identifier that has a clear business meaning. For example in an order process, the business key could be an order id. This business key can then be used to easily look up that process instance , see `ProcessInstanceQuery.processInstanceBusinessKey(String)`. Providing such a business key is definitely a best practice. The combination of processdefinitionKey-businessKey must be unique.
      Parameters:
        `processDefinitionKey` - key of process definition, cannot be null.
        `variables` - the variables to pass, can be null.
        `businessKey` - a key that uniquely identifies the process instance in the context or the given process definition.
      Throws:
        `ActivitiObjectNotFoundException` - when no process definition is deployed with the given key.

    - #### startProcessInstanceByKeyAndTenantId

          ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey,
                                                               String tenantId)

      Similar to `startProcessInstanceByKey(String)`, but using a specific tenant identifier.

    - #### startProcessInstanceByKeyAndTenantId

          ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey,
                                                               String businessKey,
                                                               String tenantId)

      Similar to `startProcessInstanceByKey(String, String)`, but using a specific tenant identifier.

    - #### startProcessInstanceByKeyAndTenantId

          ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey,
                                                               Map<String,Object> variables,
                                                               String tenantId)

      Similar to `startProcessInstanceByKey(String, Map)`, but using a specific tenant identifier.

    - #### startProcessInstanceByKeyAndTenantId

          ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey,
                                                               String businessKey,
                                                               Map<String,Object> variables,
                                                               String tenantId)

      Similar to `startProcessInstanceByKey(String, String, Map)`, but using a specific tenant identifier.

    - #### startProcessInstanceById

          ProcessInstance startProcessInstanceById(String processDefinitionId)

      Starts a new process instance in the exactly specified version of the process definition with the given id.
      Parameters:
        `processDefinitionId` - the id of the process definition, cannot be null.
      Throws:
        `ActivitiObjectNotFoundException` - when no process definition is deployed with the given key.

    - #### startProcessInstanceById

          ProcessInstance startProcessInstanceById(String processDefinitionId,
                                                   String businessKey)

      Starts a new process instance in the exactly specified version of the process definition with the given id. A business key can be provided to associate the process instance with a certain identifier that has a clear business meaning. For example in an order process, the business key could be an order id. This business key can then be used to easily look up that process instance , see `ProcessInstanceQuery.processInstanceBusinessKey(String)`. Providing such a business key is definitely a best practice.
      Parameters:
        `processDefinitionId` - the id of the process definition, cannot be null.
        `businessKey` - a key that uniquely identifies the process instance in the context or the given process definition.
      Throws:
        `ActivitiObjectNotFoundException` - when no process definition is deployed with the given key.

    - #### startProcessInstanceById

          ProcessInstance startProcessInstanceById(String processDefinitionId,
                                                   Map<String,Object> variables)

      Starts a new process instance in the exactly specified version of the process definition with the given id.
      Parameters:
        `processDefinitionId` - the id of the process definition, cannot be null.
        `variables` - variables to be passed, can be null
      Throws:
        `ActivitiObjectNotFoundException` - when no process definition is deployed with the given key.

    - #### startProcessInstanceById

          ProcessInstance startProcessInstanceById(String processDefinitionId,
                                                   String businessKey,
                                                   Map<String,Object> variables)

      Starts a new process instance in the exactly specified version of the process definition with the given id. A business key can be provided to associate the process instance with a certain identifier that has a clear business meaning. For example in an order process, the business key could be an order id. This business key can then be used to easily look up that process instance , see `ProcessInstanceQuery.processInstanceBusinessKey(String)`. Providing such a business key is definitely a best practice.
      Parameters:
        `processDefinitionId` - the id of the process definition, cannot be null.
        `variables` - variables to be passed, can be null
      Throws:
        `ActivitiObjectNotFoundException` - when no process definition is deployed with the given key.

    - #### startProcessInstanceByMessage

          ProcessInstance startProcessInstanceByMessage(String messageName)

      Signals the process engine that a message is received and starts a new `ProcessInstance`.

      Calling this method can have two different outcomes:

      - If the message name is associated with a message start event, a new process instance is started.
      - If no subscription to a message with the given name exists, `ActivitiException` is thrown
      Parameters:
        `messageName` - the 'name' of the message as specified as an attribute on the bpmn20 `<message name="messageName" />` element.
      Returns:
        the `ProcessInstance` object representing the started process instance
      Throws:
        `ActivitiExeception` - if no subscription to a message with the given name exists
      Since:
        5.9

    - #### startProcessInstanceByMessageAndTenantId

          ProcessInstance startProcessInstanceByMessageAndTenantId(String messageName,
                                                                   String tenantId)

      Similar to `startProcessInstanceByMessage(String)`, but with tenant context.

    - #### startProcessInstanceByMessage

          ProcessInstance startProcessInstanceByMessage(String messageName,
                                                        String businessKey)

      Signals the process engine that a message is received and starts a new `ProcessInstance`.

      See `startProcessInstanceByMessage(String, Map)`. This method allows specifying a business key.
      Parameters:
        `messageName` - the 'name' of the message as specified as an attribute on the bpmn20 `<message name="messageName" />` element.
        `businessKey` - the business key which is added to the started process instance
      Throws:
        `ActivitiExeception` - if no subscription to a message with the given name exists
      Since:
        5.10

    - #### startProcessInstanceByMessageAndTenantId

          ProcessInstance startProcessInstanceByMessageAndTenantId(String messageName,
                                                                   String businessKey,
                                                                   String tenantId)

      Similar to `startProcessInstanceByMessage(String, String)`, but with tenant context.

    - #### startProcessInstanceByMessage

          ProcessInstance startProcessInstanceByMessage(String messageName,
                                                        Map<String,Object> processVariables)

      Signals the process engine that a message is received and starts a new `ProcessInstance`.

      See `startProcessInstanceByMessage(String)`. In addition, this method allows specifying a the payload of the message as a map of process variables.
      Parameters:
        `messageName` - the 'name' of the message as specified as an attribute on the bpmn20 `<message name="messageName" />` element.
        `processVariables` - the 'payload' of the message. The variables are added as processes variables to the started process instance.
      Returns:
        the `ProcessInstance` object representing the started process instance
      Throws:
        `ActivitiExeception` - if no subscription to a message with the given name exists
      Since:
        5.9

    - #### startProcessInstanceByMessageAndTenantId

          ProcessInstance startProcessInstanceByMessageAndTenantId(String messageName,
                                                                   Map<String,Object> processVariables,
                                                                   String tenantId)

      Similar to `RuntimeService#startProcessInstanceByMessage(String, Map)`, but with tenant context.

    - #### startProcessInstanceByMessage

          ProcessInstance startProcessInstanceByMessage(String messageName,
                                                        String businessKey,
                                                        Map<String,Object> processVariables)

      Signals the process engine that a message is received and starts a new `ProcessInstance`.

      See `startProcessInstanceByMessage(String, Map)`. In addition, this method allows specifying a business key.
      Parameters:
        `messageName` - the 'name' of the message as specified as an attribute on the bpmn20 `<message name="messageName" />` element.
        `businessKey` - the business key which is added to the started process instance
        `processVariables` - the 'payload' of the message. The variables are added as processes variables to the started process instance.
      Returns:
        the `ProcessInstance` object representing the started process instance
      Throws:
        `ActivitiExeception` - if no subscription to a message with the given name exists
      Since:
        5.9

    - #### startProcessInstanceByMessageAndTenantId

          ProcessInstance startProcessInstanceByMessageAndTenantId(String messageName,
                                                                   String businessKey,
                                                                   Map<String,Object> processVariables,
                                                                   String tenantId)

      Similar to `RuntimeService#startProcessInstanceByMessage(String, String, Map)`, but with tenant context.

    - #### deleteProcessInstance

          void deleteProcessInstance(String processInstanceId,
                                     String deleteReason)

      Delete an existing runtime process instance.
      Parameters:
        `processInstanceId` - id of process instance to delete, cannot be null.
        `deleteReason` - reason for deleting, can be null.
      Throws:
        `ActivitiObjectNotFoundException` - when no process instance is found with the given id.

    - #### getActiveActivityIds

          List<String> getActiveActivityIds(String executionId)

      Finds the activity ids for all executions that are waiting in activities. This is a list because a single activity can be active multiple times.
      Parameters:
        `executionId` - id of the execution, cannot be null.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution exists with the given executionId.

    - #### signal

          void signal(String executionId)

      Sends an external trigger to an activity instance that is waiting inside the given execution.
      Parameters:
        `executionId` - id of execution to signal, cannot be null.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### signal

          void signal(String executionId,
                      Map<String,Object> processVariables)

      Sends an external trigger to an activity instance that is waiting inside the given execution.
      Parameters:
        `executionId` - id of execution to signal, cannot be null.
        `processVariables` - a map of process variables
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### updateBusinessKey

          void updateBusinessKey(String processInstanceId,
                                 String businessKey)

      Updates the business key for the provided process instance
      Parameters:
        `processInstanceId` - id of the process instance to set the business key, cannot be null
        `businessKey` - new businessKey value

    - #### addUserIdentityLink

          void addUserIdentityLink(String processInstanceId,
                                   String userId,
                                   String identityLinkType)

      Involves a user with a process instance. The type of identity link is defined by the given identityLinkType.
      Parameters:
        `processInstanceId` - id of the process instance, cannot be null.
        `userId` - id of the user involve, cannot be null.
        `identityLinkType` - type of identityLink, cannot be null (@see `IdentityLinkType`).
      Throws:
        `ActivitiObjectNotFoundException` - when the process instance doesn't exist.

    - #### addGroupIdentityLink

          void addGroupIdentityLink(String processInstanceId,
                                    String groupId,
                                    String identityLinkType)

      Involves a group with a process instance. The type of identityLink is defined by the given identityLink.
      Parameters:
        `processInstanceId` - id of the process instance, cannot be null.
        `groupId` - id of the group to involve, cannot be null.
        `identityLinkType` - type of identity, cannot be null (@see `IdentityLinkType`).
      Throws:
        `ActivitiObjectNotFoundException` - when the process instance or group doesn't exist.

    - #### addParticipantUser

          void addParticipantUser(String processInstanceId,
                                  String userId)

      Convenience shorthand for `addUserIdentityLink(String, String, String)`; with type `IdentityLinkType.CANDIDATE`
      Parameters:
        `processInstanceId` - id of the process instance, cannot be null.
        `userId` - id of the user to use as candidate, cannot be null.
      Throws:
        `ActivitiObjectNotFoundException` - when the task or user doesn't exist.

    - #### addParticipantGroup

          void addParticipantGroup(String processInstanceId,
                                   String groupId)

      Convenience shorthand for `addGroupIdentityLink(String, String, String)`; with type `IdentityLinkType.CANDIDATE`
      Parameters:
        `processInstanceId` - id of the process instance, cannot be null.
        `groupId` - id of the group to use as candidate, cannot be null.
      Throws:
        `ActivitiObjectNotFoundException` - when the task or group doesn't exist.

    - #### deleteParticipantUser

          void deleteParticipantUser(String processInstanceId,
                                     String userId)

      Convenience shorthand for `deleteUserIdentityLink(String, String, String)`; with type `IdentityLinkType.CANDIDATE`
      Parameters:
        `processInstanceId` - id of the process instance, cannot be null.
        `userId` - id of the user to use as candidate, cannot be null.
      Throws:
        `ActivitiObjectNotFoundException` - when the task or user doesn't exist.

    - #### deleteParticipantGroup

          void deleteParticipantGroup(String processInstanceId,
                                      String groupId)

      Convenience shorthand for `deleteGroupIdentityLink(String, String, String)`; with type `IdentityLinkType.CANDIDATE`
      Parameters:
        `processInstanceId` - id of the process instance, cannot be null.
        `groupId` - id of the group to use as candidate, cannot be null.
      Throws:
        `ActivitiObjectNotFoundException` - when the task or group doesn't exist.

    - #### deleteUserIdentityLink

          void deleteUserIdentityLink(String processInstanceId,
                                      String userId,
                                      String identityLinkType)

      Removes the association between a user and a process instance for the given identityLinkType.
      Parameters:
        `processInstanceId` - id of the process instance, cannot be null.
        `userId` - id of the user involve, cannot be null.
        `identityLinkType` - type of identityLink, cannot be null (@see `IdentityLinkType`).
      Throws:
        `ActivitiObjectNotFoundException` - when the task or user doesn't exist.

    - #### deleteGroupIdentityLink

          void deleteGroupIdentityLink(String processInstanceId,
                                       String groupId,
                                       String identityLinkType)

      Removes the association between a group and a process instance for the given identityLinkType.
      Parameters:
        `processInstanceId` - id of the process instance, cannot be null.
        `groupId` - id of the group to involve, cannot be null.
        `identityLinkType` - type of identity, cannot be null (@see `IdentityLinkType`).
      Throws:
        `ActivitiObjectNotFoundException` - when the task or group doesn't exist.

    - #### getIdentityLinksForProcessInstance

          List<IdentityLink> getIdentityLinksForProcessInstance(String instanceId)

      Retrieves the `IdentityLink`s associated with the given process instance. Such an `IdentityLink` informs how a certain user is involved with a process instance.

    - #### getVariables

          Map<String,Object> getVariables(String executionId)

      All variables visible from the given execution scope (including parent scopes).
      Parameters:
        `executionId` - id of execution, cannot be null.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstances

          Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstances(String executionId)

      All variables visible from the given execution scope (including parent scopes).
      Parameters:
        `executionId` - id of execution, cannot be null.
      Returns:
        the variable instances or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstancesByExecutionIds

          List<org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstancesByExecutionIds(Set<String> executionIds)

      All variables visible from the given execution scope (including parent scopes).
      Parameters:
        `executionIds` - ids of execution, cannot be null.
      Returns:
        the variables.

    - #### getVariableInstances

          Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstances(String executionId,
                                                                                                        String locale,
                                                                                                        boolean withLocalizationFallback)

      All variables visible from the given execution scope (including parent scopes).
      Parameters:
        `executionId` - id of execution, cannot be null.
        `locale` - locale the variable name and description should be returned in (if available).
        `withLocalizationFallback` - When true localization will fallback to more general locales including the default locale of the JVM if the specified locale is not found.
      Returns:
        the variable instances or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariablesLocal

          Map<String,Object> getVariablesLocal(String executionId)

      All variable values that are defined in the execution scope, without taking outer scopes into account. If you have many task local variables and you only need a few, consider using `getVariablesLocal(String, Collection)` for better performance.
      Parameters:
        `executionId` - id of execution, cannot be null.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstancesLocal

          Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstancesLocal(String executionId)

      All variable values that are defined in the execution scope, without taking outer scopes into account. If you have many task local variables and you only need a few, consider using `getVariableInstancesLocal(String, Collection)` for better performance.
      Parameters:
        `executionId` - id of execution, cannot be null.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstancesLocal

          Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstancesLocal(String executionId,
                                                                                                             String locale,
                                                                                                             boolean withLocalizationFallback)

      All variable values that are defined in the execution scope, without taking outer scopes into account. If you have many task local variables and you only need a few, consider using `getVariableInstancesLocal(String, Collection)` for better performance.
      Parameters:
        `executionId` - id of execution, cannot be null.
        `locale` - locale the variable name and description should be returned in (if available).
        `withLocalizationFallback` - When true localization will fallback to more general locales including the default locale of the JVM if the specified locale is not found.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariables

          Map<String,Object> getVariables(String executionId,
                                          Collection<String> variableNames)

      The variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableNames` - the collection of variable names that should be retrieved.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstances

          Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstances(String executionId,
                                                                                                        Collection<String> variableNames)

      The variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableNames` - the collection of variable names that should be retrieved.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstances

          Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstances(String executionId,
                                                                                                        Collection<String> variableNames,
                                                                                                        String locale,
                                                                                                        boolean withLocalizationFallback)

      The variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes).
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableNames` - the collection of variable names that should be retrieved.
        `locale` - locale the variable name and description should be returned in (if available).
        `withLocalizationFallback` - When true localization will fallback to more general locales including the default locale of the JVM if the specified locale is not found.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariablesLocal

          Map<String,Object> getVariablesLocal(String executionId,
                                               Collection<String> variableNames)

      The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableNames` - the collection of variable names that should be retrieved.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstancesLocal

          Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstancesLocal(String executionId,
                                                                                                             Collection<String> variableNames)

      The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableNames` - the collection of variable names that should be retrieved.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstancesLocal

          Map<String,org.activiti.engine.impl.persistence.entity.VariableInstance> getVariableInstancesLocal(String executionId,
                                                                                                             Collection<String> variableNames,
                                                                                                             String locale,
                                                                                                             boolean withLocalizationFallback)

      The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes.
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableNames` - the collection of variable names that should be retrieved.
        `locale` - locale the variable name and description should be returned in (if available).
        `withLocalizationFallback` - When true localization will fallback to more general locales including the default locale of the JVM if the specified locale is not found.
      Returns:
        the variables or an empty map if no such variables are found.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariable

          Object getVariable(String executionId,
                             String variableName)

      The variable value. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableName` - name of variable, cannot be null.
      Returns:
        the variable value or null if the variable is undefined or the value of the variable is null.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstance

          org.activiti.engine.impl.persistence.entity.VariableInstance getVariableInstance(String executionId,
                                                                                           String variableName)

      The variable. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableName` - name of variable, cannot be null.
      Returns:
        the variable or null if the variable is undefined.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstance

          org.activiti.engine.impl.persistence.entity.VariableInstance getVariableInstance(String executionId,
                                                                                           String variableName,
                                                                                           String locale,
                                                                                           boolean withLocalizationFallback)

      The variable. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableName` - name of variable, cannot be null.
        `locale` - locale the variable name and description should be returned in (if available).
        `withLocalizationFallback` - When true localization will fallback to more general locales including the default locale of the JVM if the specified locale is not found.
      Returns:
        the variable or null if the variable is undefined.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariable

          <T> T getVariable(String executionId,
                            String variableName,
                            Class<T> variableClass)

      The variable value. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null. Throws ClassCastException when cannot cast variable to given class
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableName` - name of variable, cannot be null.
        `variableClass` - name of variable, cannot be null.
      Returns:
        the variable value or null if the variable is undefined or the value of the variable is null.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### hasVariable

          boolean hasVariable(String executionId,
                              String variableName)

      Check whether or not this execution has variable set with the given name, Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes).

    - #### getVariableLocal

          Object getVariableLocal(String executionId,
                                  String variableName)

      The variable value for an execution. Returns the value when the variable is set for the execution (and not searching parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.

    - #### getVariableInstanceLocal

          org.activiti.engine.impl.persistence.entity.VariableInstance getVariableInstanceLocal(String executionId,
                                                                                                String variableName)

      The variable for an execution. Returns the variable when it is set for the execution (and not searching parent scopes). Returns null when no variable is found with the given name or when the value is set to null.
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableName` - name of variable, cannot be null.
      Returns:
        the variable or null if the variable is undefined.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableInstanceLocal

          org.activiti.engine.impl.persistence.entity.VariableInstance getVariableInstanceLocal(String executionId,
                                                                                                String variableName,
                                                                                                String locale,
                                                                                                boolean withLocalizationFallback)

      The variable for an execution. Returns the variable when it is set for the execution (and not searching parent scopes). Returns null when no variable is found with the given name or when the value is set to null.
      Parameters:
        `executionId` - id of execution, cannot be null.
        `variableName` - name of variable, cannot be null.
        `locale` - locale the variable name and description should be returned in (if available).
        `withLocalizationFallback` - When true localization will fallback to more general locales including the default locale of the JVM if the specified locale is not found.
      Returns:
        the variable or null if the variable is undefined.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### getVariableLocal

          <T> T getVariableLocal(String executionId,
                                 String variableName,
                                 Class<T> variableClass)

      The variable value for an execution. Returns the value casted to given class when the variable is set for the execution (and not searching parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.

    - #### hasVariableLocal

          boolean hasVariableLocal(String executionId,
                                   String variableName)

      Check whether or not this execution has a local variable set with the given name.

    - #### setVariable

          void setVariable(String executionId,
                           String variableName,
                           Object value)

      Update or create a variable for an execution.

      The variable is set according to the algorithm as documented for `VariableScope.setVariable(String, Object)`.

      Parameters:
        `executionId` - id of execution to set variable in, cannot be null.
        `variableName` - name of variable to set, cannot be null.
        `value` - value to set. When null is passed, the variable is not removed, only it's value will be set to null.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.
      See Also:
        `{@link VariableScope#setVariable(String, Object)}`

    - #### setVariableLocal

          void setVariableLocal(String executionId,
                                String variableName,
                                Object value)

      Update or create a variable for an execution (not considering parent scopes). If the variable is not already existing, it will be created in the given execution.
      Parameters:
        `executionId` - id of execution to set variable in, cannot be null.
        `variableName` - name of variable to set, cannot be null.
        `value` - value to set. When null is passed, the variable is not removed, only it's value will be set to null.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### setVariables

          void setVariables(String executionId,
                            Map<String,? extends Object> variables)

      Update or create given variables for an execution (including parent scopes).

      Variables are set according to the algorithm as documented for `VariableScope.setVariables(Map)`, applied separately to each variable.

      Parameters:
        `executionId` - id of the execution, cannot be null.
        `variables` - map containing name (key) and value of variables, can be null.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.
      See Also:
        `{@link VariableScope#setVariables(Map)}`

    - #### setVariablesLocal

          void setVariablesLocal(String executionId,
                                 Map<String,? extends Object> variables)

      Update or create given variables for an execution (not considering parent scopes). If the variables are not already existing, it will be created in the given execution.
      Parameters:
        `executionId` - id of the execution, cannot be null.
        `variables` - map containing name (key) and value of variables, can be null.
      Throws:
        `ActivitiObjectNotFoundException` - when no execution is found for the given executionId.

    - #### removeVariable

          void removeVariable(String executionId,
                              String variableName)

      Removes a variable for an execution.
      Parameters:
        `executionId` - id of execution to remove variable in.
        `variableName` - name of variable to remove.

    - #### removeVariableLocal

          void removeVariableLocal(String executionId,
                                   String variableName)

      Removes a variable for an execution (not considering parent scopes).
      Parameters:
        `executionId` - id of execution to remove variable in.
        `variableName` - name of variable to remove.

    - #### removeVariables

          void removeVariables(String executionId,
                               Collection<String> variableNames)

      Removes variables for an execution.
      Parameters:
        `executionId` - id of execution to remove variable in.
        `variableNames` - collection containing name of variables to remove.

    - #### removeVariablesLocal

          void removeVariablesLocal(String executionId,
                                    Collection<String> variableNames)

      Remove variables for an execution (not considering parent scopes).
      Parameters:
        `executionId` - id of execution to remove variable in.
        `variableNames` - collection containing name of variables to remove.

    - #### createExecutionQuery

          ExecutionQuery createExecutionQuery()

      Creates a new `ExecutionQuery` instance, that can be used to query the executions and process instances.

    - #### createNativeExecutionQuery

          NativeExecutionQuery createNativeExecutionQuery()

      creates a new `NativeExecutionQuery` to query `Execution`s by SQL directly

    - #### createProcessInstanceQuery

          ProcessInstanceQuery createProcessInstanceQuery()

      Creates a new `ProcessInstanceQuery` instance, that can be used to query process instances.

    - #### createNativeProcessInstanceQuery

          NativeProcessInstanceQuery createNativeProcessInstanceQuery()

      creates a new `NativeProcessInstanceQuery` to query `ProcessInstance`s by SQL directly

    - #### suspendProcessInstanceById

          void suspendProcessInstanceById(String processInstanceId)

      Suspends the process instance with the given id. If a process instance is in state suspended, activiti will not execute jobs (timers, messages) associated with this instance. If you have a process instance hierarchy, suspending one process instance form the hierarchy will not suspend other process instances form that hierarchy.
      Throws:
        `ActivitiObjectNotFoundException` - if no such processInstance can be found.
        `ActivitiException` - the process instance is already in state suspended.

    - #### activateProcessInstanceById

          void activateProcessInstanceById(String processInstanceId)

      Activates the process instance with the given id. If you have a process instance hierarchy, suspending one process instance form the hierarchy will not suspend other process instances form that hierarchy.
      Throws:
        `ActivitiObjectNotFoundException` - if no such processInstance can be found.
        `ActivitiException` - if the process instance is already in state active.

    - #### signalEventReceived

          void signalEventReceived(String signalName)

      Notifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to all executions waiting on the signal.

      NOTE: The waiting executions are notified synchronously.
      Parameters:
        `signalName` - the name of the signal event

    - #### signalEventReceivedWithTenantId

          void signalEventReceivedWithTenantId(String signalName,
                                               String tenantId)

      Similar to `signalEventReceived(String)`, but within the context of one tenant.

    - #### signalEventReceivedAsync

          void signalEventReceivedAsync(String signalName)

      Notifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to all executions waiting on the signal.

      Parameters:
        `signalName` - the name of the signal event

    - #### signalEventReceivedAsyncWithTenantId

          void signalEventReceivedAsyncWithTenantId(String signalName,
                                                    String tenantId)

      Similar to `signalEventReceivedAsync(String)`, but within the context of one tenant.

    - #### signalEventReceived

          void signalEventReceived(String signalName,
                                   Map<String,Object> processVariables)

      Notifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to all executions waiting on the signal.

      NOTE: The waiting executions are notified synchronously.
      Parameters:
        `signalName` - the name of the signal event
        `processVariables` - a map of variables added to the execution(s)

    - #### signalEventReceivedWithTenantId

          void signalEventReceivedWithTenantId(String signalName,
                                               Map<String,Object> processVariables,
                                               String tenantId)

      Similar to `#signalEventReceived(String, Map)`, but within the context of one tenant.

    - #### signalEventReceived

          void signalEventReceived(String signalName,
                                   String executionId)

      Notifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to a single execution, being the execution referenced by 'executionId'. The waiting execution is notified synchronously.
      Parameters:
        `signalName` - the name of the signal event
        `executionId` - the id of the execution to deliver the signal to
      Throws:
        `ActivitiObjectNotFoundException` - if no such execution exists.
        `ActivitiException` - if the execution has not subscribed to the signal.

    - #### signalEventReceived

          void signalEventReceived(String signalName,
                                   String executionId,
                                   Map<String,Object> processVariables)

      Notifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to a single execution, being the execution referenced by 'executionId'. The waiting execution is notified synchronously.
      Parameters:
        `signalName` - the name of the signal event
        `executionId` - the id of the execution to deliver the signal to
        `processVariables` - a map of variables added to the execution(s)
      Throws:
        `ActivitiObjectNotFoundException` - if no such execution exists.
        `ActivitiException` - if the execution has not subscribed to the signal

    - #### signalEventReceivedAsync

          void signalEventReceivedAsync(String signalName,
                                        String executionId)

      Notifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to a single execution, being the execution referenced by 'executionId'. The waiting execution is notified asynchronously.
      Parameters:
        `signalName` - the name of the signal event
        `executionId` - the id of the execution to deliver the signal to
      Throws:
        `ActivitiObjectNotFoundException` - if no such execution exists.
        `ActivitiException` - if the execution has not subscribed to the signal.

    - #### messageEventReceived

          void messageEventReceived(String messageName,
                                    String executionId)

      Notifies the process engine that a message event with name 'messageName' has been received and has been correlated to an execution with id 'executionId'. The waiting execution is notified synchronously.
      Parameters:
        `messageName` - the name of the message event
        `executionId` - the id of the execution to deliver the message to
      Throws:
        `ActivitiObjectNotFoundException` - if no such execution exists.
        `ActivitiException` - if the execution has not subscribed to the signal

    - #### messageEventReceived

          void messageEventReceived(String messageName,
                                    String executionId,
                                    Map<String,Object> processVariables)

      Notifies the process engine that a message event with the name 'messageName' has been received and has been correlated to an execution with id 'executionId'. The waiting execution is notified synchronously.

      Variables are set for the scope of the execution of the message event subscribed to the message name. For example:

    - The scope for an intermediate message event in the main process is that of the process instance
    - The scope for an intermediate message event in a subprocess is that of the subprocess
    - The scope for a boundary message event is that of the execution for the Activity the event is attached to

    Variables are set according to the algorithm as documented for `VariableScope.setVariables(Map)`, applied separately to each variable.

Parameters:
  `messageName` - the name of the message event
  `executionId` - the id of the execution to deliver the message to
  `processVariables` - a map of variables added to the execution
Throws:
  `ActivitiObjectNotFoundException` - if no such execution exists.
  `ActivitiException` - if the execution has not subscribed to the signal
See Also:
  `{@link VariableScope#setVariables(Map)}`

- #### messageEventReceivedAsync

      void messageEventReceivedAsync(String messageName,
                                     String executionId)

  Notifies the process engine that a message event with the name 'messageName' has been received and has been correlated to an execution with id 'executionId'. The waiting execution is notified asynchronously.
  Parameters:
    `messageName` - the name of the message event
    `executionId` - the id of the execution to deliver the message to
  Throws:
    `ActivitiObjectNotFoundException` - if no such execution exists.
    `ActivitiException` - if the execution has not subscribed to the signal

- #### addEventListener

      void addEventListener(ActivitiEventListener listenerToAdd)

  Adds an event-listener which will be notified of ALL events by the dispatcher.
  Parameters:
    `listenerToAdd` - the listener to add

- #### addEventListener

      void addEventListener(ActivitiEventListener listenerToAdd,
                            ActivitiEventType... types)

  Adds an event-listener which will only be notified when an event occurs, which type is in the given types.
  Parameters:
    `listenerToAdd` - the listener to add
    `types` - types of events the listener should be notified for

- #### removeEventListener

      void removeEventListener(ActivitiEventListener listenerToRemove)

  Removes the given listener from this dispatcher. The listener will no longer be notified, regardless of the type(s) it was registered for in the first place.
  Parameters:
    `listenerToRemove` - listener to remove

- #### dispatchEvent

      void dispatchEvent(ActivitiEvent event)

  Dispatches the given event to any listeners that are registered.
  Parameters:
    `event` - event to dispatch.
  Throws:
    `ActivitiException` - if an exception occurs when dispatching the event or when the `ActivitiEventDispatcher` is disabled.
    `ActivitiIllegalArgumentException` - when the given event is not suitable for dispatching.

- #### setProcessInstanceName

      void setProcessInstanceName(String processInstanceId,
                                  String name)

  Sets the name for the process instance with the given id.
  Parameters:
    `processInstanceId` - id of the process instance to update
    `name` - new name for the process instance
  Throws:
    `ActivitiObjectNotFoundException` - when the given process instance does not exist.

- #### getProcessInstanceEvents

      List<Event> getProcessInstanceEvents(String processInstanceId)

  The all events related to the given Process Instance.

- #### createProcessInstanceBuilder

      ProcessInstanceBuilder createProcessInstanceBuilder()

  Create a ProcessInstanceBuilder

Copyright © 2016 Alfresco. All rights reserved.