> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/workflows/designing-workflows/processes/process-execution/listeners/overview-of-task-listeners.md).

# Overview of task listeners

{% hint style="danger" %}
Deprecated Java Core API v1 listeners will be discontinued in the near future for improved stability and security. Use Java Workflow API v2 listeners where available or script tasks to replace the functionality of v1 listeners. See [Alternatives to API v1 listeners](/workflows/designing-workflows/processes/process-execution/listeners/alternatives-to-api-v1-listeners.md) for examples.
{% endhint %}

* **ActionMailSender**: Sends workflow action emails for the task that this task listener is configured for. Only simple tasks are possible without required form input except buttons.

  | Field name            | Mandatory                         | Description                                                                                                                                                                               |
  | --------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | template              | N                                 | The name of the template that should be used to generate the email.                                                                                                                       |
  | section               | N                                 | The name of the section that should be used to generate the mail.                                                                                                                         |
  | grouped               | Y                                 | The option to send the action mail grouped or not, by default this option is *false*.                                                                                                     |
  | subject               | Y                                 | The subject of the action mail to be send for non-grouped email.                                                                                                                          |
  | executeIfTrue         | Y                                 | The option to send the action email (*true*) or not (*false*).                                                                                                                            |
  | includeActivityStream | Y                                 | The option to include the activity stream in the email (*true*) or not (*false*)                                                                                                          |
  | includeAttributes     | Y                                 | The option to include the attributes in the email (*true*) or not (*false*).                                                                                                              |
  | includeRelations      | Y                                 | The option to include the relations in the email (*true*) or not (*false*).                                                                                                               |
  | relationTypes         | only if includeRelations is true  | <p>A comma separated list of relation types to be shown in the email.</p><p>If the file is empty, all relation types corresponding to the matching assignment groups are displayed.</p>   |
  | attributeTypes        | only in includeAttributes is true | <p>A comma separated list of attribute types to be shown in the email.</p><p>If the file is empty, all attribute types corresponding to the matching assignment groups are displayed.</p> |
* **CheckMandatoryFieldCombinationTaskListener**: Checks if the configured combination of form property input fields have at least one value field filled in. If not a error message will be shown to the user.

  | Field name | Expressions | Mandatory | Description                                              |
  | ---------- | ----------- | --------- | -------------------------------------------------------- |
  | formFields | N           | Y         | A CSV of form property ids to do the mandatory check on. |
* **SetFormSubtitleTaskListener**: This sets a given string value as the subtitle for the form to be displayed on the task. With this you can tweak the form presented to the user with custom subtitles.

  | Field name | Expressions | Mandatory | Description                            |
  | ---------- | ----------- | --------- | -------------------------------------- |
  | subtitle   | Y           | Y         | The string value for the form subtitle |
* **SetRoleResourceTaskListener**: This provides the possibility to override the business item that is used to determine the users with given roles scoped for a certain task. Useful when you want to evaluate candidate user expression against another resource than the current workflow business item. Keep in mind that this can make the candidate user check fail as it will only check on the current business item and will not take this listener into account. When using this listener disable the check on the workflow configuration page.

  | Field name   | Expressions | Mandatory | Description                                                          |
  | ------------ | ----------- | --------- | -------------------------------------------------------------------- |
  | resourceId   | Y           | Y         | The id of the new resource                                           |
  | resourceType | Y           | Y         | The String representation of the new resource type e.g. TE for term. |
* **SetValueTaskListener**: Sets a variable in the workflow context. It can be used to evaluate expressions or user expressions and store the parsed value in a task LOCAL variable. This means as soon as you exit the current user task, the variable will not be available anymore.

  | Field name       | Expressions | Mandatory                                        | Description                                               |
  | ---------------- | ----------- | ------------------------------------------------ | --------------------------------------------------------- |
  | valuesExpression | Y           | <p>Y</p><p>(if userExpression is not used)</p>   | An expression that will be evaluated.                     |
  | userExpression   | Y           | <p>Y</p><p>(if valuesExpression is not used)</p> | User expressions that you want to have evaluated.         |
  | resultVariable   | N           | Y                                                | The name of the variable for the result to be restored in |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.collibra.com/workflows/designing-workflows/processes/process-execution/listeners/overview-of-task-listeners.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
