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
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
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
How do u exactly specify its use rid in actor filter ?
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 :
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
Hello
no it should be : java.util.map
thanks
kandarp
Thank you! it works!
Thanks for this!
Sorry for bothering ,but i donât know how to use APIs ,could please help me ?
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][pic2]
[pic2]: http://i59.tinypic.com/sccm51.jpg
Is my return type correct?
Regards,
Terry
On the screenshot attached, you should use Map as return type (click on browse and search for Map, choose java.util.Map)
hellow.
I have the same error. How did you fix?
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
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