four-eyes principle

157 views
Skip to first unread message

Peter Metz

unread,
Jan 8, 2015, 4:32:59 AM1/8/15
to camunda-...@googlegroups.com
Hello, 

is it possible to use dynamic list of candidate users to realize the four-eyes principle - or any similar approach?

Usually you have in the BPMNsomething like 
<bpmn2:userTask id="UserTask_1" camunda:candidateUsers="peter, #{initiator}">

What I'm think about is explained with this example pseudo code, scope is UserTask_2 :
candidateUsers = #{GROUPS.APPROVER.getUsers() - UserTask_1.assignee.getUser()}

Of course it's possible to design it with BPMN, but this will blow up the diagram. And usually the four-eyes principle is used within same group (users having same role -> tasks are in the same BPMN lane).

Thanks, Best, 

Peter

thorben....@camunda.com

unread,
Jan 12, 2015, 5:12:09 AM1/12/15
to camunda-...@googlegroups.com
Hi Peter,

A similar question was discussed in [1]. In general, you can use expressions for the candidateUsers attribute of a user task. To get all users assigned to a group, you can use the IdentityService. To get the id of the user who completed the previous task, you could either query the history or add a task listener to the first task. The latter requires some coding but should have better performance. I'm not sure if you can express the entire logic in a plain EL expression but you can externalize that logic into a bean and call that from the expression.

Cheers,
Thorben

[1] https://groups.google.com/forum/#!msg/camunda-bpm-users/3fR1QfKGL0Q/y4UDUjMa1VUJ

Peter Metz

unread,
Jan 14, 2015, 3:07:48 AM1/14/15
to camunda-...@googlegroups.com
Hi Thorben, thanks a lot!
Peter
Reply all
Reply to author
Forward
0 new messages