All product information in wiki.bizagi.com is only valid for Bizagi BPM Suite 9.1.X.
For newer Bizagi BPM Suite versions (10.X and up) please visit the User Guide.
 

Expressions

From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS

Jump to: navigation, search

<keywords content="keywords">rule, Xpath, Expression, Expressions, What is a rule, event, assign, Event, events, Action, actions, visibility, required, edit, condition, conditions</keywords> 

Contents

Expressions

In order to achieve the goals that have been proposed, today companies define special norms or policies that must be fulfilled in certain activities of the daily processes of the organization.  It is common to see that these special conditions or exceptions vary in accordance with the demands of the changing environment.
Bizagi is capable of continuously and dynamically define, verify, and modify a large number of conditions or policies (simple or complex), in accordance with the organization’s demands.

This section of the manual gives a detailed definition of each type of Expression rules that can be defined and created using Bizagi. In addition, there is a step-by-step guide on how to create from the most simple to the most complex Expression rules.

Expression Rules

Expression Rules in Bizagi are the conditions, validations and norms that must be satisfied and controlled within the organization, defined in accordance with the organization’s expected business performance. Expression rules are a fundamental component of Bizagi. 


All expressions use Xpath navigation, which is a mechanism to standardize the language in the tool and makes handling business rules more intuitive for everyone involved. It is very important that before using Expressions, the Xpath concept is understood.


Expressions are associated directly with the processes, that is, they correspond to the rules of transition, assignment, actions or conditions of visibility, mandatory nature or editing of attributes within the forms.

In addition, rules can call upon any Function defined in Bizagi.

Image:Bulletazul.gif How to Create an Expression Rule

Uses of Expression Rules

The use of Expression Rules can be classified into five groups, as follows:

Image:Bulletrojo.gif Expressions associated with Sequence Flows: this expressions are the rules that allow you to verify whether a specific condition is being met at a certain point in the process and the process continues on the path associated with the condition that was met. These rules should always result in true or false and they are associated with the following shapes:

Image:Bulletazul.gif Exclusive Gateway (divergence element)

Image:Bulletazul.gif Inclusive Gateway (divergence element)


Image:Bulletrojo.gif Expressions for fields to be or not: visibile, editable and required: These rules are used to validate information.  That is, they make sure the information is saved properly for the execution of the process, allowing to make an attribute visible, required or editable in a form in accordance with a condition (there is another way to do this that is not handled using these rules but by the options of Behaviours and Actions available for each attribute in the form editor).  




As in the case for the rules of transition, they have the characteristic that they should result in true or false (in other words they have to be boolean).  In order to associate these rules, use the form modeler to follow these steps:


Image:Bulletazul.gif If the field the user is going to modify is in a nested form, first right click on the field  and select Edit Display Form



Image:Bulletazul.gif Select the field where the rule is going to be added in its visual settings. Right click on the field and select the property (visible, editable, or required) and then click on Rule.




Image:Bulletazul.gif The Expression Selection window will open for the user to select the rule (if it was already created) or to create the rule by clicking on the New Boolean button.



Image:Bulletrojo.gif Expressions used in Actions (Events) within a shape:These rules allow the execution of an action at the beginning, on saving or on exiting an activity.  (On enter, on save, or on exit)

Examples: 

Image:Bulletazul.gif Make Calculations

Image:Bulletazul.gif Assign values to attributes

Image:Bulletazul.gif Add or delete records from a Table

Bulletazul.gif Call on components, Interfaces, WebServices



Image:Bulletrojo.gif Expressions to Assign Activities: Assignments have two rules.  One that determines the condition to carry out the assignment and the other to determine the specific user that should carry out the activity.

 

The rules that determine the condition to carry out the assignment always return true or false.  In addition, the rules of assignment determine the specific profile (location, area, position, role and/or skill) or user who should carry out the activity within the process.




Expression type

There are four types of expressions that are used according to the place where they are called upon and the user's needs.



Image:Bulletrojo.gif
Boolean: These are all the rules that return True or False.  The rules that belong to this category can be used in:

Image:Bulletazul.gif Expressions associated with sequence flows

Image:Bulletazul.gif Expressions used as conditions for attributes (fields in the forms) to be (or not) visible, editable or required.

Image:Bulletazul.gif Expressions used to determine the condition to assign an activity.


Example: When the user associates a transition expression (in an exclusive or inclusive gateway), in the list of rules to select, the user can only see the rules that have been cataloged as Boolean. The user will also be able to create New Boolean.



Image:Bulletrojo.gifUser: These are the rules used for assignations and should return an Array List with a collection of user properties. These are used for assignations. In other words, they return one or more idUsers, one or more idLocations, idPositions, idSkills, idRoles, idAreas or any other user property used for assignation.


These rules can also be associated as Actions of the shapes in a process.


Example : When associating an assignation rule, in the list of available rules, only the rules with expression type Users will be visualized by the user. 

 



Image:Bulletrojo.gifScripting: Any rule that do not fall into the categories mentioned above are known as code rules.  These rules can carry out any type of task and they do not have to return any type of data in particular.  The rules that belong to this category can be used in:

Image:Bulletazul.gif Activity Actions (events)

Image:Bulletazul.gif Buttons

Image:Bulletazul.gif Filters

Image:Bulletazul.gif Letters and Notifications



Image:Bulletrojo.gifScripting boolean: These are code rules (just like the Scripting expressions) that must return True or False.  Scripting booleans are advanced boolean expressions because sometimes regular booelans are not enough for what is desired, and need some code writting before the returning value.

Image:Bulletazul.gif Expressions associated with transitions

Image:Bulletazul.gif Expressions used as conditions for attributes (fields in the forms) to be (or not) visible, editable or required.

Image:Bulletazul.gif Expressions used to determine the condition to assign an activity. 


Expressions in Production

When a project has been deployed, some elements like Expressions will have some restrictions to avoid possible problems with subsequent deployments. For this reason, when an Expression is already in production it will not be possible to delete it and a warning message will be displayed when a user changes its code.


Related Information

Task Description

Manage Expressions

 

Create an Expression

Different ways to create an expression

Associate an Expression

Several ways to associate an expression to a process

Reusability

Classification of Expression according to the Reusability 

Adding Modules in Rules

Types of Modules in the Expressions

Me Functions

Examples of some advanced Functions .Me

Iterate Over Xpath

Explanation of Iterate Over Xpath and its usability

Recommendations

Some recommendations when creating Business Rules 

Xpath

 

Xpath Functions

Some of the main Xpath functions in Expressions

Xpath Expressions

How to Build Xpath Expressions

GetXpath and SetXpath

Set and Get information in Expressions using Xpath 

Common Operations

 

DateTime Operations in Expressions

Examples of Date operations in Expressions

String Operations

Examples of String operations in Expressions 

Filter 

How to Filter information

Compare with Null or Empty

Make comparissons with Null in Expressions 

Mathematical Functions

Explanation of the main Mathematical functions available in Expressions

Email Expressions

How to send Mails from Expressions

Types of Expressions

 

Global

Expressions with Global Scope

Application

Expressions with Application Scope 

Process

Expressions with Process Scope

Entity

Expressions with Entity Scope

Default

Default Expressions in Bizagi

Functions

Functions in Bizagi

Expression Family

How to group Expressions in Bizagi by families


 

<comments />