cancel
Showing results for 
Search instead for 
Did you mean: 

Need to create a workflow with dynamic level of approvers

chimu
Champ in-the-making
Champ in-the-making
We are creating a work-flow in which a submitted form-data needs to be approved by dynamic number of people based on the designation of user who submitted it. So if U1 has submitted a
form and there are 3 levels in between, before it goes to final approver U5, the workflow
should route it to U2 , U3 and U4 in sequence before it goes to U5. Now if U4 submits the form then it directly goes to U5 for final approval. So the number of approvers are decided by two factors 1) Designation on Submitter and 2) No of levels in between Submitter and Final approver.
The designation and id of Final approver(for a given submitter) is decided by companies policy and hierarchy. So if companies policy states that for a UnitManager the final approver has to be DepartmentManager, then the workflow should pass through all the levels in between and then reach the DepartmentManager.
How can we model such flow in Activiti. So far I have only modelled for fixed number of User tasks between start and finish. Do we need a looping over here ? So we create only 1 user task for approver and loop back to it for every approval until we reach the final approver ??
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Take a look at multi-instance characteristics (http://activiti.org/userguide/index.html#bpmnMultiInstance). This allows you to repeat a certain task for a number of time (either sequential or parallel) and have it stop at any time (even if the "number of instances" has not yet been reached) by using the completionCondition.