1

I have a list that contains site provisioning tasks. One task per record like:

  1. create site
  2. apply template
  3. grant access

The records are added in this order by a PowerApps app. I added a flow to the list triggered by new items.

I've set the flow to allow single instance only and expected that the execution would follow the order of the items added.After a few tests, it seems that this is not the case.

Is there any option to process a SharePoint list with Flow in a given order?

  • So you want to: create in list new record for new site and after this: run 1 workflow, after this is done, run the 2. workflow, after this run the 3. workflow? right? – Zdeněk Vinduška Jan 16 at 13:30
  • No. I have one workflow and it does actions depending on a field value: switch (action=create site ... action = apply template ... etc) – vilmarci Jan 16 at 15:50
0

SharePoint workflows are triggered by a timer job on the back end. Workflows are put into a queue, so it does not mean you are going to get one before the other. A process in one might have taken 50ms longer than the one after and now gets moved back. I used to do this as a training point for workflows in SharePoint. I would make workflows that should trigger and send 1, 2, 3, 4. Majority of the time it would be 1, 3, 4, 2 or 2, 1 ,3, 4. You can try to use another field that you update at the end of the workflow that will trigger the second and the third. Than you should be able to have your order. The timer job runs every 5 minutes, and will queue up to 14 workflow task I believe (someone can correct me if I am wrong) per timer job instance. That is why sometimes it takes a few minutes for a workflow to fire. This is SharePoint, and this is how she behaves.

  • 1
    He is in online and use Flow. What you wrote is to complicated. – Zdeněk Vinduška Jan 16 at 13:32
  • Just explaining workflow services, and why workflows will not come out in the order expected unless you force them to by adding triggers. This answers why they are not in the order expected. I would also never assume what someone is using dictates their understanding or intelligence. – lazoDev Jan 16 at 13:35
  • "You can try to use another field that you update at the end of the workflow that will trigger the second and the third." This is not my case. I only have one flow that is triggered by adding a new item to a list. – vilmarci Jan 17 at 10:06
  • you should break it up into two other workflows along with the original that will fire when your flags are triggered. Breakout the steps to ensure they fire when you want. – lazoDev Jan 17 at 11:52
  • Finally I ended up moving to a scheduled job that reads the whole list and added an "order" column that will force the correct order. – vilmarci Feb 5 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.