Defining task flows to create parallel to dos
Before you begin
Before you create an automated task process for parallel to dos, you must make a copy of the out-of-the-box com.bmc.dsm.task-lib:Task - Save Adhoc Task process in the Task Management Service library and set the scope of the copied process to Public so that the Call Activity element in the process for automated task template can use this process.
The following image shows the copied task:
In the Create Task Record process element, map the Task type parameter to the task type of the task record. If you don't map this value, manual tasks are created instead of parallel to dos.
Automated process
The following image shows the automated process that you can define to create to dos in parallel:
The following image shows the properties of the automated process. In the process, the Dynamic Data input variable consists of user IDs of the users to whom to dos are to be assigned.
Automated task process elements
The following process elements are used in this process:
- Get current task registry
- Get end user details
- Get to do task template
- Sub-process to add to dos
- Add to do task
- Get to do task registry
- Update task registry sequence
The following table describes the elements in the process:
Process element | Properties | Description |
---|---|---|
The Task ID for the Get current task registry is the ID of the current task. | ||
The Get end user details element fetches the IDs of the users to whom to dos will be assigned. In this example, qdu and qliu user IDs are added in the query expression. You can use a dynamic field to populate the user IDs. | ||
Set the to do task template as the input by specifying the record ID of the to do task template. The to do task template calls the sub-process that is run for every user that you define in the Get end user details process element. | ||
Set the Loop Type as Sequential for the sub-process. The sub-process is run for every user. | ||
When the sub-process runs, a to do task is created for each user, and is assigned to the user. The process uses the Record ID of the loop that is run for every user in the Assignee GUID. In this example, the process uses the record ID of the loop for the qdu user first to create and assign the to do. Then it uses the record ID of the loop of the qliu user. The following parameters are mapped from the task template:
| ||
The task ID is updated in the task registry. | ||
For the to dos to be created and activated parallelly, specify the sequence number of the automated task as the Sequence Number parameter. |
When this task flow is added to a case, an automated task is created that in turn creates the parallel tasks. The parallel to dos are assigned to the users, and the automated task is automatically marked as completed. After the users complete the to dos, any next task that is listed in the case are activated.