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.
 

CaseNumbering

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

Jump to: navigation, search

<keywords content="keywords"> idCase, RadicationNumber, Case Creation Number, CHelper, sequence, consecutive, Me.Case.RadicationNumber, case number, radication, case id </keywords> 

 Case Numbering

For the generation of the Case Creation Number for processes in Bizagi, the CaseNumber function can be used instead of IdCase, because there are differences between these two functions:


The Me.Case.Id (return integer) is the internal number of the case in Bizagi.


The Me.Case.CaseNumber (return string) is the case creation number.


However, if the process has Case Number using a Prefix or Suffix and a Sequence, the CaseNumber function will return the sequence associated to the case and that is the same number that appears when the user searches the case in the web application. 






In the web application, the CaseNumber is used to search the case and is the number that Bizagi shows in the pending list.


 

For this reason, in the business rules and expressions it is recommended to always use the Me.Case.CaseNumber, because this will always return the id of the case or the CaseNumber
For example, if  the user has created a sequence and assigned it to the Process, the functions will return this information:




Me.Case.CaseNumber = “PR1000”;
Me.Case.Id = 58;


If the process does not have a sequence assigned, by default Bizagi will return the internal idCase in both functions:


Me.Case.CaseNumber = “58”;
Me.Case.Id = 58;


Custom Case Numbering by using a rule (applies for the Enterprise edition)

Case numbering can be customized according to your particular needs. In some cases it is necessary that the case number is more than a simple sequence number for giving the users more information about a particular case.

Suppose your company manages three different processes: Incidents, claims and complaints and sales opportunity management. You wish to identify to which process a case belongs and its corresponding creation year only by consulting the case number. For this case the custom numbering is as follows:

Incident Management: IM – “Sequence” – “Year”

Claims and Complaints Management: CCM – “Sequence” – “Year”

Opportunity Management: OPM – “Sequence” – “Year”

In order to customize the case identifier, follow the next steps:

1. Define the sequences. In this case we need a sequence for each process. For more information about sequences please refer to Sequences



2. Go to the Case Identifier option located at the Configuration tab in the Wizard view.



3. In the Case Number menu use the configuration “By Rule” and click on the square located at the right side of the option “Creation Number Rule” to define an expression.



4. Define the following expression in order to assign a case identifier according to the process.




//Obtain the current year in a variable
var year=DateTime.Today.Year 
//Identify the process according to its ID
if(Me.Case.ProcessDefinition.Id == 138)
{                 
                 //Build the text of the case identifier
                "IM - "+CHelper.GetNextSeqValueStr("IMNumber")+ " - "+year; 
} 
if(Me.Case.ProcessDefinition.Id == 154)                 
{
                 "CCM - "+CHelper.GetNextSeqValueStr("CCMNumber")+" - "+year; 
} 
if(Me.Case.ProcessDefinition.Id == 178)               
  {                
 "OPM - "+CHelper.GetNextSeqValueStr("OPMNumber")+" - "+year; 
 }


The previous rule first obtains the year of the current date, then it 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 follow



<comments />