How to… create & call Actionflows

Actionflows can be used to group together a collection of actions which can be called from multiple locations in the same application. By placing them in a separate flow, it prevents the need to maintain the list of actions for each individual item and avoids repetition.

Actionflows are used in an app by executing using the ‘Call Actionflow’ action. This can be added to an ‘Actions’ tab, On-Load event or even another Actionflow.

Topics covered in this article

1. Add & Configure an Actionflow
2. Call an Actionflow

1. Add & Configure an Actionflow

As Actionflows can be used across multiple pages, they are treated as a separate type of app content (along with Pages, Components and Dataflows). They can be accessed by selecting the  ‘Actionflows’ tab near the top of the App Content screen.

New Actionflows can be added by pressing the ‘Create Actionflow’ button. Alternatively you can enter an existing Actionflow by selecting its name from the list.

To assist with the management of Actionflows, the standard controls are available at the top of the App Content screen. This allows you to to carry out a range of tasks, including enabling Edit Mode, launching Live Preview, accessing the config screens, or previewing the app. By opening Edit Mode it is also possible to duplicate, edit or delete an existing Actionflow.

1a. Edit an Actionflow

The editor displays a list of actions which will be executed when the Actionflow is called. These will be carried out in the order they are displayed and where applicable, action logic can also be included to create branches in the flow or loop over an array of objects.

To add a new action to the flow simply locate it within the Toolbox and drag it to the desired point in the Actionflow. Pressing on the action will expand its details, allowing you to configure any settings (e.g. config item names, parameters, required fields).

The Actionflow Editor provides a similar set of buttons to the Page Editor, allowing you to preview the app, open Edit Mode or use the Quick Nav to switch to other Actionflows. To return to the App Content screen, select the arrow in the upper left corner.

2. Call an Actionflow

Once the Actionflow has been configured it can be used within an application through the ‘Call Actionflow‘ action. This can be included in a number of different areas, including the ‘Actions’ tab of an item, an On-Load style event or even another Actionflow.

The ‘Actionflow’ droplist within the action can be used to specify which Actionflow you wish to call.

In addition, if the action has been included within the ‘Actions’ tab of an item it may also be necessary to select the event which should be used to trigger it. In the case of Actionflows, this is set through a single droplist within the ‘Call Actionflow’ action, with the selected option applying to the entire flow.