Dynamically changing bpmn approval process

I have an approval process, based on event_id we decide how many levels of approval are required. For example for event_id = 1 we need approval from 2 people in the manner if the amount is greater than 10000 then we need approval from A, if the amount is greater than 15000 then we need approval from B.
Similarly for event_id = 2, we need approval from 3 peoples in a similar fashion.
How to handle this in the BPMN.

I don’t want to create the BPMN from the scratch every time a new event_id appears.

Hi,

What about a model like this;

You could use a decision table to map event_Id to the number of approvers and possibly different approver groups. the output of the decision table can then be used by a multi-instance user task…

regards

Rob

This will work but in this process we won’t be able to classify which user is concern with approval based on salary.

Hi

not sure what you mean by

The multi-instance user task will create multiple instances of the user task. Each user task could be claimed by the same or different approvers. hence you could assign each task instance to a different group to force different users, or you could use listener code to enforce that all approvers are unique…

regards

Rob

Hi,
Basically it needs to be categoried based on salary, whenever we receive any event_id that tells about how many approvals are required and if salary is lets say X then user A is involved if salary is Y then user B is involved, similary for some other event_id we might need approval from A,B,C and salary classification will be mentioned there

Hi,

so do you have rules such as;

if event=x and salary >= n then approver is A
if event=y and salary >= m then approver is A
if event=y and salary >= m then approver is B

That being the case, you could build up your requirements from simple rules using a collect hit policy to get the set of approvers required. This set then feeds into the approve multi-instance task…

Have a look at this DMN collect hit policy

regards

Rob

Hi,

I have rules such as;

if event=x and for salary > 10000, approver is A, if salary > 15000 then approver is B
if event=y and salary > 10000, approver is X , if salary > 15000 then approver is Y if salary >20000 then approver is Z
Similary for any other event we might the approval from four people.
Need to handle this from BPMN.

Hi,

Attached is a DMN model which captures your rules. Note that it uses a collect hit policy so that multiple rules may match and thus the output is a list of approvers. As shown in the thread, you could feed the output of this decision table into a multi-instance user task…

You can drag and drop this DMN model to the Camunda DMN Simulator to see the decision in action…

Approvers.dmn (2.6 KB)

regards

Rob

Hi Rob,
Thanks for your Quick response. But something is wrong with the DMN that you share.

Please can you check it once.

Hi,

it works fine for me. In the simulator if I enetr X and 20000, I get A and B as approvers…

What makes you think something is wrong? (Note there are conditions where no rules will match…)

regards

Rob

Thanks Rob.