Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameactionflow
nopaneltrue

What is an Embedded Actionflow?

Embedding Actionflows allows an action node or group of action nodes to be nested within an

Insert excerpt
_actionflow
_actionflow
nopaneltrue
 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 within many other Actionflows by embedding using an
Insert excerpt
_actionflow
_actionflow
nopaneltrue
 node.                         

For reusing entire Actionflows, see 1.17 Instances and Reusability. For extracting or moving an action(s) to another Actionflow, see 2.13 Extracting and Moving Actions.


Note
titleEmbedding Compatibility

When an attempt is made to embed an actionflow a number of checks should be made

  1. The actionflow must not have phases or start phase nodes, confirmation dialogs

  2. That no embedding loops are created (A embedding B, which embeds C which embeds A

    1. A recursive check is made, at the minimum checking on descendants don’t embed A (as existing loops should have previously been prevented, but better to keep track of the layers in case you encounter A->B->C->B..

  3. An actionflow in an app can’t be embedded in a package

An error plink will be displayed if the embedded Actionflow is incompatible (e.g. has phases, confirmation dialogs).

When editing an action flow which has been embedded it will prevent the creation of phases etc.

Embedding Actionflows

An action(s) can be embedded by using the 

Insert excerpt
_extract_actionflow
_extract_actionflow
nopaneltrue
 option,  see 2.13 Extracting and Moving Actions, or by opening the list of Actionflows in the Repository and dragging onto the canvas.

  1. Click the
    Insert excerpt
    _actionflow
    _actionflow
    nopaneltrue
     option in the toolbar
  2. Drag and drop an Actionflow from the Repository onto the canvas
  3. An embedded Actionflow node is created
    1. If any edits are required to the functionality within the embedded Actionflow, right-click on the embedded node and choose
      Insert excerpt
      _actionflow_icon
      _actionflow_icon
      nopaneltrue
       Display
HTML Comment
hiddentrue

Insert excerpt
Actionflow Node
Actionflow Node
nopaneltrue

Worked Example

Here's a worked example using the Shop Data (available from the Learning Centre).

In this example, we are using:  

  • Staff Form screen containing blank input fields, set up to create a new staff member  - this screen was created using the Edit Form template
Tip

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.

GIF/SCREENSHOT OF FINISHED RESULT

Prerequisites 

For this example, we'll embed an extracted Actionflow. If you have not completed 2.13 Extracting and Moving Actions, expand the section below and follow the steps to create an extracted Actionflow.

.

Expand

Insert excerpt
2.13 Extracting and Moving Actions to a New Actionflow
2.13 Extracting Actions to a New Actionflowand Moving Actions
nameextract
nopaneltrue

.

Embed Proper Case Actionflow

In this example, we'll embed an extracted action node that converts a string entered for a First Name attribute to proper case. We'll embed this within the Save action on the Staff Form.

Embed Extracted Action in Actionflow

  1. Open the Actionflow on the Save button on the Staff Form
  2. Click 
    Insert excerpt
    _actionflow
    _actionflow
    nopaneltrue
     in the toolbar and drag the Proper Case Actionflow from the
    Insert excerpt
    _repository
    _repository
    nopaneltrue
  3. Drag it onto the connector between the input and Save action
  4. Choose the out_ProperCase connection point from the Select Connection Point pop up
  5. Click on the connector between the Proper Case and Save action
  6. Map across the ProperCase attribute from the embedded action node to the firstName attribute on the Save action 

1.02 Actionflow Principles