Reusable expressions are used to avoid duplicate work, when particular expressions occur (or are expected to occur) multiple times within an application |
For the design guide on how to model logic see Decision Management guide.
For more information on what you can use in an Expression, please refer to the Reference Guide for Expression function reference.
A reusable expression is a piece of logic that is reused throughout your application. We speak of a reusable expression to indicate that the purpose of it is to be reused, in Blueriq Studio this is shortened to expression.
With reusable expressions you can substitute parts of your logic with that reusable expression, which shortens your logic and makes it more understandable as well as maintainable.
There are two ways to create a reusable expression:
Create a reusable expression via the Expression button
Property | Description |
---|---|
Cluster | Optionally select the name of the cluster from the drop down list. |
Name | It identifies the object. Maximum 100 characters (only letters, numbers and underscores (_)) are allowed. |
Functional name | Optional, can be used in documentation |
Description | Optional |
Expression | The actual expression is filled in here |
Create a reusable expression from the expression editor
Once you have created reusable expressions, you can use them in any logic element. There are two ways to insert a reusable expression in a logic element:
The reusable expression has to be a valid expression by itself. It is evaluated before the main expression, and the result is used by the main expression. It is not a form of string-replacing. |
For performance reasons we advise to limit the use of reusable expressions to a minimum. |