Workflow order of execution is messed up

I have a 4 actions workflow that needs to be executed respecting the order but that is not the case.

The first and last actions are simply a “Display data” action that sends a string to a reusable element. According to the content of the string, the reusable will display the proper icon (loading or success).

The 2 actions in the middle are triggers for Custom Workflows that run each a different SQL query.

My problem is that when the workflow is launched (blue square), it seems that action #2 happens before the “Show LOADER (load)” since the loading icon appears once the whole process is almost done.

I could’ve fired the “Show LOADER (load)” action through a scheduled workflow, but the reusable element is in a repeating group, so no way to manipulate it from a custom workflow.

Anyone can help?

Try breaking up the workflow into 2 separate workflows, with workflow #1 scheduling wf#3 after 0.2 seconds.

Hi @robert, I did try to separate it in 2 workflows (both triggered when the input’s value has changed), but it makes things worse: the loading icon appears after the success one.

Scheduling the custom workflows means that I won’t know when they’re done, so I won’t know when to hide the load icon and display the success one.

Don’t trigger them simultaneously. Have the end of the first workflow then trigger the second (schedule with a slight delay).

The thing with scheduled workflow is that I can’t know when it’s done. I need that information

OK I see now. I am assuming each query is taking different lengths of time to complete. Tricky problem.

I suppose you might try to either not use a reusable element, or have a non-reusable element (hidden or otherwise camouflaged) as an interim step before triggering the reusable element?

Sorry I couldn’t be more helpful.

Yeah I’m reading/writing data from/to an external server.

Thanks for taking the time.

This topic was automatically closed after 70 days. New replies are no longer allowed.