Bizagi presents process instances as cases to end users.
By default, Bizagi maintains and assigns an internal sequence for the numbering on cases, and presents it as the Case Number of each newly created case.
This of course, avoid duplicity and conflicts between cases while ensuring that each one is uniquely identified.
You may override this above sequence so that the numbering that is presented can be customized according to your needs. When using sequences we strongly recommend also using prefixes to avoid duplicity in case numbering. You may define that these identifiers are grouped for all or some of your processes, in which case Bizagi allows you to define a customized sequence, with prefixes and suffixes.
Case numbering configuration options
To customize your Case Numbers Bizagi offers two options:
•By Sequences: You can define a sequence and customize a prefix and a suffix. A sequence is a counter incremented by a value defined by you each time a case is created.
•By Rules: You can define the Case Number through an Expression, where you can perform calculations or validations and thus provide a more sophisticated definition.
Case Number is the number displayed to the end user in the Work Portal. However Bizagi assigns an independent and automatically generated identifier for each case, for internal numbering. The Bizagi internal numbering is knows as the Case Id. The customized numbering is the Case Number.
Defining Case Numbers by sequence
To define Case Numbers by sequence you must create one sequence and then assign it to a specified Application or Process.
To illustrate how this is done we will use the following example: An Industrial Company decides to implement Bizagi in mid June. A total of 1,651 Invoices have been generated during the year before the process automation of the Invoice Generation process. In Bizagi each case will be identified with a Consecutive Number which is the Invoice Number.
To create a Sequence follow the next steps:
1. Go to the Expert View open the Configuration tab and click Sequences.
2. In the new window, click Add to include a new Sequence
Enter a Name that describes the sequence. It must not contain special characters such as spaces, accent marks, or symbols.
Define a Seed, that corresponds to the initial value of the sequence. It must be a numeric value.
Define the Increment, that will be in charge of incrementing the seed. It must be a numeric value.
The Is in production column indicates if the sequence has been already deployed (whether to test or production environment) or is still in development environment.
In our example the initial value is 1,652 (Seed) and it will be incremented by one each time a Case is created. Thus, the Increment is 1.
Click OK to save the changes.
Once the sequence has been created the next step is to assign it to the Case Number of the Process. To do it follow the next procedure:
1. Go to the Expert View and open the Configuration tab. Click Case Numbering.
2. A new window will display the following information:
•Configuration Level: Defines if the customized Case Number will be applied to all the Applications: Bizagi (common to all applications) which is applied to all the project, or to a specific Application.
•Application: This field will be available when Application is selected for the Configuration Level. It defines the specific application that the Case Number will affect.
•Assign the Case Number at: Defines the moment in the Case life when the Case Number is set. It can be at the Case Creation or at the End of creation phase. This is useful when the creation phase consists of more than one activity.
•Use Configuration: Defines the way the Case Number is established. It can be Default (defined by Bizagi), By sequence (it is obtained from a user-defined sequence) or By rule (it is obtained by an Expression).
•Number Configuration: This field only applies when By Sequence or By Rule is selected in the Use Configuration field. It allows you to define a prefix, the related sequence and a suffix for the Case number.
For our example we will assign the following values to each field:
•Configuration Level - Application. The Case Number will be only applied to a specified Application.
•Application - Customer attention. The Case Number will be only applied to the Invoice Generation Application.
•Use Configuration - By sequence. The Case Number will be obtained from the created sequence.
•Assign the Case Number at - End of creation phase. The Case Number will be assigned when a new ticket is confirmed.
•Number Configuration: We will use a prefix but not a suffix, thus we leave the suffix space in blank. For prefix we will use HD- (which stands for Help Desk initial letters). We select Ticket Sequence (the Sequence we previously created) from the Sequence drop-down list.
Click OK to save the changes.
The Case Number for the Invoice Generation Process has been created. This is how task of this process will look like in the Work Portal.
Defining Case Numbers by Rule
When your customized Case Number cannot be configured By sequence because it requires a more complex procedure, you can use Expressions.
For example you might want independent sequences for different Processes belonging to the same Application.
You might also want a Case Numbers obtained from a Vocabulary or to include the current date.
To illustrate how it is done we will use the following example: Suppose your company manages three different processes in different Applications: Internal Help Desk, Claims and complaints management and Sales opportunity management. You wish to identify each process with a Case Number that displays the process it belongs to and the year it was created:
Internal Help Desk: IHD – “Sequence” – “Year”
Claims and Complaints Management: CCM – “Sequence” – “Year”
Opportunity Management: OPM – “Sequence” – “Year”
In order to customize the Case Number, follow the next steps:
1. Define the three sequences the Sequences menu, starting at one and incrementing by one:
2. Go to the Case Numbering menu to create the customized Case Number.
In the window include:
•Configuration Level - Bizagi. The Case Number Rule will be always evaluated.
•Assign the Case Number at - Case Creation. The Case Number will be assigned as soon as the case is created.
•Use Configuration - By Rule. The Case Number will be obtained from a Expression.
3. Now, create the rule to evaluate each process. Click on the square on the right to define a new Expression.
In the Expression editor include the following code:
//Obtain the current year in a previously declared variable
//Identify the process according to its Name
if(Me.Case.ProcessDefinition.Name == "InternalHelpDesk")
//Build the text of the case identifier
"IHD - "+CHelper.GetNextSeqValueStr("IHDNumber")+ " - "+year;
} else if(Me.Case.ProcessDefinition.Name == "PQRS")
"CCM - "+CHelper.GetNextSeqValueStr("CCMNumber")+" - "+year;
} else if(Me.Case.ProcessDefinition.Name == "OpportunityManagement")
"OPM - "+CHelper.GetNextSeqValueStr("OPMNumber")+" - "+year;
Bear in mind that the process name is displayed in the process version properties. From the expert > processes view.
The above rule obtains the current year, then identifies the process that is being created, and according to it defines the case number in the desired format. The case identifiers will be displayed as follows in the Work Portal.