So I'm battling a timing issue with a flow that loads up a half dozen data stores after retrieving from a server connect.
On start of the server connect, I clear the data stores.
On success of the sc, I run a page flow to load all the data using startBatch and endBatch for each store with a repeat in between.
The result is that ~15% of the time, the data store is empty, OR has not been cleared and thus appends to the existing data, instead of replacing it.
I have resorted to my least favorite thing, a big ugly wait command before loading everything and this seems to be working.
As I understand it, actions within a flow are synchronous, except for the Run action. In other words, I can ask a Run action to clear data stores, but I can't be confident it has completed before adding new records. I could perhaps do a While loop that waits for the number of records from the sc to match the ds, but that seems like a hack.
So this request is to consider a synchronous Run action in page flows. An action that waits for its commands to complete before moving to the next action.
And despite this being a feature request, I'd love to hear other ideas on how to solve this in the current environment!