I have a list of items. Each item in the list needs verification. I'm trying to query the list and put each item through a For Each action and kick off an Assign Flexi Task for each item. Works fine except its in series. So the first item has to be approved/rejected before the second items notification is sent out and so on. How do I do this in parallel so a notification goes out for each item in the list at the same time. Basically in parallel.
I could use a Web Call Service in the For Each loop which kicks off a seperate workflow that has the Assign Flexi Task in it. Then for each item in the list a seperate instance of the Assign Flexi Task workflow will kick off. But I was trying to accomplish this with one workflow.
Keep the site workflow and use the query and for each like are doing. But instead of creating a task in the loop, have it start a workflow on the list item.
To do this, create a list workflow that is set to start manually, not on item creation. In this workflow, provide the flexi task and any other logic necessary.
Back in the site workflow, just have it start the list workflow using the Start a Workflow action, **and make sure you set, do not wait for workflow completion. This way your site workflow will start the approval for all items in a relatively "parallel" experience. Plus there are numerous other benefits to this process and in the end, you only created two workflows to manage.
I agree with Andrew Glasser, for sure the site workflow start maybe multiple list workflow instances but as i read you need multiple tasks (one for each list item). So whats the problem with multiple list workflows?
The only other way is to collect all data with the list query and assign a task for all assignments with all collected data at the same time. For that you can build an table for the email content. I found a very good post here http://www.sharepointpub.com/formatting-a-table-from-collection-variables-nintex-workflow/
Thanks Andrew. I did try using a Start Workflow action on my Site Workflow. The problem is you do not see the list workflows from the dropdown on that action. If you drop a Start Workflow action on a list workflow you see everthing in the dropdown (Site workflows, list workflows, etc...)
Am I missing something?
Nope, my mistake, that is an expected behavior. You will need to start the workflow using the Call a Web Service action.
And use the method StartWorkflowOnListItem
You could also put a workflow on the list that contains the items and have it run each time the item is created or modified. This would not cause them to run in the sense of a "batch" but rather, at time of creation or modification you know they would then go through an approval process. This is just a suggestion that may or may not be applicable to your current process.