Versions Compared

Key

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

Insert excerpt
_Banners
_Banners
nameactionflow
nopaneltrue

TThis This page provides details of the properties for the phase node. These are part of actionflows.

Overview

Image Removed

Actionflows process data one record at a time. However, sometimes you may want to process all records up to one point, before moving on to the next process. For example, you may first want to check all the data before starting to process the first record. One way to do this is to have separate actionflows, so that all the data is processed by one actionflow, saved to a table and then the table is used at the start of the next actionflow. The other way is to use Image Added

Use

Insert excerpt
_action_phase
_action_phase
nopaneltrue
 node.

Phase nodes act as an internal break in the actionflow. For example, you can have one phase in which records are read into the actionflow and checked one at a time. Once all records have been validated, the actionflow can then move to the next phase, where records are updated. Phase nodes are particularly useful if there the actionflow requires the user to make a choice as part of the actionflow. 

Example

Configuring a Validation Phase

A user wants to check some company fields before saving them in an actionflow. The simplest way to do this is to add a new phase before the existing processing phase. The new phase will contain all the logic to check the fields, and only pass on validated fields to the next phase.

Image Removed

Use the following steps:

  • to add validation to the fields
  • to check that a company name has been provided
  • to check that the phone number only contains numbers.
  • In the application screen, right-click on the Save button, then click Display Actionflow.
  • PhixFlow opens the actionflow that is connected to the Save button. Above the canvas is the phase toolbar.
  • In the phase toolbar, click Insert excerpt_add_addnopaneltrue.
  • Select Add Phase Before and set the Name to Validation. PhixFlow adds a new Validation tab to the phase toolbar.
  • Click the Validation phase tab. PhixFlow displays the actionflow canvas for this phase.
  • In the Inputs panel, add the form as an input into the actionflow.
  • Map the fields that need to be validated: CompanyName and Number
  • Drag a  Insert excerpt_action_calculate_action_calculatenopaneltrue node onto the actionflow canvas and set its Name to Validate Fields.Connect the Insert excerpt_driving_interface_connection_point_driving_interface_connection_pointnopaneltrue to the calculate node.
  • Map CompanyName and Number into the calculate node.
  • Create a calculate attribute with the following properties:
  • Name: ValidRecord
  • Type: TrueFalse
  • Expression:

    Code Block
    do(
    	//set error message variable to use in the validation
    
    	$errorMessage = [],
    
    	//check the company name is populated
    
    	if(in.CompanyName == _NULL, 
    
    		$errorMessage = addElement($errorMessage, "Please provide a name")
    	),
    
    	if(contains(in.Number, [abc]),
    
    		$errorMessage = addElement($errorMessage, "Phone number should not contain any letter")
    	),
    
    	if(countElements($errorMessage) > 0,
    
    		do(
    			error(listToString($errorMessage, ", ")),
    
    			false
    		),
    
    		true
    	)
    )	
    
    
    To save the calculate attribute, click  Insert excerpt_save_savenopaneltrue.Drag a  Insert excerpt_action_phase_action_phasenamestartnopaneltrue node onto the actionflow canvas and select Processing Phase.
  • Hover your mouse pointer over the calculate node and select the out connection point.
  • PhixFlow creates a wire. Click onto the canvas to show the node options and select the  Insert excerpt_action_gateway_action_gatewaynopaneltrue node.
  • Set the Name to  Valid Records Only. PhixFlow adds the gateway node.
  • Right-click on the connection point between the calculate and the gateway nodes and click  Insert excerpt_node_map_node_mapnopaneltrue
  • Map ValidRecord into the gateway node and click Confirm Mappings.
  • Hover your mouse pointer over the gateway node and click Add Output. Set the Name to Valid.
  • Click on the  Insert excerpt_action_phase_action_phasenamestartnopaneltrue node to wire the gateway output into the start phase node
  • Right-click on the wire and select Show Properties.
  • In the wire properties → Basic Settings → Expression, add:

    Code Block
    in.ValidRecord

    This ensures only valid records pass to the next phase.

    The completed validation phase of the actionflow looks like this:

    Image Removed

    Configuring a Confirmation Phase

    A confirmation phase is useful if the user must:

  • confirm an action before it runs
  • choose an option to determine which phase runs.
    In this case, configure a phase with an  Insert excerpt_action_screen_action_screennopaneltrue node that contains a start phase button. Link the button directly to the outputs on an open screen node.

    A confirmation phase usually opens a pop-up window. The following steps assume this screen has already been designed.

    To add a confirmation phase:

    In the phase toolbar, click Insert excerpt_add_addnopaneltrue.
  • Select Add Phase Before and set the Name to Confirmation.
  • In the Inputs panel, configure the input into the actionflow: 
    • If you want to map data into the confirmation phase, add the form as the input.
    • If you do not need any data,  add the event as the input.
  • Click  Insert excerpt_screen_screennopaneltrue to open the list of available screens. Drag the confirmation screen onto the actionflow.
  • Connect the confirmation screen to the interface input connection point.
  • Drag an   Insert excerpt_action_phase_action_phasenopaneltrue node onto the canvas and select the right phase.
  • Hover your mouse pointer over the screen node and select the correct output.
  • Connect the screen output to the Start Phase node.
  • Sarah todo: add video once working in product. At the moment, adding a phase is just adding a node called Processing Phase. It's not prompting for a phase type or for a name.

    Insert excerpt_

     to split your actionflow into phases that process all records up to one point, before moving on to the next phase; see Using Actionflow Phases.

    Insert excerpt
    _property_tabs
    _property_tabs
    namebasic-h
    nopaneltrue

    Insert excerpt
    _property_toolbar
    _property_toolbar
    nopaneltrue

    Insert excerpt
    _parent
    _parent
    nopaneltrue

    Basic Settings

    FieldDescription
    NameEnter the name for the action node.
    Phase

    Select the type of phase : todo

    • Processing to do xx
    • ?? to do yyy
    OrderSpecify the order of the phase

    to run using the action node.

    Insert excerpt
    _description
    _description
    nopaneltrue

    Insert excerpt
    _audit
    _audit
    nopaneltrue

    Live Search
    spaceKey@self
    additionalnone
    placeholderSearch all help pages
    typepage

    Panel
    borderColor#00374F
    titleColorwhite
    titleBGColor#00374F
    borderStylesolid
    titleSections on this page

    Table of Contents
    maxLevel3
    indent12px
    stylenone


    Learn More

    For links to all pages in this topic, see Understanding Actionflows

    Insert excerpt
    _terms_changing
    _terms_changing
    nopaneltrue