Chained resolver
While all other Resolvers are typically added to a value configuration by interactive selection in a context menu, a Chained resolver becomes exclusively an indirect part of a configuration.
A Chained resolver is automatically created when a value configuration for which exactly one value resolver is already selected (e.g. an Object property value resolver, see image above right) is extended by adding a second value resolver to a value resolver chain (see below right). As soon as the mouse cursor is moved into the area of an existing value configuration, value resolver |
Initial situation: Single value resolver
Adding another value resolver via the
|
|
The XML definition for the initial situation (see image above right) contains exactly one element, namely the Object property value resolver (PropertyResolver). |
<core:PropertyResolver xmlns:core="CORESYSTEM"/> |
|
The XML definition for the value resolver chain (see figure below right) of two value resolvers contains three elements, since an automatically generated Chained resolver combines both Object property value resolvers. |
<core:ChainedResolver xmlns:core="CORESYSTEM"> |
►NOTE◄
If, after removing value resolvers from a value resolver chain, only a single value resolver remains, a Chained resolver is no longer required. It then disappears automatically.
A Chained resolver cannot be added within a value resolver chain to separate a subset of value resolvers from the rest.
Processing logic
As indicated by the arrow in the screenshots, an input value applicable in context is typically passed to the chained value configuration 'from above', if applicable.
In the context of a value resolver chain, the return value of a processed value resolver is made available as an input value to a directly chained successor, if applicable.
If no successor exists, then the return value of the last value resolver of the chain defines the 'final result' for the entire value configuration.
Example:
A rule should check in the context of a company account (see Company accounts) whether the postal code specified in the company address has less than 5 characters. In the example on the right, an Entity property rule is AND-linked with the Check type on the 'Company account' type. Value configuration for the left side of the Entity property rule is configured as a value resolver chain of three Object property value resolvers as shown:
►NOTE◄ Instead of a chain of Object property value resolvers, in many cases it is possible to replace them by a single Object property value resolver in which the property names are chained via a full stop (.). In the example it works like this:
|
|
Specific example:
Following the example above, two value resolvers were added to the existing value resolver chain:
Result: Only the last two value resolvers in the chain are processed at all, since the static text at line item 4 makes further 'inquiries' (above) superfluous. The companyAddress variable is therefore not filled until the static test text value (8800) is removed again. |
|