User Task
User tasks represent manual activities that require interaction from a user or a group of users. Each user task can be configured with various attributes, conditions, and privileges, making it adaptable for diverse operational scenarios. User tasks can be linked to forms, enriched with skill requirements, and have complex status management options.
Please note that there is also a manual task type in BPMN, which is a generic task that can be used for any manual activity. User tasks, on the other hand, are specifically designed for human interaction with the system. We do not use manual tasks in tSM processes.
Key Features
- Task Assignment: Specify the default user, user group, or set of authorized user groups.
- Skill-Based Matching: Define required skills for task assignment (WFM only)
- Status Management: Configure allowed statuses and transitions with associated conditions and privileges.
- Task Actions: Manage the lifecycle and status transitions using predefined or custom actions.
- Configuration Profile: Set up detailed configurations for user task characteristics and custom form specifications.
1. Task Assignment
Default User and User Group
User tasks can be assigned to a default user or a user group. This assignment can be defined directly within the process or dynamically assigned based on certain conditions. Additionally, task assignment can be modified during runtime based on user input or system triggers.
- Default User: The primary user responsible for the task upon creation.
- Default User Group: If no specific user is defined, the task is routed to the assigned group.
You can use SpEL expressions to dynamically assign the user. For example, to assign the first task to the creator of the order use #order.whoInserted
so they can complete a more complex input before continuing with the process.
Authorized User Groups
A list of authorized user groups can be defined for each task, specifying which groups are permitted to handle the task. This ensures that only eligible users can access and complete specific tasks.
Skill Requirements
In scenarios involving fieldwork or specialized operations, tasks can be configured with a set of skill requirements. These skills are sourced from the skill catalog defined in the Workforce Management (WFM) module. Only users possessing the specified skills are eligible for assignment.
Example Configuration:
<bpmn:userTask id="installDevice" name="Install device"
tsm:defaultUserGroup="Field.SouthBohemia" tsm:candidateUserGroups="Field"
tsm:skills="Install.CPE,Network.Setup"
tsm:color="#ceeed6"/>
2. Status Management
Task Statuses and Transitions
User tasks in tSM can have multiple statuses, each representing a stage in the task's lifecycle. Transitions define how a task can move between these statuses, including any conditions or privileges required to execute the transition.
Status Definition
Each status can have attributes such as display name, description, and an associated form for user interaction.
Example Status Configuration:
<tsm:status status="NEW">
<tsm:transition status="IN_PROGRESS" name="Start Task" description="Move task to In Progress" formKey="StartTaskForm" condition="#{user.hasRole('Engineer')}" hasAuthority="Task.Edit"/>
<tsm:transition status="CANCELLED" name="Cancel Task" description="Cancel the task" formKey="CancelForm" hasAuthority="Task.Cancel"/>
</tsm:status>
Status Transitions
Each transition can have the following properties:
- Condition: An expression evaluated to determine if the transition is allowed.
- Privileges: Specifies user roles or permissions required to perform the transition.
- Associated Form: Links a specific form to the transition for capturing user inputs.
3. Configuration Profile
Configuration profiles allow defining various characteristics of user tasks, such as custom attributes, user interface elements, and task-specific properties.
Task Characteristics
- Priority: Set the priority of the task, which influences its order in queues.
- Deadline: Define a deadline for the task, either as a fixed date or dynamically calculated.
- SLAs: Link the task to specific SLAs for tracking and reporting.
Form Specification
Each user task can be linked to a custom form defined using the tSM Form Designer. These forms can be used for capturing user inputs, displaying status information, or providing task-specific guidance.
Example Form Link:
<bpmn:userTask id="Task2" name="Review Document" camunda:formKey="ReviewForm"/>
4. Actions for Task Lifecycle and Status Transitions
Task Lifecycle Actions
Actions can be triggered at specific points in the task's lifecycle, such as when the task is created, assigned, or completed. These actions can include:
- Notifications: Send alerts to the assigned user or group.
- Integration: Call external systems via APIs.
- Logging: Record task details for auditing.
Status Transition Actions
For each status transition, actions can be defined to automate activities like:
- Start: Trigger a start event to initialize the task.
- Completion: Update linked entities or close associated tickets.
- Validation: Ensure all preconditions are met before the task moves to the next status.
Example Action Configuration:
<tsm:transition status="IN_PROGRESS" name="Start Task">
<tsm:statusListener expression="${logService.info('Task started', ticket.id)}" status="IN_PROGRESS"/>
</tsm:transition>
Conclusion
The tSM Process Engine - User Tasks module provides a robust framework for managing manual tasks within the overall workflow. With its advanced configuration options, it enables precise control over task assignment, skill matching, status management, and user interactions. This ensures that complex telecom workflows are efficiently managed, improving operational effectiveness and user productivity.