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

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 a 

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.

To

Use the following steps:

  • to add validation to the fields
checking
  • to check that a company name has been provided
and
  • to check that the phone number only contains numbers
Right
  • .


  1. In the application screen, right-click on the save Save button and , then click Display Actionflow.
  2. PhixFlow opens the actionflow that is connected to the Save button. Above the canvas is the phase toolbar.
  3. In the phase toolbar, click
    Insert excerpt
    _add
    _add
    nopaneltrue
    .
  4. Select Add phase before
  5. Name the phase Validation
  6. Add Phase Before and set the Name to Validation. PhixFlow adds a new Validation tab to the phase toolbar.
  7. Click the Validation phase tab. PhixFlow displays the actionflow canvas for this phase.
  8. In the Inputs panel, add the form as an input into the actionflow.
  9. Map the fields that need to be validated, : CompanyName and Number
  10. Drag and drop a Calculate node onto the actionflow canvas
  11. Name this Validate Fields
  12. Drag a 
    Insert excerpt
    _action_calculate
    _action_calculate
    nopaneltrue
    node onto the actionflow canvas and set its Name to Validate Fields.
  13. Connect the
    Insert excerpt
    _driving_interface_connection_point
    _driving_interface_connection_point
    nopaneltrue
     to the calculate node.
  14. Map CompanyName and  CompanyName and Number into the calculate node.
  15. 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 

    • To save the calculate attribute, click 

      Insert excerpt
      _save
      _save
      nopaneltrue
      .

  16. Drag and drop a Start Phase node
    Insert excerpt
    _action_phase
    _action_phase
    namestart
    nopaneltrue
     node onto the actionflow canvas
  17. Select Processing Phase (the second phase)
  18. Hover and select Processing Phase.
  19. Hover your mouse pointer over the calculate node and select the out connection point
  20. Use the arrow and click on the canvas and create a Gateway node
  21. Name this Valid Records Only
  22. Right .
  23. PhixFlow creates a wire. Click onto the canvas to show the node options and select the 
    Insert excerpt
    _action_gateway
    _action_gateway
    nopaneltrue
    node.
  24. Set the Name to  Valid Records Only. PhixFlow adds the gateway node.
  25. Right-click on the connection point between the Calculate calculate and the Gateway and click Configure Mappingsgateway nodes and click 
    Insert excerpt
    _node_map
    _node_map
    nopaneltrue
  26. Map ValidRecord into the Gateway gateway node Click and click Confirm Mappings.
  27. Hover your mouse pointer over the gateway node and click Add Output. Set the Name this Valid
  28. Connect this to the Start Phase node
  29. Right click on the connection to Valid.
  30. Click on the 
    Insert excerpt
    _action_phase
    _action_phase
    namestart
    nopaneltrue
     node to wire the gateway output into the start phase node
  31. Right-click on the wire and select Show Properties.
  32. Add the expression In the wire properties → Basic Settings → Expression, add:

    Code Block
    in.ValidRecord

    This ensures only valid records pass to the next phase.

    Image Removed

Confirmation

They can be used in combination with

The completed validation phase of the actionflow looks like this:

Image Added

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_screen
    nopaneltrue
 nodes which contain Start Phase buttons. These buttons link
  •  node that contains a start phase button. Link the button 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.
  • 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:

  1. In the phase toolbar, click
    Insert excerpt
    _add
    _add
    nopaneltrue
    .
  2. Select Add phase before
  3. Name the phase Confirmation
  4. EitherAdd the form as Phase Before and set the Name to Confirmation.
  5. In the Inputs panel, configure the input into the actionflow if data is required to be mapped
    • If you want to map data into the confirmation
    Add
    • phase, add the form as the input.
    • If you do not need any data,  add the event as the input
    into the actionflow if no data is required for the confirmation
    • .
  6. Click Screens
    Insert excerpt
    _screen
    _screen
    nopaneltrue
    to open the list of available screens. Drag and drop the default confirmation screen onto the actionflow.
  7. Connect this the confirmation screen to the interface input connection pointDrag and drop a Start Phase node .
  8. Drag an  
    Insert excerpt
    _action_phase
    _action_phase
    nopaneltrue
     node onto the canvas and select the right phase.
  9. Hover your mouse pointer over the default confirmation screen node and select the correct output.
  10. Connect this 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
_property_tabs
_property_tabs
namebasic-h
nopaneltrue

Insert excerpt
_property_toolbar
_property_toolbar
nopaneltrue

Insert excerpt
_parent
_parent
nopaneltrue

Basic Settings

the type of phase: todo

  • Processing to do xx
  • ?? to do yyy
FieldDescription
NameEnter the name for the action node.
Phase

Select

a Phase for the actionflow to start
Insert excerpt
_actionflow_properties_actionflow_properties
nameshow-name
nopaneltrue
Insert excerpt
_actionflow_properties_actionflow_properties
nameshow-text
nopaneltrue
Order

Specify the order of the phase.

Insert excerpt
Insert excerpt
_description
_description
nopaneltrue

Insert excerpt_property_tabs_property_tabsnameaccess-hnopaneltrue

_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