How to use actor filter?

1
+2
-1

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

1 answer

1
+1
-1

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 :

  1. create simple process with 2 tasks : start -> task1 -> tast2 -> end
  2. create data variable : uId with type: Long
  3. step 1 -> application -> page-flow -> add Page-flow (form)
  4. in page flow - > take one select box -> select-box's data tab -> available value -> paste following script
import org.bonitasoft.engine.identity.*;

List<User> 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
  1. 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);
  1. 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

Notifications