Get users that have worked on the case

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Process wizard > Business Rules > Business Rules examples > User information and experience >

Get users that have worked on the case

Obtain the list of users who have worked in a case

You can obtain the users that have worked on a case by using the CHelper.getCaseUsers() function. This function returns an array list (ArrayList) with the  id´s of  the users (WFUser) who have worked in a particular case.

 
The Case number needs to be provided as input parameter.

 

The syntax of the function is:

 

CHelper.getCaseUsers(CaseNumber) ;

 

In a Help Desk Process many people can assist a Ticket. It is possible that a log of people who worked in a specific case is need for analysis purposes. To obtain this log you need to store the list of users who worked in a Ticket in the Users Log collection (shown in the data model below).

 

CHelper5

 

To obtain the list of users who worked in a Ticket you can use the CHelper.getCaseUsers function.

 

Include a Bizagi expression as an activity action and make use this function (as well as other methods) to add new records to the UsersLog collection.

 

CHelper7

 

//Get Users

var CaseUsers=CHelper.getCaseUsers(Me.Case.CaseNumber);

 

//Go through users

for (var i=0; i<CaseUsers.Count; i++)

{

//Create new record in the Users Log collection

var NewRow=Me.newCollectionItem("Ticket.UsersLog");

NewRow.setXPath("Users",CaseUsers[i]);

}

 

The resultant Table in the Work Portal looks like this:

 

CHelper6


Last Updated 1/6/2022 4:20:58 PM