Hi,
I am using Bonitasoft community 6.2.6. How do i use actor filter for single user. I have a process variable named “usernames” . I want to select a user for the next task. How do i do that with actor filter single user? I am trying for look for answer in bonitasoft forum but the info is not very clear.
Terry
2 Likes
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 . )
Thanks
Kandarp