Obtain case organization data

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Business rules examples >

Obtain case organization data

Overview

There are some cases in which our processes would be executed from different organizations, thus, we need to make clear the organization's data for the user to keep awareness and treat information correctly. In the follow example, Organization's Id and Name will be used to keep the users informed in a proper way.

 

The expressions used to retrieve organization's data are:

 

 

Function

Description

Me.Case.Organization.Id

Allows to retrieve case organization's primary key, it's directly related to the organizations registered from Bizagi Studio.

Me.Case.Organization.Name

Allows to retrieve case organization's given name, it's directly related to the organizations registered from Bizagi Studio.

 

Example

In this example, we have a purchase request process. It may be executed from any of the associated enterprises: "Atomic Enterprises" and "Insurance Enterprises". When a requester starts the first activity and selects its enterprise, it must show the organization's Id and Name.

 

Organization_data_1

Selecting an enterprise to start a Purchase Request case.

 

Organization_data_2

Showing organization's Id and Name for reference.

 

To show these follow the next steps:

 

1. Add both values to your data model.

Organization_data_3

 

2.Select and add them in the first form, intending to automatically fill organization's data since starting.

 

Organization_data_9

Form to modify.

 

Organization_data_8

Adding organization's attributes to the Form.

 

3.Add an activity action On Enter, in order to set the Name and the Id of the selected organization.

 

Organization_data_4

Task where organization's data must be inserted via expression.

 

Organization_data_5

Adding the expression at the activity start.

 

4.Add the expressions mentioned above to assign those values to the new variables created in data model.

 

Organization_data_6

Adding a new expression.

 

Organization_data_7

Assigning the organization data to the form attributes.

 

When setting the organization's data to the attributes, use the next expressions:

 

<PurchaseRequest.CaseOrganizationName> = Me.Case.Organization.Name;
<PurchaseRequest.CaseOrganizationID> = Me.Case.Organization.Id;

 

Now you are able to show organization's data trough Forms, and keep users awareness of the case related organization.