Bonitasoft 6.2.6 how to assign specific user to next task

1
+1
-1

Hi,

I want to know if the user can assign the next task to specific user? I am using Bonitasoft 6.2.6 community.

Regards, Terry

7 answers

1
+5
-1
This one is the BEST answer!

Hello Terry, you could use Actor filter - Single user that will allow you to do it by specifying its ID. So, you can allow one user to select a username for the next task, and then you can put a filter on the next task that will use this username to get its ID and assign the task to him/her. You can check more information in our documentation here . You can also do it using APIs, there is a method assignUserTask that allows to assign a given human task to a certain user. Hope this helps, Haris

Comments

Submitted by youcef-isl on Fri, 05/09/2014 - 19:22

Sorry for bothering ,but i don't know how to use APIs ,could please help me ?

1
+3
-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

Comments

Submitted by terrytan1979 on Wed, 05/14/2014 - 10:16

Hi Kandarp,

I followed your suggestion. But i got "Error while getting the form page list" while loading the first task with the select box. My codes in the first task, select box, groovy script as such.

pic2 Is my return type correct?

Regards, Terry

Submitted by haris.subasic on Wed, 05/14/2014 - 11:08

On the screenshot attached, you should use Map as return type (click on browse and search for Map, choose java.util.Map)

Submitted by dgonzalez_1 on Tue, 10/13/2015 - 21:55

hellow.
I have the same error. How did you fix?

1
+1
-1

How do u exactly specify its use rid in actor filter ?

1
0
-1

1
0
-1

Thanks for this!

1
0
-1

Thank you! it works!

1
0
-1

Hello

no it should be : java.util.map

thanks kandarp

Comments

Submitted by mirco.marchitiello on Wed, 05/28/2014 - 17:46

Hi, I've succeeded in running the example. I'd like to know why, if I press the Evaluate button, the system asks a value for the process variable apiAccessor. If I write anything in the box I get an ExpressionEvaluationException error

thaks, Mirco

Submitted by Sean McP on Sun, 03/29/2015 - 11:51

When using any system variable there is nothing there to evaluate, so it will ask you to give it a number.

To be honest except for the most basic stuff the Evaluate button is next to useless. You will be prompted for everything you need to make the code work. When you don't have a running process there is nothing to grab on to, hence the *ExpressionEvaluationException * error.

for example, in script code

return x + y;

will ask you to provide values for x and y;

if you have a hand coded DB access with parameters (as below) for everything and a select statement you will be asked for (example only)

*Select userid, userfirstname,userlastname from ${tablename} where userid = '${userid}' *

hostname
port
username
password
database
driver
tablename
userid

Hope that helps to complete your understanding, regards Seán

Notifications