Task Results Rule - Custom Voting Rule with Other Task Step Result
Use a custom voting rule when you need more complex logic, such as when a result must take into account decisions made on other task steps.
You can, for example in workflow that starts when a new employee joins a company, design parallel paths that must be completed by one group and another path that includes the final stopping point of the employee onboarding process. The employee receives a laptop and completes training. The IT department configures the employee's profile and issues their laptop. Training is presented by company department heads and follows a separate path.
The new employee cannot be issued a final certificate until the laptop is issued, even if they have completed all of their training. When everything is done, the employee receives a certificate of completion and the workflow ends.
To start this process, the employee completes an online form. This starts the workflow and tasks are sent to the IT department and to the trainers.
Only once the IT task Issue Laptop to User and all the training completes does the employee get a certificate. This scenario illustrates the connection between unrelated tasks and is controlled by the voting rule.
Example of the configured Custom Voting Rule with Task
- In this example, the custom voting rule is configured on the Training task. A Training Complete action is configured on the Task Detail tab.
- In this example, No Form is used.
- On the Recipients tab, add Ashley, Bob, and Gail as recipients. Remove the Originator. These three are responsible for the training sessions with the new employee.
- On the Task Result Rule tab, select Custom. Click Edit Voting Rule to open the Rules Designer.
- The voting rule is configured as follows:
- In this example, after the employee receives their laptop and when Ashley, Bob, and Gail complete the training, do they get a Training Complete Certificate email. Add an Email step and configure as shown below.
- Add an End step to add a visual indication of the end of the workflow.
- Deploy the workflow.
For more information on configuring the Task tab, see the Task tab topic.
For more information on configuring the Forms tab, see the Form tab topic.
For more information on configuring the Recipients tab, see the Recipients tab topic.
For more information on the Rules Designer, see the Rules Designer topic.
For more information on how to configure the Voting Rule, see the Custom - Edit Voting Rule section within the Task Result Rule tab topic.
For more information on configuring the Send Email step, see the Send Email step topic.
For more information on configuring the End step, see the End step topic.
For more information on deploying the workflow, see the Deploy a workflow topic.
- From K2 Management, select the Rights tab and make sure the Domain Users have the necessary rights.
- In this example, manually start the workflow as the Denallix Administrator. Select the Instances tab and manually start an instance of the workflow.
- Select the Task List tab. From here you can see the tasks are sent to IT (Operations) and the three trainers (Ashley, Bob, and Gail).
- The IT tasks appear on the worklists of members of the Operations group. The Training task appears on Ashley, Bob and Gail's worklists.
- Open Workspace for Sean (part of Operations group) and complete the Configure User Profile task. Notice on the Process Details Task List that the Configure User Profile task no longer appears. The Issue Laptop to User task still needs to be completed.
- Training with Ashley completed, but the new employee has not received their laptop. Open Workspace for Ashley (Sales Trainer) and complete the Training task. Notice on the Process Details Task List that the remaining tasks are Issue Laptop to User and the training tasks.
- This shows that the voting rule waits for all tasks to complete and then sends the certificate to the new employee. As specified in the rule on the Training task, it waits for the unrelated IT task (Issue Laptop to User) to complete.
- Open Workspace for Hubert (part of Operations group) and complete the Issue Laptop to User task. Notice on the Process Details Task List that the IT tasks are now complete. The only remaining tasks are the training tasks.
- Open Chad's (IT Manager) inbox to see the email. The IT Tasks completed successfully.
- Open Workspace for Bob and Gail and complete the Training task. Notice the training tasks are now complete, and no longer show on any training recipient's worklist.
- Open the Originator's inbox to see the email. Confirmation of completion email sent.