I'm hoping someone may have an idea for this issue.
I have a workflow that calls a DistributeOneToMany Child Workflow create Projects and the copy data from an Opportunity to the created Project. However, they need to update a temporary lookup field (to allow copying of some other Opportunity child entity values to the correct project) and finish processing before the next one can do the same.
My problem is that all the child workflows created by the DistributeOneToMany tool execute at the same time. They all write to the temporary lookup field, even when I use "Wait Until" with a processing flag field. So basically all the child values that should be copied are dumped into one project, when they should be split amongst the X number of projects (anywhere from one to five projects get created).
If I can introduce a slightly different processing time to each generated child workflow, my logic seems to work fine. However, when they are triggered normally, it seems like they all plow right through the "Wait Until" field because they all try to lock it at the same time.
Any ideas on how to do a randomized wait at the start of a workflow (say between 0-60 seconds)? Or does anyone have another idea on how I can force the workflows to wait while each processes?
Thank you in advance!