Scenario: 2 Recipients, 2 Approvals where Task step is part of a multi-step containing 2 server events
In this scenario, a task is sent to two recipients, namely Codi and Bob. They can either Approve or Reject the task, which completes when every recipient responds with Approve. The Task step is part of a multi-step configuration, where there is a Send Email step, followed by the Task step, followed by another Send Email step. This sequence is important to note, because the sequence in which the steps are defined will determine how the product will run through the steps when the workflow executes. The image below shows the setup of the multi-step:
If you want to know how to configure the task step for this scenario, skip ahead to How to configure the Task step.
The steps in the multi-step are:
1- Send Email step (Send Email - Task Assigned), where the server sends an email to Administrator before the tasks are created for each recipient
2 - Task step (Codi and Bob are recipients)
3 - Send Email step (Send Email - Task Completed), where the server sends an email to Administrator after each recipient completes their task)
At runtime, the steps will execute as follows:
1.1 - Send an email for the Send Email - Task Assigned step for the recipient Bob (because the server step is run for each recipient in the task)
1.2 - Send an email for the Send Email - Task Assigned step for the recipient Codi (because the server step is run for each recipient in the task)
2.1 - Assign a User Task to Codi
2.2 - Assign a User Task to Bob
(server waits for Bob or Codi to complete their task)
3.1 - When Codi completes her task, send an email for the Send Email - Task Completed step
3.2 - When Bob completes his task, send an email for the Send Email - Task Completed step
Task list behavior for Recipients
In the workflow, the task gets added to a multi-step along with two Send Email steps (Send Email - Task Assigned and Send Email - Task Completed).
The workflow starts and sends twoSend Email - Task Assigned emails to the Administrator( because a email is sent for each recipient in the User Task step. Then, as part of the user task step, the workflow sends a workflow task notification to each recipients. The task shows in the My Task section in Workspace (Desktop) for each of them because, at this stage, nobody has opened the task and it is available for everyone to open. Codi opens the task and takes ownership of it. This means that Codi takes one of the two available responses for the task. The task is still available for Bob and shows in his inbox.
Codi approves the task, and the workflow then sends the Send Email - Task Completed email to the Administrator. But the multi-step is not complete yet, because in the User Task configuration we configured the step to wait for all recipients to complete the task.
Bob opens the task and takes ownership of it. He takes the remaining task of the available responses. Bob approves the task, and the workflow then sends a second Send Email - Task Completed email to the Administrator. The workflow now continues down the Approved line because both 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 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 Management see Accessing Sites.
The workflow starts and sends the Send Email - Task Assigned email to the Administrator. An email is sent for each recipient, which means the first email event executes the same number of times that there are users assigned a task. This email confirms that tasks were assigned to Codi and Bob.
The workflow then sends a task notification to all recipients. Nobody has opened the task and it is available to both to action. The Status for all tasks is Available.
Codi opens the task and takes one of the two available responses for the task. Notice the status for Codi is Open. The task is still available for the Bob.
Codi actions and approves the task and her name no longer shows on the Task List. Notice that Bob's task is still open.
As soon as Codi approves the task the Send Email - Task Completed email gets sent to the Administrator. This email confirms that she completed the task.
Bob opens the task and takes the second and final available response. Notice the status for Bob is Open.
As soon as Bob approves the task the Send Email - Task Completed email gets sent to the Administrator. This email confirms that he completed the task.
This completes the requirement for two approved responses and 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 Codi and Bob approved the task.
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 Codiand Bob as recipients. For additional information, see Recipient tab. |
|
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 Consensus rule, see Task Result Rule - Consensus Scenario. |
Customized email subject
|
On the Send Email step, add the Task Participant Name to customize the Subject. For additional configuration information, see Context Browser and Workflow. |
When working with this type of scenario keep in mind the following considerations:
- When you select a task from your task list in 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. Two tasks can be completed because two responses are required to complete the task.
- 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..
- 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.
- Additional responses may cause multi-step events to execute events multiple times that occur after the task event. This means when you combine a Task step and server events in a Multi-Step, the server event (in this scenario the Send Email step) executes based on the number of recipients of the task. Two emails are sent to the Administrator, one for Codi and one for Bob.
-
At runtime, the steps within the multi-step executes from top to bottom, one after the other. If you have a combination of a User Task step and server events, the server events execute in serial for each recipient in the User Task step.
- If you assign tasks to groups and select to not resolve groups to individuals, the recipients within the group are not seen as individuals, which means the group is seen as one recipient. In this case, only one email would be sent for each Send Email event, and the task would complete when one person from the group actioned the task. To have two emails sent, you could use two groups as recipients, or a group and an individual. Note the impact on your recipient responses and any response rules you have specified in your task. For more scenarios on resolving or not resolving groups, see Scenario: 1 Recipient, 1 Group, 2 Responses, 2 Approved Actions - Do not resolve group to individuals and Scenario: 1 Recipient, 1 Group, 2 Responses, 2 Approved Actions - Resolve group to individuals.