You are viewing the documentation for Blueriq 15. Documentation for other versions is available in our documentation directory.

What is it for?

A flow is used to model the path(s) that can be taken through the application. 

Learn more about the flow properties, start node, exit / end node, condition node, action nodes such as subflows, service calls, function calls, and the repeat expression. 

What is it?

A flow is a graph-like structure that can consist of these flow-nodes:

What does it do?

You can use flows to create event-driven applications. This means the occurrence of an event can determine the path the application is taking within the flow. The path that is taken, in its turn, determines which events may occur.

How to create a flow?

  1. Select the Home tab

  2. From the Flows group select the Flow icon

  3. Fill in the required fields

  4. Create a flow composition. By right clicking within the composition field you can add:

    • Action nodes

    • Condition nodes

    • Exit nodes (also called End node)

  5. Click Save or Save & close

How to create a subflow from within a flow?

The readability of a flow often decreases with a growing size of a flow (i.e. the number of nodes in a flow). To keep flows readable, it is possible to create chunks by creating subflows. To conveniently do this, Blueriq Studio offers to possibility to select multiple nodes in the flow and click the "Create subflow" button in the top right corner: , after which a name of the subflow needs to be entered and flow event need to be mapped. Beware that regular flow restrictions do apply here as well. That means that there can be only one incoming node in the subflow while there can be multiple exit nodes.

Flow properties

A flow has several properties, such as (functional) name, flow type, description and if it's exposed or transactional. In the table below each of these properties are explained further. 

PropertyDescription
NameIdentifies the object. Maximum 50 characters (only letters, numbers and underscores (_)) are allowed.
Functional NameOptional, can be used in documentation
Flow typeOptions are functional, external and (regular) flow. See also Flow types

Exposed (flow)

Tick this box if the flow should be accessible from outside the application. Once you have ticked this box it is possible to define which roles and channels you will need to start this flow. 
Transactional (flow)

Tick this box if all changes to the profile made in the flow need to be either committed or discarded all at once, depending on which exit type is taken (OK or Fail).

Please note that the system and system.user instance are not rolled back to its previous state. This means that values such as system.event might have been altered inside the transactional flow even if it failed.

DescriptionOptional


Flow start node

What is it?

The start node indicates where that specific flow starts. You have to connect the first component (page, flow or service) to this start node.

It is not possible to start a flow (in runtime) from Studio. You can do this from the runtime dashboard. To achieve this, create an exposed flow and connect the start node to a component, e.g. a page. 



Flow action node

What is it?

Actions nodes are used as placeholders for Page, Flows, Service call and Function calls.

For more information on types of Service call, see Service call types.

For more information on types of Flows, see Flow types.

How to add a new action node

There are three possible ways to add an new action node:

  1. Hovering over the node exit after which you want to add the action node

  2. Drag and drop via the list view of the object of you choice

  3. Via the Flow tab → Components group → Add flow/page/service to diagram button

Adding an action node by hovering over the node exit

  1. Hover over the node exit after which you want to add the action node.

  2. Click the link icon and drag it onto an empty spot in the flow canvas.

  3. A menu will appear in which you select add action node. Click on the type of action node you want to add.

  4. Open the drop down menu in the node and click on the object of your choice.

Adding an action node by drag and drop via the list view

  1. Open the list view of the object you want to add.

  2. Drag the object of your choice and release it in the flow canvas.

  3. Hover over the node exit after which you want to add the action node.

  4. Click the link icon and drag it onto the new placed object.

Adding an action node via the Flow tab

  1. Select the Flow tab.

  2. From the Components group select the Add flow/page/service to diagram icon.

  3. Select the type of action node you want to add. A crosshair will appear.

  4. Click on an empty spot in the flow canvas.

  5. Open the drop down menu in the node and click on the object of your choice.

  6. Hover over the node exit after which you want to add the action node.

  7. Click the link icon an drag it onto the new placed object.

How to delete an action node

  1. Select the action node you want to delete.

  2. Use the delete icon next to the node (or the icon Delete note in the Nodes group of the Flow tab).



Flow condition node

What is it?

A condition node describes where to proceed depending on whether a condition is met or not. 

How to add a condition node

There are two possible ways to add a condition node:

  1. Hovering over the node exit after which you want to add the condition node.

  2. Via the Flow tab → Components group → Add condition to diagram button.

Adding a condition node by hovering over the node exit

  1. Hover over the node exit after which you want to add the condition node.

  2. Click the link icon and and drag it onto an empty spot in the flow canvas.

  3. A menu will appear in which you select Add condition node.

  4. Double click on the condition node. This will open the condition editor.

  5. Edit the condition.

Adding a condition node via the Flow tab

  1. Select the Flow tab.

  2. From the Components group select the Add condition to diagram icon. A crosshair will appear.

  3. Click on an empty spot in the flow canvas. The condition node will appear.

  4. Double click on the condition node. This will open the condition editor.

  5. Edit the condition.

  6. Hover over the node exit after which you want to add the condition node.

  7. Click the link icon an drag it onto the newly placed condition node.


PropertyDescription
Condition labelText placed in the condition node
Condition fieldThe expression in this field should represent the condition
Alternative labelText placed in the connectors
AlternativeThe expression in this field should represent the possible outcome of the condition. The alternatives are checked in order from top to bottom.

You can use [] to mean 'else' in a condition node alternative. This catches all values that are not covered by other alternatives, including unknowns (this is different behaviour than in decision tables!).

The expression in the condition field can be seen as the left side of a logical equation, an expression in the alternatives field as the right side of the equation.


Flow exit node or end node

What is it?

There are 2 possible exit points of a flow: OK and Fail.

The OK exit node means that the every step in the flow was carried out as planned. The Fail exit node is used when something went wrong or when user input should not be saved.

There are two possible ways to add an exit node:

  1. Hovering over the node exit after which you want to add the exit node.

  2. Via the Flow tab → Components group → Add ‘OK’ or ‘Fail’ end point.

Adding an exit node by hovering over the node exit

  1. Hover over the node exit after which you want to add the exit node.

  2. Click the link icon and drag it onto an empty spot in the flow canvas.

  3. A menu will appear in which you select add exit node and the type of exit node.

Adding an exit node via the Flow tab

  1. Select the Flow tab.

  2. From the Components group select the type of end point you want to add. A crosshair will appear.

  3. Click on an empty spot in the flow canvas.

  4. Hover over the node exit after which you want to add the end point.

  5. Click on the link icon and drag it onto the end point.



Rearranging the composition of a flow

You can change the composition of a flow in various ways. You can:

  • Change the object inside a flow node

  • Change the connectors between flow nodes

  • Add, remove and drag connector point in a flow

  • Change the location of a node and/or its exit in a flow

  • Change the size of a flow node

  • Change the icon of a flow node

  • Group flow nodes


Change the object inside a flow node

To change the object inside a node, click on the node. Using the drop down menu you can select the new object. Note that only objects of the corresponding type are shown.

Change the connectors between flow nodes

To change the endpoint of a connector from one node to another, hover over the endpoint and drag the link icon onto the new target node. You can also delete a connector by clicking the delete icon at the start of the connector.

Add, remove and drag connector point in a flow

You can add a point to a connector by double-clicking on it. Removing points from a connector is also done by double clicking on it. By dragging connector points you can change the visual shape of the connectors.

Change the location of a node and/or its exit in a flow

You can change the location of a node by dragging it to another spot on the canvas. The exit of a node can be relocated around the edges of the node by dragging it.

Change the size of a flow node

You can change the size of a node by hovering over the lower right corner. When the resize icon appears, dragging it will resize the node.

Change the icon of a flow node

Action nodes have an icon in their upper left corner that in default corresponds to their type. Because the shape of the node itself also reveals its type you can change the icon. Select or hover over the node and click on change icon on the right side of the node. Another way is selecting the node and clicking Change action type icon in the flow ribbon nodes tab.

Group flow nodes

Nodes together that can be seen as a sub flow can be grouped. Grouping is just a visual aid to clear up your flow. Select multiple nodes by holding down the ctrl-key and selecting the nodes or by dragging a rectangle around the nodes. In the upper right corner of the editor window a grouping icon appears. This icon can also be found in the Flow ribbon Groups tab. If you click on it a frame is shown around the grouped nodes. You can label this group by using the text field. Click on collapse group to hide the elements of the group. You can resize the group the same way you resize a node. To expand the group click the expand icon. Nodes can be ungrouped by clicking the ungroup icon.

Specialize a flow

In earlier versions of Blueriq Studio, flows could only be specialized as a whole. Starting with Blueriq Studio 7, elements within a flow can be specialized.


REPEAT flow

You can repeat a subflow (flow in a flow) with a repeat expression. To do this select the subflow and you will be presented with a box in the right top corner.


A repeat expression is an expression that results in a set of instances. For each instance in the set that results from the repeat expression, the flow is repeated. With each repetition an instance from the set is activated. You can determine the order in which the instances are activated by sorting on the value of an attribute (both ascending and descending). As the repeat expression is evaluated before the flow is repeated, alterations made on that set do not affect the repeat. Provided of course that you do not delete an instance that is used in the repeat. But if you were to add instances of Person in a flow while you are repeating over all instances of Person, the flow will repeat only over the originally existing instances.

Restrictions on repeat flows

The following restrictions on repeating a flow apply:

  • The flow that is repeated cannot contain pages

  • The flow that is repeated can only have one exit node

These restrictions ensure that a flow is repeated the same way for each instance. You can use a condition node in a repeat flow, as long as the flow ends with one exit node.


Repeat flow exit nodes

The expression can result in zero or one and more instances, when modeling this difference has to be taken into account. In case you attach an event name to the exit node in the subflow, you will get two exit nodes in your flow:

  • one with the event name and
  • one without (only showing '[commit]').

The first exit node will be used in case the expression results in one or multiple instances. The latter (without event name) is triggered when the expression results in zero instances. Both situations have to be modeled, otherwise you could get unexpected behavior. In case you don't attach an event name to the exit node in the subflow, you only see one exit node with '[commit]' in the flow. In that situation the exit event will be taken for zero, one or more results. In case the expression results in zero the subflow will be skipped and it continues with the 'main' flow. 

Contrary to the repeat expression on a container, a repeat expression on a flow can also be an expression that results in an integer N (e.g. a COUNT or SIZE), or simply an integer. This repeats the flow N times, but there are no instances activated.

To illustrate this with an example: the expression ALL Person repeats the flow for all the instances of Person and activates an instance of Person in each iteration. The expression COUNT(Person) repeats the flow an equal number of times as well, but does not activate any instances. This means that, provided Person is in scope, if you would ask the value of Person.Name, in the first case you would get all the different names, while in the second case you would get the same name every time.


Repeat over primitive values

It is possible to repeat a flow for all primitive values in e.g. a multivalued attribute. When the expression results in a multivalued result of a primitive type, additional fields become available upon losing focus of the expression editor. Additionally, you can no longer specify a sorting attribute as the primitive value itself is used for determining the sort order.


As the repeat value, you specify a target attribute that is populated with the current iteration value, such that within the repeated flow you may access the current value using that attribute. The data type of the repeat value attribute must be compatible with the primitive type that is being iterated over. Once the repeat flow completes, the previous value of the attribute is restored or cleared if it was unknown before.


3 Comments

  1. I'm missing the documentation regarding the exception exit nodes? Where can I find that documentation?

  2. I do not read here that exit nodes are advised, while Blueriq does give me a validation warning when creating flows without exit nodes.
    For example: A flow containing a page with a project widget would not need an exit node.

    My opinion is that the warning is not necessary.