We have a main workflow that has a foreach and a switch inside it. The switch can start up to 1 child workflows, but it can iterate up 3 times throught the switch and start child workflows.
We are having alot of issues to make sure that the Nintex form is locked from edit mode when workflows are still "In progress". The major issue is that all the child workflows gets started same time and once that happens the main workflow will become completed.
Since all the child workflows starts same time we cant really figure out a smooth way to solve this.
We are trying to use "Wait for item update" with the workflow status field so that once one of the child workflows are completed, it will iterate again to next child workflow, just to make sure that the workflows are not executed same time. But here is a stopper for us..,
We are having issues since the workflow status is a huge string with attributes and values, we have tried "Completed" and "5" as equal value inside the "Wait for item update" action but it doesnt work.
We have a workaround but its not a good one since we need to hide up 6 workflow status fields in the form to achieve it. So we are ignoring that right now and trying following:
Right now we have one field that contains the amount of workflows that will be executed in main workflow for example value "3".
So inside the child workflows we lower the numeric value for each time the workflows gets completed.
so basicly value 0 means that all workflows are completed, and the issue with this solution is that since the child workflows run same time there is a small chance that the minus numeric will be wrong. This solution requires only 1 field on the form instead of 6 fields(one for each workflow status).
Any tips are appreciated.
Solved! Go to Solution.
Your approach to "wait for item update" is correct, however I would rather use a text field that you have control over. How I see your solution is you have a for each that contains a switch. You want to pause the execution of the for each loop until the child workflow completes. Here is what I would do:
Hope this helps!
Thank you for the answer, we went with 6 fields solution beacuse it would take to much time for all the workflows to complete if they are not executed same time.
Hopefully your soltuion will work for us if the performance becomes better from the Nintex side.