Take next task automatically

Hi. I have been using Bonita bpm about a month, and I was wondering if it is possible to make a task to be taken automatically to the current user.
I am using the most recent version of Bonita BPM, and as far as I know, a user must click on the “Take” button to take the next task. I am currently working on a project that has many steps, and it is a little bit annoying that you have to click the Take button each time to take the next task.
So, is there any way to make the next task to be taken automatically to the current user?
Thank you.

Yes there is a way, however this “sort of” defeats the objective of Actors and the like who may do a job function.

That being said, we also have need to assign to specific users tasks…

You need to use:

processAPI.assignUserTask(activityId, userid.getId());

where activityId is the id of the pending HumanTaskInstance.

Note: I can’t publish the specific code we use for company reasons, this though points you in the right direction.

regards
Seán

PS: While this may not be the complete answer you’re hoping for, it does indicate a possible solution, please mark as resolved.

Thank you for the answer. So, I guess I should use assignUserTask in the connectors using Groovy script, am I right?

Yep…that’s exactly how we use it…

:slight_smile:

Good Morning,

I am exactly with the same problem, and I could not solve with just the above explanation, did you solve your problem? Could you give me a tip?

Good Morning,

I am exactly with the same problem, and I could not solve with just the above explanation, did you solve your problem? Could you give me a tip?