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.
 

Global Expressions

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

Jump to: navigation, search

Applies to ENTERPRISE .NET EDITION

<keywords content="keywords">expression,example expressions,visiblity user profile, reuse expression, multiuse rule, rules,user expression, IsInRole,advanced functions</keywords>

Contents

Global Expressions

Expressions classified as global are those that are created at the Project level. This allows the user who is designing to utilize the expression from all of the applications (including all of the processes and sub-processes) that conform the project. This is one of the most important benefits of the the Enterprise .NET version because it saves time when the project is being designed and when the application is being maintained.


How to Create a Global Expression from the Modules View

Global expressions can only be created from the modules view. The following video will show the procedure to create one.


<videoflash>fuYNWtOmDCI&hl|640|505|</videoflash>


Global Expression Example

The following example will take place in the Consumer Loan Request process of the Credit application. Data privacy is a very common issue for companies in general, but for banks it is a priority. In this case, the process asks for financial and contact information about customers. To solve this issue a Global Expression will be created to hide the information to all of the users that consult  the case and do not have an Office Manager role in their user profile.

Notice that this type of expression is going to be useful to all of the applications and processes in a project. This is why it is created as a Global Expression. The expression does not have a context and therefore it may apply to any process that may require it because it will check the role of the user who is logged into the application and according to the profile, it will show or hide certain information.

Without including the expression, any user would be able to check the case and see all of the private information in it.

This is what any user that consults a Consumer Loan Request case will see. They will first click on the Applicants tab.



Then they would click in the view form to find more details.



Then they would arrive to all of the private information of the customer.



To correct this issue we should first create the role that is going to be authorized to consult this type of information. In Bizagi Studio in the Organization Menu the Office Manager Role is already created. To learn how to create roles go to Organization.



Then, the Global Expression will be created. In Bizagi Studio click on Business Rules.Then right click on Expressions. Note that to make the expression Global, the expression menu that has to be right clicked is the one that is outside the application.



Now, since the required expression is to be included as a visibity expression, it needs to be a boolean expression. So, select New Scripting Boolean Expression.



The Expression window will open.



Complete the properties, and then right click on the arrow in the Design View and select Add Expression.



The Expression-Description will open. Type a name for the Expression.



Right click on the Expression and select Properties.



Include the following expression in the Edit Expression window:

                                              'Me.Case.WorkingCredential.IsInRole("OfficeManager");

This expression will verify if the user who is consulting the information of the case has the Office Manager role, and will return true if it does, and false otherwise.

For more information about the use of this function, and other variations, go to: Examples of Advanced Functions

Then click OK.



Click OK again.



The Global Expression that was just created has to be associated to the Global Form of the process. To verify the name of the Global Form go to the Processes menu. Then go to the process where the expression is going to be associated. Select the version that is activated, and right click on the version. Then select Properties.



In the Process Properties window we can see the name of the Global Form.



Now go to the Entities menu, open the Application entity options, and select Forms. Look for the Global Form that was just verified and double click on it.



Select the information that must only be presented to authorized users. In this example all the information in the Applicants tab will be selected. Then go to the Visual Settings in the Properties box on the left. Open the Visible options and select Expression.



The Boolean Expression window will open. Click on Cancel to associate the expression that was created previously.



In the Expression Selection window, under the Global Expressions group select the rule that was just created. In this example its called Privacy. Then click OK.



This is how the Visual Settings should look. Click on Save and close the Form Modeler.



To test the expression, go to the Web Application with a user that does not have the Office Manager role. This user will not be able to see the Applicant tab.





How to configure Access rights to Global Expressions

With Bizagi BPM Suite you can have a collaborative environment where you and other co-workers can work simultaneously on your processes. If you have several processes in your project you might need to restrict accesses to some elements to prevent the users modifying one process, to affect others.

Click here to learn how to grant access rights to Global Expressions

 


Related Articles

<comments />