Roles Management

Please can you let me know if and how to manage the following usecases in Camunda:

Use Case 1: A task is send to a “Seller 1 Role”; The person in the Seller 1 Role is say a user named Joe. Now Joe should get this task. But then Joe goes on leave and the “Seller 1 Role” is given to the Bob. Will Bob automatically get all the tasks that were with Joe in the Seller 1 Role?

Use Case 2: Joe and Bob work in 2 shifts. Will both of them get the task if they are both in Seller 1 Role?

Use Case 3: Joe and Bob work in 2 shifts but as a company policy Joe can see the task between 9 AM - 5 PM and Bob from 5 PM to 10 PM. Both are in the Seller 1 Role and the task was sent to the Seller 1 role

Hi Sumit,
This section on task assignment may be of use…

I would suggest you think of Role as representing a group of individuals and an individual must take ownership of a task before it can be worked on. In Camunda, tasks can be assigned to groups or individuals. Tasklist filters can be used to show only those tasks in my groups and/or the tasks I currently own.

A common workflow pattern is the pull model where tasks are assigned to a group and individuals pull tasks from a common queue to work on. This results in a set of unclaimed tasks which can only be accessed by individuals withing that group (role). Hence its a shared queue of outstanding tasks. When one of these individuals has capacity, they claim a task from this set and thus take ownership of it so it can no longer be claimed by anyone else in the group. The intent is that individual now has exclusive access to the task in order to complete it. If this person went on leave with outstanding tasks they have claimed, then these tasks would need to be reassigned (via elevated privilege) to another person or back to the shared queue. Typically a worker who has incomplete tasks should relinquish these tasks before they go on a prolonged absence.

Its possble to implement process rules to implement a push model such that tasks are directly assigned to individuals. Hence you could implement your use-case 3 this way. But IMHO, thats an anti-pattern and quite brittle…

regards

Rob

Thanks Rob. So if I understand you, you are suggesting that in all cases, the task is really residing with a user and not with a Role? How do you solve the following use cases:

  1. A person going on Short Leave: The person was supposed to be in office today but his cat got sick.
  2. A person going on Long Leave/Or say permanently leaves the company: Before going on leave; he as supposed to assign his task to the relieving officer.

If the above two events happen too frequently and the company is looking at automating this and not be dependent on a super user to reassign the task. How will that be done?

Hi,

you are suggesting that in all cases, the task is really residing with a user and not with a Role?

Not quite - Im suggesting that in the pull model, tasks are allocated to a group (role) such that access to take ownership of these tasks is restricted to that group. In this model a task is claimed by an individual when they are actually performing the task. ie they select the task from the common queue and take ownership to prevent others from concurrently duplicating the task effort.

The above works well where tasks can be completed within the work day. Your use case 1 suggests that a task may span 2 or more days. Use case 1 should be rare and thus cost of automation may not be worth it, thus supervisor can reassign the task. Likewise use-case 2 should be rare and hence manual supervisor intervention may be appropriate…

If you really need to automate this kind of reassignment, there are many potential mechanisms - eg interrupting events or signals whcih could be generated from an HR systems such as person left, person on sickleave etc…

Perhaps your real concern is SLA management? If thats the case, you could use interrupting timers to escalate, reassign etc…

regards

Rob

The use case that I am trying to solve requires that the tasks will be at a persons task-list may stay there for days at a time and sometimes months. Its not triggered by SLA management UC’s; even though the SLA management will also be part of the cycle.

With this in mind how would I manage a task that a person has as per the above 2 use cases.

Hi Sumit,

Ok for usecase 1 and 2, you need to tell the engine to relinquish tasks associated with a particular user… You could easily add your own process to do this like below;

You could use the runtime or Rest APIs to implement this admin process. Heres a link to the REST API for querying, you can see there is an assignee filter parameter. Here’s a link to the unclaim API. Likewise you can use the runtime APIs to assign to a different user.

Hence with this simple process in place, an admin user can enter an absent user’s username and all their tasks will be moved as appropriate. In addition, if you had this process in place, you also have an API (eg start this process) such that you could integrate your HR system, Leave Management, Time and Attendance system to trigger this process thus not requiring additional admin interaction…

regards

Rob

2 Likes

Thank You.