Been dealing with this bug for months - Race condition?

schedule a single backend wf with inputs:

  • the list that you are currently using for the schedule wf on a list (let’s call it listA)
  • an index (use 1 on the first schedule)
  • a list of things of the type you want to add. make it optional, it will keep the result of the previous iterations (let’s call it listB)

add a condition on the wf to run only if index is minor or equal listA count

in the wf call the action that returns yes or no, you can access the current iteration thing with listA item# index, then:

  • if the index is minor or equal to listA count and the prev action’s result is yes schedule the same workflow with same listA, index +1, listB plus item current iteration’s thing
  • if the index is minor or equal to listA count and the prev action’s result is no schedule the same workflow with same listA, index +1, same listB
  • if the index is more than listA count set the value of the list to listB

!!!WARNING!!!
it is very easy to create an infinite recursion if not setting the conditions properly. at the very least set infinite recursion protection

it’s probably a better idea to modify the plugin that checks the value returning yes/no to check the whole list in one go and return a list of things, so that you can after set the list with a single wf.

3 Likes