Hi
Use this API to get User groups . Pass the current logged in User using the session API.
/bonita/API/identity/membership?p=0&c=10&f=user_id%3d{{currentLoggedInUser.user_id}}&d=role_id&d=group_id
then use this Javascript to sort the Groups and get the required group name
var arr = $data.getUserGroups;
var drr = [];
var crr = [];
var value = '';
var myLength = arr.length;
var i=0;
for(i;i<myLength;i++)
{
var val = arr[i].group_id;
drr.push(val);
}
var j =0;
for(j;j<drr.length;j++)
{
var val1 = drr[j].displayName;
Thank you for the answer. but your solution is just for one user. If I iterate a list of users I receive a list with the info of the last user repeated.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.