Obtain Case object

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Business Rules examples > Cases and activities >

Obtain Case object


Bizagi offers a function where you can obtain the case object without the need of context. To do so, use the following function, this will return an case object type with the information you need:




The following attributes are needed:

CaseId: Case Id


You can perform the actions described on Get information from the current case on the returned object.



On this example we'll be using the getCaseById function to obtain a Sub-Process's state.


To do so, we'll first obtain the list of Sub-Process Id's as an array and from those Id's we'll get each Sub-Process's state.


The expression would be as follows:




The code shown in the image is:

var children = CHelper.getSubProcessesId(Me);
for(var i=0; i < children.Count;i++){
  var child = CHelper.getCaseById(children[i]);
  var childState = child.ProcessState;
  CHelper.trace("ChildrenState","Child process id " + child.Id +" state: " + childState);