How to design multiple approvers for application?

It is been almost year after I’m back to this forum :slight_smile: I did try to implement Camunda for a project a year before but didn’t happen and now I got another chance to take a stab at it.

I have a basic understanding of the workings of Camunda but the use case I currently have in my hand baffles me on how to represent it in the modeler to make it work and what is the best approach to do.

Let me explain the use case. I have 3 roles in my application Role-A, Role-B, Role-C. Any user in these roles can initiate the process, say, an application form.

Assume, there are 2 persons from each role are involved in creating the application form.
Role-A . ==> A1, A2
Role-B . ==> B1, B2
Role-C . ==> C1,C2

Let say A1 started the process and invited A2, B1, B2, C1, C2 to edit the application form. Now all 6 can edit the form as it has multiple sections in it. Users can save the application form as draft after their inputs.

Once the application is filled in completely any one of the users can submit the form for approval. Let say B1 submitted the form for approval. In this case, any one of the users from all the other groups has to approve only then the application is considered as approved.

B1 submits for approval, so, no need to get approval from any users from Role-B. The application has to be approved by anyone from Role-A that is A1 or A2 and from Role-C which is C1 or C2.

Similarly, if it is C1, then we need approval from (A1 or A2) and (B1 or B2).

How can I design a process model for this use case? Any help in this regard is much appreciated.

Thank you

Hi,

One way you could think about this is use a decision table (DMN) to determine the set of groups the approver must belong to. Then use this as the set of candidate groups for the approver user task.

Hence you process will be something like;

Start -> Rule Task -> Approve Task -> End

You rule task will require the group of the submitter, hence using the identity service you may be able to lookup their group. Your DMN decision table may then have a single column for the submitter’s group and an output column for candidate groups. Then using a collect hit policy, you should be able to configure three rules which will give you the desired output. This set of groups can then be used as candidate groups for the user task…

regards

Rob

P.S. the invoice example bundled with a distribution uses a similar technique. Some code can be found here…

Thank you @Webcyberrob

I’m a newbie to this space so I have to learn on how to build process with DMN tables and task as you have mentioned. Let me read through the documents and try building it and come back.

On additional note, What if I couldn’t figure it how to do this in modeller is it recommended to call external java service task to do this validation and come back with results? I understand we loose some configuration flexibility in bpmn process but is there any other disadvantages in external task validation approach?