techyworld 0 Junior Poster in Training

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 User1 has submitted a form and there are 3 levels in between, before it goes to final approver Uuser5, the workflow should route it to User2 , User3 and User4 in sequence before it goes to User5. Now if User4 submits the form then it directly goes to User5 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. We have implemented a parameter form, where we defined the approver for each user for each level. 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 ??