Getting Task Actor via API REST (BOS 6.X)

1
0
-1

Hi there again!

Guys, i really need some info related to the tasks and the users that can actually perform them. I really don't know where to start, maybe i'm missing a lot of things. I googled a little and looked in this forum with no luck, if any of you have any tutorial or some resource about how to deal with bonita users, that'll be awesome!

I have a simple process with 1 task and 1 Actors group (if i can call them like that). I've assigned the task to that specific actor group.

image1

I want to know if there is any posible way via API REST for retrieving what actor group (or actor credential or whatever) can perform the next ready and unassigned task

Again, thanks a lot for any help with this, greetings from Venezuela!

1 answer

1
0
-1

Hello, first you can retrieve list of user that can do a task by doing a GET on the following url:

http://yourserver:yourport/bonita/API/identity/user?p=0&c=20&f=task_id=45

where task_id is the id of your task (f means filter) and c is the number of user to return starting from the page p (in this case from the first page - API is paginated). Hope this helps, Haris

Comments

Submitted by drakezilla on Tue, 08/19/2014 - 20:22

Thanks Haris!, this works like a charm (you're a ninja, btw)

But it's kind weird, in my real project i have a whole organization setup (not much, 5 groups, 2 roles and 5 users). i was hoping that this method only return me the user(s) with the credential that can perform the next task, but it returns every user in my organization, regardless they credentials/memberships

I'm pretty sure that im doing something wrong when i'm setting the users to the tasks in the studio, any ideas where to start?

P.D. Srry about the delayed answer, i was out of the city :)

Submitted by haris.subasic on Wed, 08/20/2014 - 15:47

It is supposed to return all the candidates for a given task, every user that can potentiall to this task. If it gives you back all the users from your organization, then it must be a matter of actor mapping or filter usage. You most probably have an actor (+ filter maybe) that gives acces to this task to all the users from different groups.

Submitted by florian.baillagou on Wed, 03/04/2015 - 08:53

I'm re-opening this subject since I didn't get the answer from previous message.

I want to show available task for a user depending on his role : Each role of the user will have a list of pending tasks. So my question is : Is it possible to retrieve the actor (selected from the studio) for a current task (or process) with REST API ?

Notifications