How to initialize a process variable of Type Group(List) ?

Hi ,

I want to initialize the variable of type Group (list).

My requirement , is to get all the group names (by passing some district value example : each district has 3 groups defined )  and append all to the pv of type group (list).

 

I used the following but getting empty result 

 

=a!forEach(ri!deletedAMUList,

append(            ri!groupListFordeletedAMU,

getgroupbyname(concat("RTRR"," ",ri!deletedAMUList[fv!index]," ","Landman")),

getgroupbyname(concat("RTRR"," ",ri!deletedAMUList[fv!index]," ","Geologist")),

getgroupbyname(concat("RTRR"," ",ri!deletedAMUList[fv!index]," ","Engineer"))))

 

When passing {} in group  rule input in expression rule , i am getting the result.PFA

 

but getting empty results as ,, using this in process model at run time.

PFB screenshot of empty commas in pv

Thanks

Soujanya

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Hi  I believe, you must handle null in its response, for doing this you can make the use of wherecontains() to find out the indexes of null and use remove() to delete those index values (if any)

    Now try calling this rule in a script task and assign it to a process variable of type Group (Array)

    Also make sure, when the result of this rule is empty, return a default group to avoid breaking the process.

    Hope this will work for you.

Reply
  • 0
    Certified Lead Developer

    Hi  I believe, you must handle null in its response, for doing this you can make the use of wherecontains() to find out the indexes of null and use remove() to delete those index values (if any)

    Now try calling this rule in a script task and assign it to a process variable of type Group (Array)

    Also make sure, when the result of this rule is empty, return a default group to avoid breaking the process.

    Hope this will work for you.

Children