Versions Compared

Key

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

Insert excerpt
_Banners
_Banners
nameactionflow
nopaneltrue


Note

This

topic is for application designers who want to understand

page explains the concepts

of actionflows.note

for actionflows, which were introduced in PhixFlow 9.0.

For applications created in PhixFlow versions 8.3 and earlier, use table-actions and

stream item

record-actions to configure user interaction with data; see Using

Stream

This page explains the concepts of the new actionflow feature, introduced in PhixFlow 9.0.

Overview

Actionflows are diagrams


Iframe
srchttps://www.youtube.com/embed/ijHf9z5LMr0
width650px
height400px


Overview

An actionflow is a diagram in which you create the functionality of your application

. Actionflows are

. An actionflow is made up of individual actions, or nodes, wired together. The actionflow is then wired onto the screen using connectors and attached to

event handers:either on a component to card components

an event hander, such as a double-click, on a:

  • Component, such as a button or area
  • to grid components and their attributes.
    • Grid view component and its attributes
    • Card component.

    When the application user triggers an action with an event handler, PhixFlow processes the actionflow. 

    Actionflows can affect data, for example by making changes to

    stream-items

    data records, such as update or delete.

     Actionflows can also move the application user through their task, by validating input or opening the next screen.

    For example, a simple

    contact

    Contacts application

    includes

    would include a n input screen where the user enters details

    of

    for a new contact. When the user clicks

    the update

    a "save" button, PhixFlow runs the actionflow to:

    1. Check the input provided is appropriate.
    2. Ask the user to confirm they want to add the contact.
    3. Add the new contact 
    stream-item 
    1. record to the
    databaseProvide a confirmation message
    1. table.

    This page explains actionflow concepts. For details of how to create an actionflow, and

    their

    reference information about its properties see: Creating Actionflows.

    iframe


    Actionflow Page Layout

    srchttps://www.youtube.com/embed/jNdlDz9IWmM
    width700px
    height400px

    Reusing Actionflows

    You can reuse an actionflow throughout your application. This means you only need to create one actionflow for functionality that occurs on different screens or layouts, such as to save or update stream-items. You can also include an actionflow as a node within another actionflow.

    Note

    When you reuse an actionflow, you do not create a copy of it. You are using the actionflow itself. An instance of an actionflow is the combination of the actionflow and its input connections. You can change an actionflow and the same change occurs in all the instances where it is used. The changes do not affect the input connections to the actionflow.

    Todo-Anthony - check this is true: However, if you remove or add nodes, you will need to wire the input/output connectors for all the instances of the actionflow.

    For each instance of an actionflow, you specify which data the actionflow takes by wiring to connectors. This means you can connect to attributes with any name.

    Todo-Anthony - how do you select an actionflow to reuse it.

    Actionflow Diagram

    The following illustration shows the layout of an actionflow diagram

    Image Added

    The illustration shows the layout of an actionflow diagram. The central white area with blue outline represents the reusable part of the actionflow. The outer grey area with pink numbers represent items related to the actionflow instance only. The numbered areas are explained below

    .

    :

    Toolbar
    1. Toolbar 
      The toolbar
    contains icons
    1. is split into 3 sections:
      1. Action Nodes
        Contains actions that you drag onto the actionflow canvas to create the different nodes, such as a calculate action.
        Image Added

      2. Screen and Table
        Clicking on these options will open the repository pane to display a list of all available items in the application and associated packages. The available options are Screen and Table. Clicking on these options will open the repository pane to display a list of all available items in the application and associated packages.
        • Dragging a screen onto your actionflow canvas will create an open screen node
        • dragging a table will ask you if you would like to create a view or save node.

      3. Image Added
      4. Canvas Properties
        Contains canvas properties, such refresh, alignment and save.
    Action
      1. It will also take you to the actionflow help page.
        Image Added
    1. Instance Origin
      The origin indicates the event that triggers the actionflow instance. It displays its location in a hierarchy showing:
      • the name of
    screen 
      • screen.
      • the name of the component, such as a button, grid or card component.
      • the event type, such as a double-
    click 
      • click.
    1. Instance Options
      These options affect
    the entire actionflow instance, such as hiding the loading spinner. Inputs
    Inputs
    1. the actionflow instance:
      1. Show event location will take the user to the screen containing actionflow instance and highlight where the origin of the action is.
      2. Close screen after action completes will close the screen that contains the actionflow instance that is running.
      3. Hide loading spinner will hide the toast that appears in the bottom left corner of the screen.
    2. Actionflow Phases
      Actionflows can be made up of multiple phases. The first phase will run automatically when the action is triggered. Any additional phases will only run when prompted to by a start phase node. See Using Actionflow Phases.
    3. Instance Inputs
      The inputs to an actionflow for that actionflow instance:
      • Event starts the actionflow regardless of data. The actionflow
    will
      • always
    run
      • runs when triggered by the instance origin.
      • Data provides data to the actionflow. The data displayed belongs to the same screen or component as the event handler.
      
      • Data could be any data-bound component on a screen, including:
        • grid
    components.card components.
        • views
        • cards
        • forms
    1. Input Interface
    This is the first junction between the actionflow instance and the actionflow contents. The interface contains connection points which connect the inputs to the action nodes. There are 2 connection points available, these are:
    1. Driving connection point
    2. Lookup connection point
    1. There are 2 connection points to wire the actionflow instance inputs to the action nodes in the reusable actionflow:
      • Insert excerpt
        _driving_interface_connection_point
        _driving_interface_connection_point
        nopaneltrue
         to provide data that the actionflow will process.
      • Insert excerpt
        _request_interface_connection_point
        _request_interface_connection_point
        nopaneltrue
         to provide look-up data to the actionflow.
    2. Actionflow Canvas
      The canvas represents the reusable actionflow. It contains
    action nodes which are connection
    1. actions, or nodes, that are wired together using connection points
    . The nodes on the diagram represent individual actions that pass or process the data from the connections. The data passes using
    • driving connections or
    • lookup connections
  • Output Interface
    This is the second junction between the actionflow instance and the actionflow contents. The interface contains connection points which connect the action nodes to the outputs. There is only 1 type of connection point available, a driving connection point.
  • Outputs
    Outputs from an actionflow for that actionflow instance. These are data bound components
    1. . Each action has a specific purpose. It can look-up data, processes data or pass data on unchanged. Data passes from one action to another via:
      • Insert excerpt
        _driving_connection
        _driving_connection
        nopaneltrue
         to move data through the actionflow
      • Insert excerpt
        _request_connection
        _request_connection
        nopaneltrue
         to look-up data and use it in a calculation.
    2. Output Interface
      There are
      Insert excerpt
      _driving_interface_connection_point
      _driving_interface_connection_point
      nopaneltrue
       connection points to wire the reusable actionflow to the actionflow instance outputs.
    3. Instance Outputs
      For an actionflow instance, connect to the specific data-bound components to which you want to send data
    to after
    1. when the actionflow has
    completed
    1. run. The
    output resembles the input area without the event. Outputs could be any data
    1. instance outputs are similar to the instance inputs, without events. Data can be output to a data-bound component on a screen, including:
        • grid
    components.card components.
        • views
        • cards
        • forms
    Image Removed


    Actionflow Nodes

    In an actionflow diagram,

    each

    the smallest action that PhixFlow can perform is represented as a circle, called a node. Nodes can be:

    • data interactions
    -
    • , such as save, delete, add.
    • data calls and calculations
    - connecting
    • that connect to data views to look-up, use or
    process stream-items
    • process records.
    • screen interactions
    -
    • , for example to open or close screens in the application
  • another actionflow - this means you can represent a complex step as a single node
  • gateways -
    • .
    • gateways, which are decision points with logic to determine
    which
    • the path that PhixFlow takes next.

    As you add action nodes to the actionflow, you wire and map the output

    connector

    connection point of one node to the

    input  connector

    input connection point on the next. In this way, you are create the logical steps needed to complete a specific piece of functionality. 

    Todo-Anthony Update picture

    Image Removed

    Unreachable Actions

    Dashboards have a section called unreachable actions - Todo-Anthony - what this means and how to use it.

    Illustration

    The picture below shows an actionflow that validates

    Image Added

    To learn more, see Using Actionflow Nodes

    Anchor
    reuse
    reuse

    Reusing Actionflows

    You can reuse an actionflow throughout your application. This means you only need to create one actionflow for functionality that occurs on different screens, such as to update records or to open a screen.

    Note

    When you reuse an actionflow, you do not create a copy of it. You are using the actionflow itself. An instance of an actionflow is the combination of the actionflow and its input and output connections. You can change an actionflow and the same change occurs in all the instances where it is used. The changes do not affect the input and output connections of the actionflow.

    For each instance of an actionflow, you specify the data that the actionflow uses by wiring into connection points. This means you can connect to attributes with any name, and changing the names of these attributes will not affect the actionflow.

    To select an existing actionflow to reuse it, click 

    Insert excerpt
    _actionflow
    _actionflow
    nopaneltrue
     next to any actionflow field to display a list of previously created actionflows. Drag the selected actionflow onto the actionflow field. The actionflow opens for you to specify the data the actionflow needs to use in that instance.

    Reusability Example

    The picture below shows an actionflow that validates the format of data to ensure it is a valid area code.

    It's

    Its input connection is called Area Code.

    Image Removed

    Image Added

    The actionflow is reused by two applications, shown on the left

    . The actionflow is owned by a package that is shared between the applications. Each application has separate data with different fields. The actionflow takes data from:

    • Postcode data in the Contact App
    • Zip Code in the Asset Manager App. 

    This shows that an actionflow can take its input from an attribute with any name. It also illustrates the 2 instances of the actionflow:

    • Instance 1 is the actionflow with input from Postcode 
    • Instance 2 is the actionflow with input from Zip Code
    As actionflows

    Actionflows are reusable, you:

    • create an actionflow, setting up all the nodes, wires and the logic
    • use and actionflow, connecting it to screen components, events and data, thin mapping the data through the actionflow.


    Note

    To make actionflows reusable between different applications they must belong to a package which is shared between the two applications.


    HTML Comment
    hiddentrue

    Unreachable Actions 

    You can add an actionflow to a screen before assigning it to an event handler. These actionflows are known as unreachable actions and are listed in the screen properties. When you are ready to wire the actionflow, from the screen properties Unreachable Actions section drag the actionflow onto a component on the screen. PhixFlow opens the actionflow diagram where you can connect the instance inputs.

    What's next?

    Child pages (Children Display)
    styleh3