Transactional vs Queue
Last updated
Last updated
In this video, we will show you how to perform parallel and conditional steps.
By adding two additional Google Sheets connectors, we can create three different branches after the second step. This can be done by linking the "Step 2" to each of the Google Sheets connectors.
We will be configuring each of these three Google Sheet steps to send the data to a different “sheet or range”.
The first "Google Sheets" from the left will send data to Sheet1, the middle one will send data to Sheet2, and the third one will send data to Sheet.
As part of the configuration, we need to map the data from each "Google Sheets" step to the second step in our flow.
After running the flow, we noticed that the data went to "Sheet1" only, despite having the three Google Sheets properly configured!
Actually, this is normal and expected behavior because the Execution Pattern of each of the branched steps is configured by default as transactional mode. This means that the workflow will proceed in a linear fashion, and accordingly the first configured path will be executed.
To enable the parallel runs, and enable all the branches to be executed at the same time we have to configure the Execution Mode of each of the 3 branched steps as Queue mode.
Let's run the flow again and validate the results. We can see that the data successfully went into the three sheets, meaning that the three branches were executed in parallel.
Also, can configure the execution pattern of a single branch as transactional and the remaining branches as Queue. This will allow all the 3 branches to be executed in parallel.
In summary, the parallel branches work as follows based on the execution patterns configuration:
Only one transactional branch will be executed out of the many transactional branches.
All the queued branches will be executed.
A combination of transactional and queue branches will lead to all the queue branches being executed and one of the transactional branches being executed.