Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

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  Phase 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 the next phase.

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

  1. Right click on the save button and click Display Actionflow
  2. In the phase toolbar, click  Add New
  3. Select Add phase before
  4. Name the phase Validation
  5. Add the form as an input into the actionflow
  6. Map the fields that need to be validated, CompanyName and Number
  7. Drag and drop a Calculate node onto the actionflow canvas
  8. Name this Validate Fields
  9. Connect the  Driving interface connection point to the calculate node
  10. Map CompanyName and Number into the calculate node
  11. Create a calculate attribute with the following properties
    1. Name: ValidRecord
    2. Type: TrueFalse
    3. Expression:

      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
      	)
      )	
      
      
    4. Click  Save

  12. Drag and drop a Start Phase node onto the actionflow canvas
  13. Select Processing Phase (the second phase)
  14. Hover over the calculate node and select the out connection point
  15. Use the arrow and click on the canvas and create a Gateway node
  16. Name this Valid Records Only
  17. Right click on the connection point between the Calculate and the Gateway and click Configure Mappings
  18. Map ValidRecord into the Gateway node
  19. Click Confirm Mappings
  20. Hover over the gateway node and click Add Output
  21. Name this Valid
  22. Connect this to the Start Phase node
  23. Right click on the connection and select Show Properties
  24. Add the expression 

    in.ValidRecord

    This ensures only valid records pass to the next phase.

Confirmation

They can be used in combination with  Open Screen 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 phase

  1. In the phase toolbar, click  Add New
  2. Select Add phase before
  3. Name the phase Confirmation
  4. 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.
  5. Click Screens to open the list of available screens
  6. Drag and drop the default confirmation screen onto the actionflow
  7. Connect this to the interface input connection point
  8. Drag and drop a Start Phase node and select the right phase.
  9. Hover over the default confirmation screen and select the correct output
  10. Connect this to the Start Phase node.

Sarah todo: add video once working in product

 Properties Tab

Parent Details

If this item is within or belongs to another, it's parent name is shown here. See the Common Properties page, Parent Details section for more details.

Basic Settings

FieldDescription
NameEnter the name for the action node.
PhaseSelect a Phase for the actionflow to start
Show in the Repository

An application can have many actionflows, and an individual actionflow can have many nodes. This can lead to many items being listed under Actionflow in the repository. Use this option to omit the node from the repository.

 to display this node in the repository.

 to omit this node from the repository.


Description

We recommend that you always enter a description to explain the purpose of this item.

 Access and Audit Tab

 Security Tab

Access Permissions

See the Common Properties page, Access Permissions section.

 Audit Tab

Audit Summary

See the Common Properties page, Audit Summary section.

Sections on this page

Learn More

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


Terminology changes in progress

As part of the redesign of PhixFlow, we are changing the following terms:

dashboard → screen   
stream → table
stream attributes → attributes
stream item → record
stream set → recordset
stream view → view
stream item action → record-action 
stream action → table-action
driver class → database driver

  • No labels