Assignment Module In Rules
From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS
Contents |
Assignments Module In Rules
In previous versions of Bizagi, the users made assignments (set values to variables or XPaths) in the expressions module. However, it is now possible to do these assignations using the Assignment Module.
Create an Assignment box and click on Properties in order to make the assignment.
When the Assignments window has opened, the user can Add, Remove or Change the order in which the Assignments are going to be executed.
When creating a new Assignment choose to assign a value from the following options
- Value
- Xpath
- Expression
- Vocabulary
- Entity value
If a variable is required, first declare it using the Declare variables Module in the Expression. For further information refer to Declare Variables.
Value
1. Select the variable or XPath to assign a value to.
2. Then, declare the Attribute Type (Boolean, Date Time, Decimal, Integer, String). After choosing a type, the value that is going to be assigned to the attribute has to be selected. Bizagi will ask for the value in a different way depending on the Attribute Type selected.
For a Boolean, the user should click on the CheckBox to set the value to True.
For DateTime, a calendar is displayed.
For Decimal, the user should type the value.
For String, a textbox is enabled.
XPath
If the user decides to assign an Xpath expression, a new window will be opened.
In the new window, the user can choose an attribute that can be in a collection. If it is not in a collection, a value will be returned.
If the Attribute is in a collection, the user can select the value by using functions. i.e. the user will be able to decide whether to assign a sum, average, a max value, etc. of the values in the collection to the destination attribute.
The user will also be able to filter in the collection in order to select only the attributes that match a condition.
If it is decided to assign a collection, it is possible to select only distinct values.
Expression
Expressions are used to assign a value that a user has to type. It could be a number, a string or an XPath.
If it is a string, use quotes. i.e. 'Mary'
In the image below, an example of how to assign using an XPath expression, is given. The user is assigning the result of the expression <count(idRequest.Products[idProductSubtype.idProductType.Code = '1'])> to the Attribute CountCredits. Click for more information about XPath Expressions.
Vocabulary
If the Vocabulary has been previously created, the user will be able to select the desired Vocabulary when choosing this assignation method. Click for more information about Vocabulary.
Entity
The last Assignment option is Entity, as shown in the image below. This gives the user the option to assign a value contained in an Entity, it could be a master entity or a parameter entity.
1. The user should select the Entity in which the value is contained.
2. Select the Attribute (Attrib), whose value is going to be obtained.
Then, if the attribute value is already known, it should be selected in the Simple Validation option.
The Complex Validation option allows the user to filter the entity and return the value that complies with the condition.
<comments />