Versions Compared

Key

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

Insert excerpt
_Banners
_Banners
nameactionflow
nopaneltrue

TThis 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

Phase Node Properties

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

Validation

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 split your actionflow into phases that process all records up to one point, before moving on to the next phase.

Image Removed

To add validation to the fields checking that a company name has been provided and the phone number only contains numbers

  • Right click on the save button and click Display Actionflow
  • In the phase toolbar, click Insert excerpt_add_addnopaneltrue
  • Select Add phase before
  • Name the phase Validation
  • Add the form as an input into the actionflow
  • Map the fields that need to be validated, CompanyName and Number
  • Drag and drop a Calculate node onto the actionflow canvas
  • Name this 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
    	)
    )	
    
    
    Click  Insert excerpt_save_savenopaneltrue
  • Drag and drop a Start Phase node onto the actionflow canvas
  • Select Processing Phase (the second phase)
  • Hover over the calculate node and select the out connection point
  • Use the arrow and click on the canvas and create a Gateway node
  • Name this Valid Records Only
  • Right click on the connection point between the Calculate and the Gateway and click Configure Mappings
  • Map ValidRecord into the Gateway node
  • Click Confirm Mappings
  • Hover over the gateway node and click Add Output
  • Name this Valid
  • Connect this to the Start Phase node
  • Right click on the connection and select Show Properties
  • Add the expression 

    Code Block
    in.ValidRecord

    This ensures only valid records pass to the next phase.

    Image Removed

    Confirmation

    They can be used in combination with Insert excerpt_action_screen_action_screennopaneltrue nodes which contain Start Phase buttons. These buttons link directly to the outputs on the Open Screen node and can be connected to different phases. For example If the user chooses option 1, phase 1 can run. If the user chooses option 2, phase 2 can run instead. Especially useful if there is a requirement for user confirmation before processing. To add a confirmation phaseIn the phase toolbar, click Insert excerpt_add_addnopaneltrue
  • Select Add phase before
  • Name the phase Confirmation
  • Either
    1. Add the form as the input into the actionflow if data is required to be mapped into the confirmation
    2. Add the event as the input into the actionflow if no data is required for the confirmation.
  • Click Screens to open the list of available screens
  • Drag and drop the default confirmation screen onto the actionflow
  • Connect this to the interface input connection point
  • Drag and drop a Start Phase node and select the right phase.
  • Hover over the default confirmation screen and select the correct output
  • Connect this to the Start Phase node.
  • Sarah todo: add video once working in product

    Worked Example

    For full details on how to create Phases, including worked examples, see Actionflow Phases.

    Insert excerpt
    _property_tabs
    _property_tabs
    namebasic-h
    nopaneltrue

    Insert excerpt
    _property_

    tabs

    toolbar
    _property_

    tabsnamebasic-h

    toolbar
    nopaneltrue

    Insert excerpt
    _parent
    _parent
    nopaneltrue

    Basic Settings

    FieldDescription
    NameEnter the name for the action node.
    Phase

    Select

    a Phase for

    the

    actionflow to start Insert excerpt_actionflow_properties_actionflow_propertiesnameshow-namenopaneltrue Insert excerpt_actionflow_properties_actionflow_propertiesnameshow-textnopaneltrue

    phase to run using the action node.

    Insert excerpt
    _description
    _description

    nopaneltrue Insert excerpt_property_tabs_property_tabsnameaccess-hnopaneltrue Insert excerpt_access_access

    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