Microflows

Last modified: November 19, 2024

Introduction

Microflows allow you to express the logic of your application. A microflow can perform actions such as creating and updating objects, showing pages and making choices. It is a visual way of expressing what traditionally ends up in textual program code.

Microflows run in the runtime server and can therefore not be used in offline apps. For application logic within offline apps, see Nanoflows. For information on how nanoflows and microflows differ, see the Differences between Microflows and Nanoflows section in Microflows and Nanoflows.

This page is a summary of the elements which make up a microflow, together with their visual representation within the microflow. It also covers keyboard support when editing microflows.

For the properties of the microflow itself, see Microflow Properties. For more best practice details, see Microflow Naming Conventions, Microflow General Best Practices, and Microflow Best Practices from the Community.

For information on using microflows as data sources, see Microflow Source.

Microflow Notation

The graphical notation of microflows is based on the Business Process Model and Notation (BPMN). BPMN is a standardized graphical notation for drawing business processes in a workflow.

A microflow is composed of elements. Below is a categorized overview of all elements. The following categories are used:

  • Events represent start and endpoints of a microflow and special operations in a loop.
  • Flows form the connection between elements.
  • Decisions deal with making choices and merging different paths again.
  • Activities are the actions that are executed in a microflow.
  • Loop is used to iterate over a list of objects.
  • Parameter is data that serves as input for the microflow.
  • Annotation is an element that can be used to put comments in a microflow.

Events

Events represent start and endpoints of a microflow and special operations in a loop.

Graphic Name Description
Start Event A start event is the starting point of the microflow. A microflow can only have one start event.
End Event An end event defines the location where the microflow will stop. Depending on the return type of the microflow in some cases a value must be specified. There can be more than one end event.
Error Event An error event defines a location where the microflow will stop and throw an error that occurred earlier. If you call a microflow, you may want to know whether any errors occurred within the microflow or not.
Continue Event A continue event is used to stop the current iteration of a loop and continue with the next iteration. Continue events can only be used inside a Loop.
Break Event A break event is used to stop iterating over the list of objects and continue with the rest of the flow after the loop. Break events can only be used inside a Loop.

Flows

Flows form the connection between elements.

Graphic Name Description
Sequence Flow A sequence flow is an arrow that links events, activities, decisions, and merges with each other. Together they define the order of execution within a microflow.
Annotation flow An association is a connection that can be used to connect an annotation to another element.

Decisions

Decisions deal with making choices and merging different paths again.

Graphic Name Description
Decision A decision makes a decision based on a condition and follows one and only one of the outgoing flows. There is no parallel execution in microflows.
Object Type Decision An object type decision is an element that makes a choice based on the specialization of the selected object. You can give the specialized object a name using a cast object action.
Merge A merge can be used to combine multiple sequence flows into one. If a choice is made in a microflow and afterwards some common work needs to be done, you can combine the two (or more) paths using a merge.

Activities

Activities are the actions that are executed in a microflow:

Activity

Loop

A loop is used to iterate over a list of objects:

Loop

For every object the flow inside the loop is executed. A loop activity can contain all elements used in microflows, with the exception of start and end events.

Parameter

A parameter is data that serves as input for the microflow.

Parameter

Parameters are filled at the location from where the microflow is triggered.

Annotation

An annotation is an element that can be used to put comments in a microflow:

Annotation

Item Usages

Studio Pro visualizes which items are used by the selected element (or elements). It does this by showing the used items in white text on a blue background. Conversely, elements that use the item (or items) returned by the selected element (or elements) are marked with the word ‘Usage’ in white text on a green background.

In the example below, the parameter AccountPasswordData is highlighted because it is used in the selected activity (Retrieve Account). And the activity Save password has a Usage label because it uses the object returned by Retrieve Account.

Keyboard Support

For an overview of the shortcut keys that are supported in the microflow editor, see the Microflow, Nanoflow, and Rule Editor Shortcut Keys section in Keyboard Shortcuts.

Microflow Debugging

If you want to see what happens while a microflow is executing, you can use the microflow debugger. See the following how-tos:

Converting a Microflow to a Nanoflow

To convert a microflow to a nanoflow, you have two options. The first option is to right-click anywhere in the microflow editor and select Convert to nanoflow. Alternatively, in the App Explorer, right-click on the name of the microflow you want to convert, and select Convert to nanoflow.

Convert to nanoflow

A new nanoflow is created and added to the same directory, and you can get consistency errors if there are actions that are not supported by nanoflows.

Canvas Interaction

In the microflow editor from Studio Pro 10.6, you can use common patterns like unlimited canvas, enhanced zoom and scroll, and a snap-to-flow to make new activities from the toolbox and toolbar always well aligned in your flow.