You are viewing the documentation for Blueriq 17. 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:

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.


Flow properties

A flow has several properties, flow type, and if it's exposed or transactional. In the table below each of these properties are explained further. 

PropertyDescription
Flow typeOptions are functional, dcm-widget external and (regular) flow. This property is optional. The runtime will fall back to the regular flow if this property remains empty. 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.

Flow action node

What is it?

Actions nodes are used as placeholders for Page, Flows, Service calls 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 two possible ways to add a new action node:

  1. Select the exit node after which you want to add an action node, drag the link icon to an empty spot, and select the type of action node you want to add.
  2. Right click on an empty spot in the flow canvas and select add action node from the menu. 

How to delete an action node

There are two possible ways to delete an action node:

  1. Right click on the action node you want to delete and choose remove. 

  2. Select one or more nodes and use the delete key on the keyboard. 


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 new action node:

  1. Select the exit node after which you want to add a condition node, drag the link icon to an empty spot, and select add condition. 
  2. Right click on an empty spot in the flow canvas and select condition node from the menu. 


PropertyDescription
Condition labelText placed in the condition node
Condition fieldThe expression in this field should represent the condition
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 behavior 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.

To add an exit node:

  1. Select the node after which you want to add an exit node, drag the link icon to an empty spot, and select the exit node you want to add.
  2. Right click on an empty spot in the canvas and select the exit node you want to add.

Flow DCM widget event node

What is it?

DCM widget event nodes are used the send change events when DCM Widget Flow has ended.

A DCM widget event node is only configurable when using the DcmWidget flow type, it replaces the use of an exit or end node.

For more information on types of change events see DCM widget events.

How to add a new DCM widget event node

DCM widget event nodes can only be added in DCM widget flows.

There are two possible ways to add a new DCM widget event node:

  1. Select the exit node after which you want to add a DCM widget event node, drag the link icon to an empty spot.
  2. Right click on an empty spot in the flow canvas and select add DCM widget event node from the menu. 

How to delete an DCM widget event node

There are two possible ways to delete a DCM widget event node:

  1. Right click on the DCM widget event node you want to delete and choose remove. 

  2. Select one or more nodes and use the delete key on the keyboard. 

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

To change the object inside a node, select 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, select the exit node and drag the link icon onto the new target node.

Add and remove a waypoint in a flow

You can add a waypoint to a connector by double-clicking on the edge (line). Removing waypoints from an edge is done by double clicking on it. 

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.

  • Holding the CTRL-button while resizing a node will lock the node on its axis.
  • Holding the SHIFT-button while resizing a node will resize if from its center.  

Multi select to delete or move en masse

By dragging a square or holding the CTRL-button while selecting items (nodes, connectors, waypoints), it is possible to select multiple nodes in order remove the selection or move the selection.

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 commit 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 commit exit node.

Repeat flow exit nodes

The expression can result in zero or 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, the following exit nodes are possible:

  • one with the event name and
  • one without (only showing '[commit]')
  • optionally one or more exit events of type Rollback

The first exit node will be used in case the expression results in one or more 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 that exit event will always be taken, regardless of the number of results. In case the expression results in zero the subflow will be skipped and it continues with the 'main' flow. 

Next to these events, you can also model cancel events, which break the repeat flow. You can have multiple of them, to distinguish between different error cases (e.g. a webservice call failed versus a record already exists in a system). The cancel events respect the transactionality of the flow, so either the profile is saved after the cancel (in a non-transactional flow) or it is roll-backed entirely (in a transactional 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. 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.

 

How to create a subflow from within a flow

The readability of a flow often decreases with a growing size (i.e., the number of nodes in the flow). To keep flows readable, it is possible to create chunks by creating subflows.

To conveniently do this, select multiple nodes, then right-click one of the selected nodes and choose "Create subflow". Then the name of the subflow needs to be entered, and optionally, flow events 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.

  • No labels