Scenario: 6 Recipients, 1 Approve response and routing task based on a variable
In this scenario, a task is sent to Codi and the Finance group that has five people, namely Bob, Anthony, Blake, Mike, and Rick. They can either Approve or Reject the task, which completes when one of the recipients responds with Approve or when someone rejects the task.
If you want to know how to configure the task step for this scenario, skip ahead to How to configure the Task step.
If you want to know how to configure the rest of the workflow for this scenario, skip ahead to How to configure related steps in the workflow.
Task list behavior for Recipients
The workflow start after you complete and save the form.
In your workflow you configure the recipient rule to use the value in a variable to route the tasks to either Codi or the Finance Group. The Amount variable calculates values from a SmartObject and is the result of (Units x Cost). If the amount is 5000 or less, the task goes to Codi. If the amount is 5001 or more, the task goes to Finance.
In this scenario, the amount is 7500 which means the task is sent to all recipients of the Finance group. The task shows in the My Task section in K2 Workspace (Desktop) for each of them because, at this stage, nobody has opened the task and it is available for everyone to open.
Bob, who is a member of Finance, opens the task and takes ownership of it. He takes the first and only available response. In this scenario, you specified that only one response is needed which means that the task is no longer available for the remaining recipients (even though he has not yet actioned it).
Bob approves the task and the workflow continues because one recipients chose the Approve action.
The animation below illustrates the path from when the task is assigned to the recipients to when it completes.
To illustrate what happens in this scenario from an administrative perspective, you open the Task List in K2 Management. Here you're able to see how the task status changes as the recipients open and action the task. This is also a convenient way to track, test, and confirm the behavior of how you configured the scenario.For more information on how to access K2 Management see Accessing K2 Sites.
The workflow starts and sends a task to all the recipients. Nobody has opened the task and it is available to all. The Status for all tasks is Available.
Bob opens the task and takes the only available response for the task. Notice the status for Bob is Open and, for the remaining recipients, it is Allocated. In this scenario, you specified that only one response is required which means that the task is no longer available for the remaining recipients on their task lists.
Bob actions and approves the task which completes the requirement for one approved response. The task completes.
Select the Reports tab and scroll down to locate the All Instances section of the Process Overview report. Select the link for the task.
On the Process Instance Detail report, scroll down to locate the Activities section. Click the Task link.
In the Participants section of the Activities Instance Detail report, notice that Bob approved the task.
To view the value of the Amount variable, click the Data Audit link.
Notice the 7500.00 value in the Current Data section.
Configure the Task step for this scenario by matching your task with the examples:
Task Tab | Configuration Details |
---|---|
Task
|
On the Task tab add two actions: Approve and Reject. For additional information, see Task tab. |
On the Recipients tab add Codi and the Finance group as recipients. In the Recipients Rule section select Certain Recipients, based on a rule. For additional information, see Recipient tab. |
|
Recipients Rule
|
In the Rules Designer configure the following:
|
Task Result Rule | On the Result/Voting tab configure the following:
For additional configuration information, see Task Result Rule tab. For more information and scenario on First Response rule, see Task Results Rule - First Response Scenario. |
Configure the workflow steps for this scenario by matching yours with the examples:
Step | Configuration Details |
---|---|
Start Step
|
On the Start step configure the following:
For additional information, see Start a Workflow with a Form. |
Expand the Context Browser and add the following variable:
For additional information, see Variables section in Fields. |
|
Set Variables
|
On the Set Variables step configure the following:
For additional information, see Set Variables step. |
This function calculates the value passed into the Amount variable using fields from a SmartObject. In this scenario, it's the sum of the Units field multiplied by the Cost field. Use the Smartfield Composer to configure the Formula function as follows:
For additional information, see Smartfield Composer. For more information on how to use the Sum function, see How To: Use the Sum function. |
When working with this type of scenario keep in mind the following considerations:
- When you select a task from your task list in K2 Workspace (Desktop), the status for the task changes from Available to Open. You take ownership of the task and it stays open in your name until you release, share, redirect, or action it. For more information see the Redirect, and Release scenarios.
- If you don't action an open a task, remember to release it so it is available for other recipients. For more information on how to release a task, see Release in the Task Action Bar section of the My Tasks topic.
- All recipients can redirect the task. Only one task can be completed because only one response is required
- When you redirect the task you no longer see it on your task list. The task shows on the other person's task list and they can action it. If one of the remaining recipients actions the task, it no longer shows on their task list.
- When you share a task, the task stays on your task list but also shows on the other person's task list. The first person to open the task can take action on it and the task is removed from the other person's task list.
- When you sleep a task, it pauses or suspends the task for a period of time. The task does not show on your task list until the time specified elapses. You have no option to release this task until the time has elapsed. The task is still open in your name as you are the owner of it.