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

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

List Users= apiAccessor.getIdentityAPI().getUsers(0, 200, UserCriterion.FIRST_NAME_ASC); Map usercombolist=new HashMap(); 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

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

Would it help if you add

import org.bonitasoft.engine.identity.UserCriterion

at the beginning of your script?