Voting Sub-Process

The Voting Sub-Process is a workflow that can be called by other workflows when users need to vote. It is used within other packaged workflows such as the Approval Process, the Simple Approval or the Issue Management workflow.

You can use this sub-process in new custom workflows. The result is a true or false boolean that is provided to the parent workflow.

Voting Sub-Process description

Roles

There are no specific roles assigned to this workflow.  A list of users identified as voting users is provided by the parent workflow. Each user votes regardless of their role.

Workflow initiator

This sub-process starts automatically as part of the parent workflow.

Workflow status transformations

No status transformations happen within this sub-process.

Voting Sub-Process walk-through

Diagram

User voting

The workflow presents each voting user with a new task to vote.

It contains a justification field and the options to approve or reject. If the addComments process variable is true, the workflow transforms any justification into a comment on the asset page.

The voting task expires after the time specified by the voteTimeoutDuration process variable and the workflow continues to a result without the vote.

Result

You can use the votingSuccess boolean process variable to pass the result to the parent workflow. If the sendActionEmail process variable is true, each voting user receives an email with the result of the vote.

Voting Sub-Process configuration

Access the workflow configuration via SettingsWorkflowsDefinitionsVoting Sub Process.

Description

This is a voting process used as sub-process in a wide range of processes. It is very configurable and is not intended to be used standalone. If you want to configure how voting is handled in the application, this is the process to configure.

Applies to

This workflow applies to assets.

Configuration Variables

You can edit the configuration variables directly from the workflow definition page by clicking in the upper-right corner of the variables table.

Variable Description Default value
names Email Template Names resultTemplate,reminderTemplate
defaults Defaults result,reminder
voteDueDate The due date expressed in duration for task 'vote'. B1M
voteTaskNotificationEnabled Send notification emails for task 'vote'. true

Start label

The start label is the name of the workflow when it is visible as a button on a resource page or in the drop-down list when you add it as a button on a dashboard. You can find the Start Label section in the upper-right corner of the workflow definition page.

Default value: Vote

Click Edit to edit the label.

Start event

A start event is an event that triggers the workflow, for example starting the workflow when an asset is created.

There is no packaged default value.

Roles

The roles define the permissions to manage the workflow. For example, if a certain tasks must be urgently executed but the responsible person is on sick leave, a user with the defined role can reassign that task to somebody else.

You do not have to define any roles to start the workflow for this sub-process.

Action Roles
Start workflow
The button with the start label is available to users with these roles.
There is no packaged default value.
Stop workflow
The option to cancel the workflow is available to users with these roles.
  • Community Manager
  • Business Steward
Reassign tasks
The option to reassign the task is available to users with these roles.
  • Community Manager
  • Business Steward

Other

The settings in this section define global restrictions that apply to the workflow such as:

  • Accessibility to guest or logged in users.
  • Checking that the roles required by the workflow are not empty.
  • Preventing the same worflow or other workflows from running on the same resource.
  • Making the workflow available to be added to a dashboard.
Setting Enabled
Any guest user can start the workflow. No
Any signed in user can start the workflow. No
Perform candidate user check on workflow start. Yes
This workflow can only run once at the same time on a specific resource. Yes
Lock resource. No
Show in global create. No

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 packaged workflow is different from the rest because you define how the sub-process works through the parent workflow.

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

Most of the process variables are required but not readable. 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 Data Governance Center.

Call the Voting Sub-Process workflow

To use the Voting Sub-Process, edit the parent workflow with the Flowable BPMN 2.0 Designer and add a CallActivity to your diagram where you would like the voting to happen. Edit the Main config section of the call activity to set the values of the required process variables:

  • In the Called element field, use the process ID of the Voting Sub-Process.

    The packaged process ID of the Voting Sub-Process is votingSubProcess.

  • Create nine new Input parameters that have each one of the required process variables as Target.
  • Provide a value for the variables:
    • Use parent workflow variables in the Source field.
    • Use expressions in the Source expression field.

      Expressions are always written as ${ }.

    Source

    Source expression

    Target

    voterUserExpression voterUserExpression
     ${false}addComments
     ${"Approve/Reject"}voteButtonLabel

You can call the Voting Sub-Process multiple times in the same parent workflow.

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.

Voting Sub-Process results

The main output of the Voting Sub-Process is the boolean process variable, votingSuccess. In the Main config section of the call activity, add a new Output parameter, where the Source is votingSuccess and the Target 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.

    [[name:John, approved:true, comment:Approved by Data Steward], [name:Mary, approved:false, comment:]]

  • voters: a list of the names of all the voters.

    [John, Mary, Anita]