Subflow
Build reusable flows
|
|||||
|
|
You can move a sequence of building blocks to a new Ultradox file and execute them as a sub-flow.
Use cases
- Perform calculations in a subflow and use the result in multiple automations
- Assemble apps by invoking multiple subflows based on user interaction
- Improve structure and readability of your flow
Configuration
Click on the bold part in the title of the building block to open the configuration dialog.
Copy and paste the key of the Ultradox flow that you want to call. Find the key by opening the API dialog of the Ultradox file that you want to call.
In case you re-generate the key of the Ultradox file to be called, you'll have to update the key in the subflow building block as well.
Reload
Click on reload button if you have changed the input or output parameters of the subflow. The input and output variables will then update accordingly after inspecting the subflow.
Modes
Subflows can be executed in different modes. Each mode has a different purpose.
It is very important that you select the correct mode for your usecase. Some features are not available when picking the wrong mode!
Ignore Results
When running a subflow using the Ignore results
mode the subflow will be launched but and the main flow will immediately continue and ignore the results of your subflow.
This mode is great if you for example want to send out emails to a large number of recipients:
Create a subflow that sends an email to a single recipient.
You can then create an automation that calls this subflow inside of a repeating section. All emails will then be sent out in parallel. This is much quicker than waiting for each subflow.
This mode will not allow you to create any user interaction of any kind in the subflow as it just runs in the background.
Wait for a short time
This mode will call your subflow and will wait for the subflow to return the results within a few seconds.
Pick this mode if your subflow performs a calculation and does not wait for any user input.
When invoking your automation via API by using the call
or run
method, this mode allows you to get the results of the main flow in the response in JSON format.
When invoking your automation via API using the run
method, this mode also allows you to show generated HTML or PDF documents to your users that are generated in the subflow.
Wait forever
This mode allows you to execute long lasting subflows that may even include user interactions like forms.
User interaction will only work when executing your automation as an app or from the Ultradox editor.
When calling an automation that waits for a subflow using this mode via API using the call
or run
methods, you will get the state of your flow as a result in JSON format when the subflow gets called.
Useful combinations
VAT calculation in a sub-flow
In the main flow a list of customer purchases is compiled. For each purchase the customer's location as well as the net amount is captured.
To determine the country specific vat and thereby the correct gross amount a subflow is executed.
|
|||||
|
|
||||
|
|
||||
|
|
|
|||||
|
|
||||
|
|
In the sub flow first the relevant input variables are defined. The net amount as well as the location is passed to the sub-flow.
From a VAT sheet the country specific VAT rate is extracted.
Using the correct VAT rate the gross amount is calculated and passed as an output variable of the sub flow.
|
|||||
|
|
||||
|
|
|
|||||
|
|
|
|||||
|
|
||||
|
|
After the sub-flow has been executed the main flow is updating the correct gross amount.
|
|||||
|
|
||||
|
|
Questions and Feedback
If you have any comments on this page, feel free to add suggestions right to the Google document that we are using to create this site.
If you are not yet member of the Ultradox community on Google+, please join now to get updates from our end or to provide feedback, bug reports or discuss with other users.
Last Updated: 11/30/18