1.17 Instances and Reusability

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

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.

  1. Click the  Actionflow icon next to any Actionflow field to display a list of all Actionflows within your application 
  2. Drag the selected Actionflow from the Repository onto the Actionflow field
  3. The Actionflow opens for you to specify the input data required for the new instance

Reusability 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.

To make Actionflows reusable between different applications they must belong to a package which is shared between the two applications.

Locating and Opening Instances

  1. Open an Actionflow and in the Settings, above the canvas, there is an option for Show all instances
  2. 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