AnsweredAssumed Answered

Dynamic calculation of the number of groups members

Question asked by Aleksey Bykov on Feb 27, 2017
Latest reply on Feb 28, 2017 by Aleksey Bykov

For example, there are one exclusivegateway and two sequenceFlow.

 

...
<sequenceFlow id="flow1" sourceRef="exclusivegateway" targetRef="usertask1">   
   <conditionExpression xsi:type="tFormalExpression">       
      <![CDATA[${approveCount == N}]]>   
   </conditionExpression>
</sequenceFlow>

<sequenceFlow id="flow2" sourceRef="exclusivegateway" targetRef="usertask2">   
   <conditionExpression xsi:type="tFormalExpression">       
      <![CDATA[${approveCount < N}]]>   
   </conditionExpression>
</sequenceFlow>
...

 

Depending on conditions, executed one or the other task.

 

In business process I want to dynamically calculate the number N. This number is equal to the sum of all participants of the business process. (for example, I have two groups and the first group included 10 participants, the second group included 5. Then N must be equal to 15).

 

Is it possible in Activiti by using JavaScript to calculate the number of participants in these groups?..

 

I would be very grateful for the information. Thanks to all.

Outcomes