Microflows

Last modified: January 11, 2024

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

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.

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

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

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

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

2.4 Activities

Activities are the actions that are executed in a microflow:

Activity

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

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

2.7 Annotation

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

Annotation

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

3 Keyboard Support

3.1 Studio Pro 10.6 and Above

The tables in the following sub-sections present the shortcut keys that can be used for navigating and manipulating microflows in the microflow editor in Studio Pro 10.6 and above.

3.1.1 Selection

Key Effect
Arrow Keys Select nearby element (activity, event, loop or parameter) in the direction of the arrow.
Home Select the start event.
End Select the first end event.
Ctrl + a Select all elements.
Tab If a loop is selected, the first element inside the loop will be selected.
Shift + Tab If an element inside a loop is selected, the loop itself will be selected.

3.1.2 Navigation

Key Effect
mouse scroll Scroll up/down.
Shift + mouse scroll Scroll left/right.
Space + mouse button Drag screen.
Ctrl + +/- Zoom in/out.
Ctrl + 0 Reset zoom level to 100%.
Ctrl + mouse scroll Zoom in/out.

3.1.3 Element Manipulation

Key Effect
Enter - on an element If an element is selected, edit its properties.
Enter - on a flow arrow If a flow arrow is selected, open the Logic Bot dialog box.
Enter - on a Logic Bot suggestion list item The selected item is added on the flow arrow. The Logic Bot dialog box is shown again for the next action to be added.
Shift + Enter (or Shift + mouse click) - on a Logic Bot suggestion list item The selected item is added on the flow arrow. The element’s property dialog box is opened.
F2 Rename the variable returned by the selected element.
Shift + F2 Edit the caption of the selected element.
Context-menu key Open the context-menu for the currently selected element.

3.2 Studio Pro 10.5 and Below

The following table shows the shortcut keys that can be used in the microflow editor in Studio Pro 10.5 and below.

Key Effect
Arrow keys Move the selection box to the activity or element in the direction of the arrow key. For example, if currently a show page activity is selected and you press the right arrow key, the activity to the right of it becomes selected.
Enter Edit the properties of the selected element.
F2 Edit the name of the return value of the selected activity. This shortcut only functions on activities that return a result.
Shift + F2 or just start typing Edit the caption of the selected element.
Ctrl + arrow keys Move the selected element in the direction of the arrow.
Tab If a loop is selected, the first element inside the loop will be selected.
Shift + Tab If an element inside a loop is selected, the loop itself will be selected.
Home Select the start event.
End Cycle through the end events.
Shift By holding Shift when resizing an activity, it will stay centered at its current position and expand equally in all directions.
Ctrl When pressing the Ctrl, you can select additional activities. Clicking a selected component while holding Ctrl will deselect it.
Context-menu key or Shift + F10 Open the context-menu for the currently selected element.

4 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:

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

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