This topic is for application designers who want to understand the concepts of actionflows.
For applications created in PhixFlow versions 8.3 and earlier, use actions and stream item actions to configure user interaction with data; see Using Stream Actions.
This page explains the concepts of the new actionflow feature, introduced in PhixFlow 9.0.
Overview
Actionflows are diagrams in which you create the functionality of your application. Actionflows are wired onto the screen using connectors and attached to event handers:
- either on a component such as a button or area
- to grid components and their attributes.
- to card components
When the user triggers an action with an event handler, PhixFlow processes the actionflow. Actionflows can affect data, for example by making changes to stream-items, such as update or delete.
Actionflows can also move the user through their task, by validating input or opening the next screen.
For example, a simple contact application includes a screen where the user enters details of a new contact. When the user clicks the update button, PhixFlow runs the actionflow to:
- Check the input provided is appropriate
- Add the new contact stream-item to the database
- Provide a confirmation message.
This page explains actionflow concepts. For details of how to create an actionflow and their properties see: Actionflows.
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 update stream-items or open a screen. You can also include an actionflow as a node within another actionflow.
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 which data the actionflow uses by wiring to 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 Actionflow next to any actionflow field to display a list of previously created actionflows. Select the actionflow to use and drag and drop this onto the actionflow field. The actionflow will then open for you to specify the data the actionflow needs to use in that instance.
Actionflow Nodes
In an actionflow diagram, each smallest action that PhixFlow can perform is represented as a circle, called a node. Nodes can be:
- data interactions - save, delete, add
- data calls and calculations - connecting to views to look-up, use or process stream-items
- screen interactions - to open or close screens in the application
- another actionflow - this means you can represent a complex step as a single node
- gateways - decision points with logic to determine which path PhixFlow takes next.
As you add nodes to the actionflow, you wire the output connection point of one node to the input connection point on the next. In this way, you are create the logical steps needed to complete a specific piece of functionality.
To learn more, see Actionflow Nodes.
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 the format of data to ensure it is a valid area code. It's input connection is called Area Code
.
The actionflow is reused by two applications, shown on the left. Each application has separate data with different fields. The actionflow takes data from:
Postcode
data in the Contact AppZip 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 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.