Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Reusability
As Actionflows can be reused throughout your application, and other applications if shared via a package, you only need to create one Actionflow for functionality that occurs on different screens, e.g. processing address data or opening a specific screen. For each instance of an Actionflow, you specify the data that the Actionflow uses by mapping onto its Connection Points.
Actionflows are reusable because the inputs to the Actionflow are separate from the Actionflow itself, allowing instances of the Actionflow to be used in different contexts with data from many different sources.
Instances
For each instance, only the data coming into and out of an Actionflow changes. You can easily map a different input source to the attributes on the Connection Points.
Each time you connect an Actionflow to a different input, you create a new instance of the Actionflow.
- Instance 1 = input A + Actionflow
- Instance 2 = input B + Actionflow
Note |
---|
When you reuse an Actionflow, you do not create a copy of it. You are using the Actionflow itself. An instance is the combination of the Actionflow and its inputs. If you make a change to an Actionflow that has multiple instances, the same change occurs in all the instances where it is used. |
How to Reuse an Actionflow
Select an existing Actionflow to reuse, and drag and drop them as required.
Click theReusability Example
The diagram below illustrates an Actionflow that normalises the format of data. The Actionflow is reused by two applications, shown on the left. Each application has separate data which is mapped onto the Connection Point for its instance of the Actionflow:
- Instance 1 of the Actionflow:
Postcode
data from the Contact App - Instance 2 of the Actionflow:
Zip Code
from the Asset Manager App.
For more information on this example, see 1.01 Actionflow Basics.
Tip |
---|
To make Actionflows reusable between different applications they must belong to a package which is shared between the two applications. |
Locating and Opening Instances
- Open an Actionflow and in the Settings, above the canvas, there is an option for Show all instances
- The amount of instances of this Actionflow can be seen in brackets
3. Click Show all instances to display a list of the instances where the Actionflow is being reused, along with that instance's data source, the component and the event type that initiates the Actionflow
Startup Actions
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
- Opening a landing screen
- Opening a navigation menu bar
Configuring Startup Actions
Adding a Screen to the Startup Action
- Open an application
- On the
home page, right-click on a screenInsert excerpt _screen_home _screen_home nopanel true - Select
Insert excerpt _startup_open _startup_open nopanel true - If a Startup Action already exists, this screen will be added to it
- If no Startup Action exists, one will be created
Tip |
---|
Multiple screens can be added to the Startup Action. |
Removing a Screen from the Startup Action
- Open an application
- On the
home page, right-click on a screenInsert excerpt _screen_home _screen_home nopanel true - Select
Remove from the Application Startup Action.Insert excerpt _startup_IconOnly _startup_IconOnly nopanel true
Viewing Existing Startup Actions
- Open an application
- Click on the
button in the header barInsert excerpt _home _home nopanel true - Select
to see the current active Startup Actions for your applicationInsert excerpt _startup _startup nopanel true - The icons indicate the defaults set:
- indicates a default desktop Startup Action
- indicates a default mobile Startup Action
- Double-click on an action to view more details
- New Startup Actions can be added by pressing
Insert excerpt _addIcon _addIcon nopanel true
Worked Example
Here's a worked example using the School Data (available from the Learning Centre).
In this example, we are using:
- A Home screen containing text and an image - this screen was created using the Landing Screen 1 template
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, this data has already been pre-loaded into the Actionflow Foundation Application. For this example, we'll be working on the Home screen. |
We want to configure a message on the Home screen to display the user's full name when they open the application.
Configure the Startup Action
- Open the Startup Actions for the application by clicking on the
button in the header barInsert excerpt _home _home nopanel true - Select
to see the current active Startup ActionsInsert excerpt _startup _startup nopanel true - Double-click Default Menu to open the Startup Action
Insert excerpt _property_settings _property_settings nopanel true - Click on the Actionflow link to open the Actionflow
- On the Actionflow canvas are the two screens that open when the application starts
- Click on the message
action to open itsInsert excerpt _action_calculate _action_calculate nopanel true Insert excerpt _property_settings _property_settings nopanel true Double-click on the Output Attribute, pfMessage, to open its
and make the following changes to the Expression:Insert excerpt _property_settings _property_settings nopanel true Code Block theme Emacs _user.firstName + " " + _user.lastName
Expand title Checkpoint
Close the Actionflow and reload the page to run the Startup Action