AnsweredAssumed Answered

AND condition on candidateGroup?

Question asked by petter.f on Nov 7, 2012
Latest reply on Nov 13, 2012 by jbarrez
Hi all,

I need some assistance in how to achieve AND conditions on groups. Our business requirements are basically that in some cases it is enough that the user has one of the stated groups (as in activiti:candidateGroups), in some cases they need to belong to both. As far as my understanding of Activiti goes, there is currently no support for this? I guess implementing this would require at least a notion of the AND-condition in the activiti:candidateGroups specification, either by using e.g. "&group1"/"|group1", or by introducing a new function like candidateGroupsInclusive() or similar….

I really need to achieve this in the short term so any pointers as to where to begin to implement this by myself would be appreciated. I did start to look into simply patching selectTaskByQueryCriteriaSql section of Task.xml but realized that the actual process definition needs to express the AND/OR conditions on multiple groups…..I'm currently thinking about parsing the actual group names to retrieve an & or | character and then build the query accordingly but then again a more general solution that takes grouped conditions into account (like "(group1&group2)|group3") would be much more sustainable in the long run.

Hope I got my needs explained, if anyone has one pointers about how to go about this, I would be thrilled.