You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
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:
- Function calls
Subflows (a flow in a flow)
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 propertiesA flow has several properties, flow type, and if it's exposed or transactional. In the table below each of these properties are explained further.
|
Flow action nodeWhat 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 nodeThere are two possible ways to add a new action node:
How to delete an action nodeThere are two possible ways to delete an action node:
|
Flow condition nodeWhat is it?A condition node describes where to proceed depending on whether a condition is met or not. How to add a condition nodeThere are two possible ways to add a new action node:
You can use 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 nodeWhat 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:
|
Unable to render {include} The included page could not be found. |
Rearranging the composition of a flowYou can change the composition of a flow in various ways. You can: Change the object inside a flow nodeTo 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 nodesTo 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 flowYou 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 flowYou 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 nodeYou can change the size of a node by using the risize handle in the lower-right corner. When the resize icon appears, dragging it will resize the node.
Multi select to delete or move en masseBy 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 flowYou 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 flowsThe following restrictions on repeating a flow apply:
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 nodesThe 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:
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 To illustrate this with an example: the expression Repeat over primitive valuesIt 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. |