Run is used to run different App Connect components already placed on the page.
Run Flow is pretty much self explanatory. It allows you to run other Flows already placed on the page.
The components in the Bootbox category are different than the ones you see on your screenshot. Bootbox dialogs are nicely styled in Bootstrap 4 style, while the regular prompt/alert/confirm are just standard/native browser dialogs.
Am I right in saying that if I execute a Run command in a flow it will execute asynchronously, e.g. the next item in the flow will execute before the Run command has finished?
If I do this following
Flow A
- Statement 1
- Run (Flow B)
- Statement 2
Then will Statement 2 potentially execute while Flow B is running?
If I do this:
Flow A
- Statement 1
- Run Flow (Flow B)
- Statement 2
Will statement 2 wait for Flow B to finish?
If not, is there any way for me to execute Flow B and have Flow A wait until Flow B has finished before executing Statement 2?
All actions in a flow are called async. When the function called with Run returns a promise it will wait until it is finished otherwise it will directly continue with the next action.
The flow run method returns a promise, so Statement 2 will wait until Flow B is finished. A serverconnect load method does not return a promise, so Statement 2 will execute before the serverconnect is loaded.
Just Run will also work since the run method on the Flow component returns a promise, as long the method called returns a promise it will wait for it.
This does not work so for API and Server Connect components who do not return promises in their load method but using the special serverconnect and api flow action do wait for them to finish.
The Run action updates the data of the Flow component on the page where you call the method from. When using Run Flow it will be run as a subflow and the data of the component is not updated but the data is accessible as output from the step.