Just as it is explained in the Xpaths section, Xpaths allow the user to traverse the Data Model in an intuitive way in order to set or access information of an attribute.
When a Boolean expression considers a collection it is necessary to define the expression using Custom Xpaths, which provide a way to reach attributes of a collection of the Data Model, and use Functions and filters so that the user can check information and control the flow of the Process.
In general, an XPath allows an attribute or collection to be accessed via a coded expression. Its syntax is as follows.
When an XPath is used to access a collection, it is necessary to use a function (Count, Sum, Average, Max, Min, etc.), additionally filters con be applied. For example, we want to build an expression validating that there is at least one record that satisfies a condition.
count(<Entity.Collection[Entity.Attribute = True or False]>) > 0
•To add an XPath to a Boolean Expression, there is no need for the user to write it. In the Expression manager, the user will find all the options to browse the Data Model and build the XPath with its associated functions and filters.
•Generally, to use Xpaths in any part of an application, there will be menus to help navigate the Data Model. This gives the power to the user to find the attributes he/she wants to access without the need of writing the XPath by hand.
In order to create a Boolean Expression using Custom Xpaths, follow the steps described in this example.
Editing Custom Xpaths
Custom Xpaths can be edited in order to allow flexibility in those cases where Business conditions change, or to permit changes to those expressions that were initially defined.
In the Custom Xpaths option, in the XPath tab, the Edit XPath button will be available.
Select the XPath that needs to be edited and then click on Edit XPath. A window will emerge, providing all the editing options for Xpaths that were previously described. In this window all the required changes can be made.
After editing the XPath, applying any necessary filters and clicking OK, you will be returned to the Expression manager where the edited XPath can be used in the expression.