UserCriterion Error When I try to fetch/return list of users

1
0
-1

in Select field , i write one groovy script to fetch initial value : list of available users

List<User> Users= apiAccessor.getIdentityAPI().getUsers(0, 200, UserCriterion.FIRST_NAME_ASC);
Map<String,Long> usercombolist=new HashMap<String,Long>();
for (User user:Users)
{
        usercombolist.put(user.getPath(), user.getId());
}
usercombolist;

But It just say "UserCriterion cannot be resolved. It may lead to runtime errors."

when i triy with Group , roles it all perfact just in user , in groovy script editor give warning as above and give error when run process

Comments

Submitted by haris.subasic on Wed, 04/16/2014 - 13:47

Would it help if you add

import org.bonitasoft.engine.identity.UserCriterion

at the beginning of your script?

1 answer

1
0
-1

This is a known limitation of the Groovy script editor. You have to manually import the class UserCriterion at the beginning of your script by typing:

import org.bonitasoft.engine.identity.UserCriterion
Notifications