Flow extension
This feature is available since version 24.6
Overview
ACE provides a way to reuse flows by extending them and specifying steps to be overridden. With this feature it is possible to modify (override) base steps, disable steps and add new steps in specific places to complement base flow.
This feature is also known as "Step override" and "Flow override". Flow override though refers to the whole flow being replaced in case of multiple workspace merge or multi-folder setup.
Using flow extension in ACE designer
To start using this feature, first need to extend a base flow. It’s possible by creating a new flow and specifying its base flow:
All steps then are inherited from base flow, and extended flow contains only step overrides. Base steps are displayed as grayed out steps and are in read-only state:
To override step and make modifications to it, Override step button should be pressed on right side. Once that's done, by default overridden step is replacing the base step. Step container will now also show notion which step is being extended.
Override order options are:
- replace - replacing the base step completely with modified step
- before - copying the base step and adding it before that base step. Note that base step would still be executed.
- after - copying the base step and adding it after that base step. Note that base step would still be executed.
Deleting and disabling steps
Step deletion works differently in extended flows. Base steps cannot be deleted - if some base steps are not needed in extended flow, they have to be disabled. That can be done with Disable/enable step button found on right side inside step container. Overridden steps can be deleted and in this case delete behave as in regular flow.
Dangling step
In some cases, when base step cannot be found (wrongly referenced or, for example, has been deleted/renamed) overriden step can become a dangling one - it doesn't have valid base step and will be outlined with red color in the UI:
Runtime server will not execute any flow with dangling steps and will return server error.
Notes
- Step order is defined by base flow
- It’s possible to extend flows in multiple levels
- Step names have to be unique across extended flows. In case of name duplicates such steps are marked with orange outline.
- Adding new step with add step button is override with before/after
Configuring API/flow to use extending flow
Extending flow is picked up automatically, which means that it's not necessary to update API or other flows where base flow is used. However, it also means that there can be only one extending flow for base flow. If there are multiple extending flows, then it will result in error.
Flow merge process
If flow is extended, then it automatically inherits all base flow steps and merges them with extending flow steps.
In order to determine final flow which is shown in Designer and executed by runtime server, ACE performs following actions:
- ACE loops through base flow steps
- For every base step it finds child steps in extending flow (steps whose base step is current base step)
- Child steps are grouped in 3 parts based on override order:
before
,replace
,after
- Add all
before
steps to final flow - If
replace
steps are found, add them to final flow, otherwise add base step - Add all
after
steps to final flow
- Child steps are grouped in 3 parts based on override order:
In essence every base step is replaced by following block:
Example below shows how base flow is merged with extending flow: