Dynamic (SequentialParallel) "n" number of step approval workflow

  • 26 September 2017
  • 3 replies
  • 9 views

Hi Team,

 

I want to develope the approval process workflow which will have 'n' number of approval step (user will configure the approval steps). It may have n number of steps in sequence or in parallel with all users at each level should approve or anyone should approve option to proceed to next step.

 

For ex. If user configured the approval flow with 5 step approval, where level4 is in parallel.

 

 

Step         Level       Level Name                          Approver                    All Must Approve

 

 1              level 1     Business Approval              user1;user2                   True

 2              Level2     Compliance Approval        user3                                False

 3              Level3     Legal Approval                    user4                                True

 4              Level4     HR Approval                         user1;user2;user3        True

 5              Level4     Finance Approval                user5                                False

 

 

The approval steps will be dynamic and with any possible combination like, 5 steps in parallel and 2 in sequense. Any possible combination.

 

How can I develop the dynamic workflow for above requirement?

 

Thanks,

Prafull


3 replies

Badge +10

I can't see of any way of making what you described completely dynamic of the box.  I supose it might be possible that you could build some wizard that they would check off the steps required and programatically build the workflow on the fly using the design APIs.  However, that would be a big development effort to take that approach and almost certainly wouldn't end up being completely dynamic.  I've never done it and I'm not sure its even completely possible.

 

Personally I would see if that requirement could be changed or the different workflow patterns limited to a manageable n number.

 

 

Thanks Tin for looking into it.

 

I found the solution for this. This is not completely dynamic but yes we can loop for "n" number of levels, only thing is the parallel task needs to be fixed. like maximum 5 level should be in parallel.

 

I have created designer workflow where I am getting the number of loop after user selected the loop. I am iterating the loop for  number of loop. I am checking for current loop (Phase 1) how many are there in parallel. If there is only one level then calling a subworkflow (Series Approval  Workflow) which will complete the task for that level and returns the outcome. Then loop counter will be increased and it will check how many are there in parallel for phase 2 if it is greater than 1 then will call onther sub workflow (Parallel Approval workflow). Then again checking how many are ther in parallel for Phase 2. In this subworkflow I have branches like 2 in parallel, 3 in Parallel and 4 in Parallel. based on the tasks count it will proceed.

 

In this way I am able to accomplishe the logic atleast for 'n' number of loops and maximum 4 pahse in parallel.

 

Thanks,

Prafull

Helo Prafull,

 

I am very new to K2 but need to implement exact requiremnet that you did. Can you please share more detail or atleast some sort of screenshots so I can try from my end.

Reply