<< Click to Display Table of Contents >> Data Model Viewer |
Overview
Expression elements allow you to enter instructions as code to carry out any type of task. Expressions can perform calculations and validations using XPath functions. The Expressions interface has several options that allow easy interaction and accelerates the Process of writing a rule. The Data Model option allows you to build XPaths to use in the expression, select the data source, include values from parameter entities and filter collections.
Select a data source
The Data Model window allows you to select the initial data source for your XPath, either to start from the Process Entity or start from any Entity by clicking on the Data Model tab or Entities tab respectively.
Build your XPath
Once you've selected your starting point, you can continue navigating through the entity's attributes. On the right panel you can see the attributes of the selected entity. When you click any attribute it will be added to the data model. As you explore the attributes a data model will appear along with the XPath to the attribute you've navigated to on Navigation XPath.
This data model will be color coded depending of the type of attribute you've navigated to whether it is an entity, a collection, an attribute or a data value.
Different entity types can be identified by the icon they have on the upper left corner as described below.
Icon |
Entity type |
---|---|
Application |
|
Master |
|
Parameter |
|
Persona |
|
System |
In case you wish to delete the last attribute of your XPath, you may do so by clicking on the icon that appears on the upper right corner when you hover over the attribute. The attribute would disappear from the diagram and from the XPath.
This icon is also visible for the first attributes due to that sometimes you may wish to delete some of the previous attributes for a function. When you delete previous attributes they will be hidden from the XPath and will be faded from the diagram.
To add the previous attributes, just hover over the attributes and click the icon that will appear on the upper right corner.
Filter collections
Data Model allows you to filter collections by hovering over one shape and selecting Add Filter.
A window will appear where you can set your filter.
After you have set your filter, it will appear on the XPath notation.
Obtain values from Parameter entities
In order to obtain values from parameter entities you need to first go to the Entities tab and select a Parameter entity.
Next, hover over the entity and click View values.
A window will appear where you can select the value you wish to display. Once selected click OK.
Notice how the Navigation XPath changes from entity to value and the selected values appears as the XPath.
Change the XPath notation
Data Model also offers a way to decide how your XPath will be inserted into your expression. There are three possible options: Traditional, Quotes or None.
Choose the one that best suits your need and add the XPath to your expression by clicking on OK.
Notation |
How it is inserted |
---|---|
Traditional |
<OfficeSupplyRequest.ProductRequest.ProductType.Producttype> |
Quotes |
"OfficeSupplyRequest.ProductRequest.ProductType.Producttype" |
None |
OfficeSupplyRequest.ProductRequest.ProductType.Producttype |
Edit entities
In some situations you might want to add, edit or delete an attribute from an entity without having to move from the Expressions editor, with the Data Model Viewer you can easily do that.
Right click the entity you wish to edit and select the Edit option.
The Entity wizard is displayed. There you can modify the entity's attributes as you would normally do in the second step of the Process Wizard.
Last Updated 5/30/2024 10:04:56 AM