Hello guys,
I’ve followed this example
Hello may be this help you ,
i can explain how to give user to choice next task assign to which user
pl do following
Detail Process :
create simple process with 2 tasks : start → task1 → tast2 → end
create data variable : uId with type: Long
step 1 → application → page-flow → add Page-flow (form)
in page flow - > take one select box → select-box’s data tab → available value → paste following script
import org.bonitasoft.engine.identity.*;
List users = apiAccessor.getIdentityAPI().getUsers(0, 200, UserCriterion.FIRST_NAME_ASC);
Map<String,Long> combo = new HashMap<String,Long>();
for(User u:users)
{
combo.put(u.getFirstName(),u.getId());
}
return combo
in output operation :
first filed - select that variable (uid) takes value of field - click on pencil (script) paste following
def long l = Long.parseLong(field_Select1);
task 2 → actor → set actor filter → add Uid variable
now run process .
(in task 1 user can see list of users , after it select any specific user ,
selected user’s id store into UID variable
task 2 use actor filter and get that UID and assigned that task to that specific user . )
And I changed the return type to a map, but I still get this error:
**def long l = Long.parseLong(field_Select1);not compatible with the expression return type java.lang.long.