> 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/out-of-the-box-workflows-walk-throughs/voting-sub-process/voting-sub-process-instructions.md).

# Voting Sub-Process instructions

The Voting Sub-Process is not a standalone workflow and you use it as part of a parent workflow. The configuration of this out-of-the-box workflow is different from the rest because you define how the sub-process works through the parent workflow.

The voting process collects approval and rejection votes from a predefined list of users. Each of the users defined in **voterUserExpression** is assigned a voting task that expires after the **voteTimeoutDuration** limit. The outcome stored in the **votingSuccess** variable depends on whether the approval votes meet the required **votePercentage** threshold. This is as a percentage of the total number of voters. If **earlyComplete** is enabled, voting stops as soon as the result becomes mathematically certain. Otherwise the voting continues until everybody voted or the voting tasks expire.

## Voting Sub-Process start form variables

The following process variables are available for the Voting Sub-Process:

| Id                      | Name                                                                     | Type    | Default                         | Required | Readable | Writable |
| ----------------------- | ------------------------------------------------------------------------ | ------- | ------------------------------- | -------- | -------- | -------- |
| decisionInfo            | Decision Info                                                            | string  |                                 | true     | true     | true     |
| voterUserExpression     | The user expression resulting to users required to vote                  | string  |                                 | true     | true     | true     |
| votePercentage          | The percentage of voters that are needed to approve (%)                  | long    | 50                              | true     | true     | true     |
| voteWarningTimeDuration | Time duration before a warning mail is send to vote                      | string  | B3D                             | true     | true     | true     |
| voteTimeoutDuration     | Time duration before the voting is stopped and the process continued     | string  | B5D                             | true     | true     | true     |
| addComments             | Add voting comments to resource                                          | boolean | false                           | true     | true     | true     |
| addCommentsToParent     | Provide the id if you want comments to be added to a parent comment      | string  |                                 | false    | true     | true     |
| earlyComplete           | Stop voting if votingPercentage is impossible to reach                   | boolean | false                           | true     | true     | true     |
| voteTaskName            | The name of the actual voting task                                       | string  |                                 | true     | true     | true     |
| sendActionEmail         | Send a mail to the users allowing completing the vote by sending a email | boolean | false                           | false    | true     | true     |
| resultTemplate          | Email template for sending voting result                                 | string  | result                          | false    | true     | true     |
| reminderTemplate        | Email template for sending voting reminder                               | string  | reminder                        | false    | true     | true     |
| names                   | Email Template Names                                                     | string  | resultTemplate,reminderTemplate | true     | false    | true     |
| defaults                | Defaults                                                                 | string  | result,reminder                 | true     | false    | true     |

Most of the process variables are required. You must provide a value for all required variables when calling the Voting Sub-Process from the parent workflow because the workflow cannot use the defaults, except for **names** and **defaults**, which you can configure on the workflow definition page in Collibra.

## Call the Voting Sub-Process workflow

To use the Voting Sub-Process, edit the parent workflow with the Workflow Designer and [add a **Call activity**](/workflows/designing-workflows/processes/shape-repository/call-activity.md) to your diagram where you would like the voting to happen. Edit the properties of the call activity to set the values of the required process variables:

* In the **Process reference** field, link to the Voting Sub-Process.

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>The out-of-the-box key of the Voting Sub-Process is <strong>votingSubProcess</strong>.</p></div>
* Create nine new **In** variable mappings that have each one of the required process variables as **Target variables**.
* Provide a value for the variables:
  * Use parent workflow variables in the **Source variable** field.
  * Use expressions in the **Source Expression** field.

    <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Expressions are always written as <code>${ }</code>.</p></div>

{% hint style="success" %}
You can call the Voting Sub-Process multiple times in the same parent workflow.
{% endhint %}

{% hint style="info" %}
Although the Voting Sub-Process is restricted to assets, you can use it in a parent workflow that has other or no restrictions. Voters can only add comments when the parent workflow refers to a community, domain or asset, but the voting can work without comments even as part of a global workflow.
{% endhint %}

## Voting Sub-Process results

The main output of the Voting Sub-Process is the boolean process variable, **votingSuccess**. In the **Variable mapping** section of the call activity, add a new **Out** mapping, where the **Source variable** is **votingSuccess** and the **Target variable** is a process variable of the parent workflow. You can then use the value of that variable to route the parent workflow based on the outcome of the voting.

You can map any additional process variables of the Voting Sub-Process to an output variable such as:

* **votingResult**: a list of arrays containing the names the approval statuses and the comments of the participants.
* **voters**: a list of the names of all the voters.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.collibra.com/workflows/out-of-the-box-workflows-walk-throughs/voting-sub-process/voting-sub-process-instructions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
