Bizagi Tips and Tricks

How to customize the case number

Creating a new case in Bizagi means creating a new instance of a specific process. By default, the number of the case/instance, also known as the CASE NUMBER, is maintained by the application using an internal sequence. Having this in place avoids any duplicity or any kind of errors.

Bizagi Tips and Tricks

How to Trace like a Pro

During the development phase of the project, and sometimes in the Production environment, you find yourself in a situation when errors need to be traced. Or as I call it, you need to debug the application.

In Bizagi, the easiest way to debug is to use the Trace functionality. Now, this is a simple CHelper method where you have to pass 2 arguments:

CHelper.trace(string sFileName, string sText)

…where the sFileName is the name of the .txt file where the traces will be stored and the sText is the information to trace. It can be an attribute selected by a navigational XPath expression, a function, or a variable.

Bizagi Tips and Tricks

How to cancel a case

Have you ever wonder what is the proper way to cancel a case in Bizagi? When I first started working as a technical BPM consultant, I’ve learned to cancel the case using the following workflow pattern:

Bizagi Modeler Cancel case workflow

At the beginning of the process, you add a parallel gateway. One path takes the normal flow, while the other one goes into this cancel logic: an Intermediate event followed by a Terminate event.

Bizagi Tips and Tricks

Get the physical path of uploaded documents

Bizagi code (my version)

The below code helps you trace the location of any uploaded document in Bizagi:

var uploadPath = CHelper.getParameterValue("uploadPath");
var IdEntity = CEntityManager.GetEntity("entity-name").Id;
var IdAttribute = CEntityManager.GetEntity("entity-name").Attributes["attribute-document-name"].Id;
var SurrogateKey = <entity-name.Id>;
var WholePart = (SurrogateKey - (SurrogateKey % 1000)) / 1000;
var bizagiFilePath = uploadPath + "\\" + IdEntity+"\\"+ WholePart +"\\"+ SurrogateKey +"\\"+ IdAttribute;