2.07 Embedded Actionflows
What is an Embedded Actionflow?
An action node or group of action nodes can be nested within an node that can be reused without reusing the entire Actionflow. For example, a Calculate Action that normalises an area code can be extracted from its original Actionflow and reused (embedded) within many other Actionflows using its Actionflow node. Actionflow
For reusing entire Actionflows, see 1.17 Instances and Reusability. For extracting or moving an action(s) to another Actionflow, see 2.06 Extracting and Moving Actions.
Embedding Actionflows
An action(s) can be embedded after using the 2.06 Extracting and Moving Actions, or by opening the list of Actionflows in the and dragging one onto the canvas. Repository
Extract to new Actionflow option, see- Click the option in the toolbar Actionflow
- Drag and drop an from the Repository onto the canvas Actionflow
- An embedded node is created Actionflow
- If any changes are required to the functionality within the embedded Actionflow, right-click on the embedded node and choose Display
Embedding Compatibility
- Actionflows containing Phases, Start Phase actions, and confirmation screens cannot be embedded
- When editing an Actionflow that has been embedded, s cannot be created Phase
- An Actionflow in an application cannot be embedded in a package
Worked Example
Here's a worked example using the Retail Data (available from the Learning Centre).
In this example, we are using:
- A Staff Form screen containing blank input fields, set up to create a new staff member - this screen was created using the Edit Form template
If you are completing this chapter as part of the Actionflow course and using a training instance, the data and screens have already been pre-loaded into the Actionflow Intermediate Application. For this example, we'll be working on the Save button on the Staff Form screen.
Prerequisites
.
Embed Proper Case Actionflow
In this example, we'll embed an extracted action node that converts a First Name string to proper case. We'll embed this within the Save action on the Staff Form.
Embed Extracted Action in Actionflow
- Open the Actionflow on the Save button on the Staff Form
- Click in the toolbar and drag the Proper Case Actionflow from the Actionflow onto the canvas Repository
- Click and drag Actionflow node onto the connector between the input and action and drop it when the Gateway icon appears
- Choose the out_ProperCase connection point from the Select Connection Point pop up
- Click on the connector between the input and embedded node and map across the attribute first_name
- Click on both connectors between the node and Gateway Save actions
On both connectors, map across the ProperCase attribute from the embedded node to the first_name attribute on the table Actionflow
Testing
- To test the Actionflow, open the Shop Staff screen
- Select an existing staff member from the grid and press Edit
- Change their first name to be in capitals and click Save
- You should see on the Staff grid that their first name has saved in proper case