cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning human tasks based on domains

udaya1
Champ in-the-making
Champ in-the-making
Activiti assigns human tasks to user, group or both. But I have a need to further filter the assignment by another dimension say geography. How could that be achieved?

e.g. Sales quote approvals should always go to SalesManager group for approval. But those from east should go to SalesManager1 and from west to SalesManager2.. please note that the number of such geographical cells could be running into few hundreds if not thousands.

Such mappings are against the user profile in user table.

station1 - sm1
station2 - sm10
station3 - sm5
….

station 456 - sm634


Should there be thousands of human tasks created and each assigned to a specific user/user subgroup? sounds a cumbersome / inefficient way of doing it.
3 REPLIES 3

trademak
Star Contributor
Star Contributor
The assignment can be based on an expression, so it would be possible to implement an expression that looks up the correct user or group based on the process variables.

Best regards,

udaya1
Champ in-the-making
Champ in-the-making
ok. Can you please share if there would be as many tasks as stations or one task and for the process instance the group is assigned to the task based on station?

Is there some example somewhere I can refer to?

jbarrez
Star Contributor
Star Contributor
That is all up to you. As Tijs says, you can use arbitrary expressions in the assignee/group configuration, and thus delegate your own custom logic to determine what data you use for assignment.