◷ Reading Time: 8 minutes
- Single Participant
A Human Task assigns work to its participants and its owner. The assignment can be accomplished in different ways:
There are some common properties for both types of tasks, as well as some specific properties for each of them.
A Human Task has the properties shown below:
- Title: The title of a Task that defines the purpose of the Task.
- Description: A description of the task
- Category: Defines a category for the task in order to group these into relevant logical categories
- Display Name: A Display Name for the Task’s Title. That is used in the portal
- Condition: Under what circumstances the Task is available. If left empty this will always be available.
- Expression: The expression that will be executed upon leaving the Task
- Outcomes: Defines the available outcomes of the Task
- Name: Name of the outcome
- Display Name: Display name of the outcome
- Description: Text that describes a particular outcome of the task
- Condition: Circumstances under which the specific Outcome is available
- Copy Work To: Copies a Work object to a parameter to be used later in the Workflow model
- Copy Outcome To: Copies the outcome of a task to a parameter to be used later in the Workflow model
- Owner: Assigns the ownership of the Task
A Human Task must define outcomes. To define the outcomes of a Task:
- Select the Task in the model
- In the Task’s Properties, find the Outcomes and click on the button:
Then you will see the Outcomes editor shown below:
Use the Add and Remove button to manage the outcomes.
When Outcomes are defined, there must be an outgoing transition for each of them. When the transition is selected, the Properties Window allows the association of the Outcome to a Transition:
A Single Participant Human Task allows the interaction of an individual with a system in a long-running transaction.
An example of a Single Participant Human Task is shown below:
In the above Workflow, the Test Task will be assigned to a User (Participant).
To set up a Single Participant Task, the properties below must be defined:
- Title (mandatory)
- Outcomes (at least one)
- Owner (optional)
The Single Participant Task has two behaviors, depending on whether or not the Owner is set.
When execution reaches a Single Participant Task that has Owner information, Workflow creates a Work Item and assigns it to the Owner of the task. Therefore during execution, the Owner of the Task will receive a Work Item in order to carry on with the list of Outcomes that require selection.
When the Single Participant Task is used without the Owner, it does not create a Work Item. Therefore only Outcomes need to be passed during execution.
A Multi Participant Task assigns Work Items to all Participants simultaneously, therefore the Work Item is visible and ready to be acted upon by all the Participants of the task at the same time. Ownership of a Multi Participant Task does not change the runtime behavior of the Task, and it is just metadata when the task is executing.
In a Multi Participant Task, the list of Participants must be chosen. Choosing the Participants of the task can be either manual and static or dynamically based on some criteria at runtime.
When a Task is selected, the Participants can be managed in the Properties Window in the Users section:
The Task can have multiple participants that work together on the task.
The Unique Name is the actor identifier. The Workflow engine will resolve the Participant against a Directory Service at Runtime by using this identifier (Unique Name).
The properties of a Participant are shown below:
- General (all metadata information)
- Email: Email of participant
- First name: Actors name
- Last name: Actors family name
- Unique Name: The name that is used to identify the participant (i.e., Login, Email, etc.), depending on the Directory Service used.
- Weight: This value is used in a Weighted voting interaction policy.
- Dynamic List: indicates whether or not the value of the Unique Name is used as an expression. The default is false.
In a Multi Participant Task, all of the participants are working on the outcome of a Task together. The Interaction section allows the definition of behavior regarding how the Participants can influence the Outcome of the Task.
The Interaction properties are:
- Type: Sets the task to Single or Multi-Participant mode
- Policy: Indicates when the Task is completed in a Multi-Participant Task, so the Workflow can transition to the next step.
- All Responses: All participants must respond to the Task. Completing the Task does not imply any Outcome for the Task.
- First Response: First participant response to the work will complete the work with the selected outcome. The remainder of the participant responses will not be required.
- Majority Vote: Based on the outcome selected by the participant, the outcome of the work will be decided. The Participant’s Weight has no effect on the result.
- Vote: This is a voting policy that is similar to Majority Vote, but the conclusion percentage threshold can be customized.
- Weighted Voting: This is similar to Majority Vote but each participant’s Weight will be considered in order to conclude the outcome of the work expectation.
- Minimum Threshold: When the Policy is set to Vote, this value determines a result from the votes. This is a number between 0 and 1 that specifies the percentage.
When a Task is completed, the Outcome of the Task and the Work reference can be copied to Parameters.
The Participants and the Owner of a Task can be selected at the design (modeling) time, or they can be dynamically chosen at runtime based on some other criteria. The Activity called Identity Selector allows a Directory Service to be queried at runtime, retrieving a list of relevant Participants based on Role or Name.
In the above process:
A. The decision selects the appropriate Roles to make a decision (i.e., roles that can approve a budget based on the value amount, region, etc.)
B. The Identity Selector queries the Directory Service to retrieve the list of actors based on their determined Roles
For more details, have a look at Identity Selector.
With a combination of Dynamic Actors, complex Loop and Identity Selector behaviors can be modeled in the Workflow for Task Assignment (i.e., Work Item).
- Sequential: A list of Actors to whom Work will be passed one-by-one
- Parallel: A list of actors who all take action on Work
- Sequence of Parallels: A collection of groups of Actors in which each group completes a Task and then Passes to the next group. Within each group are individuals that work on the Task in parallel. Between groups, Work is assigned sequentially.