Overview execution listeners

Deprecated Java Core API v1 listeners will not be available in the next major release. Use Java Workflow API v2 listeners where available or script tasks to replace the functionality of v1 listeners. See Alternatives to API v1 listeners for examples.

  • FlushExecutionListener: This listener exists for a pure technical reason. When everything is executed in one transaction, data is not always flushed to the database in between. For example if you create assets in a workflow and right after that you want to add some relations, this will not work. The assets will not be detected by logic adding the relations and this will fail, unless you add this execution listener in between. For more information about transaction boundaries in a workflow please refer to the Flowable documentation and search for Transactions and Concurrency.
  • SendEscalationEventExecutionListener: Listener that triggers an escalation event. By default the escalation process is listening to these events to start it's execution. You can use this listener to trigger a escalation event yourself. It needs two input parameters:

    Field nameExpressionsMandatoryDescription
    taskIdNYThe ID of the task the escalation is for.

    The type of the escalation. This variable is used in the escalation process to determine which kind of escalation to execute.

    The default is mail so this is a optional parameter.

  • SetMembersExecutionListener: A listener to easily set members on the current workflow business item. It has three input fields:

    Field nameExpressionsMandatoryDescription
    userNamesYYA CSV of usernames you want to set a member for.
    roleNameYYThe name of the role. You can only specify one role to use at once.
    clearExistingNYIf true all existing members on the current business item will be deleted prior to adding new. If empty no clearing is performed.
  • SetActivityStreamListener: A listener capable of setting the filter which will be used to generate a activity stream. This listener is both a execution listener and a task listener. The filter it generates will be put in a local variable. This means, in the case of a usertask, the variable will only exist as long as the task exists. Outside of a user task, the variable will exist for the current execution only, meaning it will not be visible in super or sub process instances. You can decide for yourself if you want it to be used as a tasklistener or execution listener on user tasks.
    When the listener has been used, a user will be able to see a activity stream on the task bar. Also, when action mails are send, the configured activity stream can be included in the action mails for the current user task. There are a lot of configuration options which we will discuss next. Here is the list of all input fields. None of them are mandatory and if no input is provided, all changes since the start of the workflow on the current resource are listed.

    Field nameExpressionsMandatoryDescription
    userYNLimits to only show activities for the user with the given user name. Needs to be a username.
    roleYNFilter only the changes where the user, specified in the user parameter has a given role in. If no user is given, only the changes are returned performed by users having the given role.
    involvedUserYNOnly show activities where the given user is involved in/has a role in.
    involvedRoleYNFilter only the changes where the user, specified in the involvedUser parameters, has a given role in.
    startTimeEmptyNNThis will override the default: the start time is the beginning of the current workflow, meaning all activities since the beginning of time will be shown.
    startTaskNNThe task ID of the task to take as start timestamp to show activities for.
    startOnStatusChangeFromNNFill in the signifier of the status here if you want all activities to show since the latest status change from the given status.
    endTaskNNSets the end timestamp to the given task ID.
    resourceTypesNN Filter on the types to return the changes for. If empty or null, all resource types are taken into account.