Below is an example of how organizational units are used.
First, we should create a definition of what the organizational unit represents, for example, Agencies or Branches.
This is done from Organizational Model – Organizational Unit Definitions, as shown in the image below:
Pressing the New button opens the following dialog box:
It can be defined as propagable, which means that the user's organizational unit will be inherited by the process. That is to say, when a user that belongs to branch "A" starts a process instance, it will be restricted to that branch and therefore branch "B" will not see that instance.
This property also indicates that subprocesses will inherit the same restriction of the parent instance.
Once the definition has been created, we should define the values that this definition can take. In this case, they could be BRANCH A, B, C, etc. In order to do so, organizational units based on the previously created definition have to be created.
It can be defined as determinant too. This property is used as a mechanism to partition users in order to have better performance when calculating the worklists. To choose this option it is recommended to follow these criteria:
- There can only be one Organizational Unit Definition marked as determinant
- Users should have at most an Organizational Unit based on that Organizational Unit Definition
- The Organizational Unit Definition should be as selective as possible (for example, if you have a Country and City the second is more selective).
To this end, we go to Organizational Model - Organizational Units as shown in the image below:
Next, the users have to be assigned to the organizational units so as to specify in which branch each one works. To do so, we select the organizational unit and assign the users by pressing the Members button.
If we don't want to use the propagable property and we want to assign the organizational units to the process instances, we should do so through the API using the AssignOrganizationalUnit method of the process instance, for example, with the following code:
- &WorkflowProcessInstance is a variable of the WorkflowProcessInstance type.
- &WorkflowOrganizationalUnit is a variable of the WorkflowOrganizationalUnit type.
Organizational Units Definitions