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.