get all the tasks assigned to an actor with rest API

1
0
-1

Hi,

how to get all the tasks assigned to an actor with rest API,

I mean an "actor" not a "user"

For example: we have an actor named "billing_manager", this actor contains 3 users, so i want to get all the tasks ready for this actor.

thanks in advance,

Regards

1 answer

1
0
-1

Hello,

You need to use multiple request:
1- Get actor from specific id : {{host}}:{{port}}/bonita/API/bpm/actor?p=0&c=10&f=process_id={{process_id}}
2- Get your actor id by your actor name from the previous request
3- Get actor membership :

get by group id: {{host}}:{{port}}/bonita/API/bpm/actorMember?p=0&c=10&f=actor_id={{actor_id}}&f=member_type=group
get by user_id = {{host}}:{{port}}/bonita/API/bpm/actorMember?p=0&c=10&f=actor_id={{actor_id}}&f=member_type=user
get by role = {{host}}:{{port}}/bonita/API/bpm/actorMember?p=0&c=10&f=actor_id={{actor_id}}&f=member_type=role

4- get users id:
4.1 from group : {{host}}:{{port}}/bonita/API/identity/user?p=0&c=100&f=group_id={{group_id}}
4.2 from role : {{host}}:{{port}}/bonita/API/identity/user?p=0&c=100&f=group_id={{role_id}}
4.3 from user_id, you already get user_id with : get by user_id = {{host}}:{{port}}/bonita/API/bpm/actorMember?p=0&c=10&f=actor_id={{actor_id}}&f=member_type=user

5. Merge all user_id to get the final list.

Regards,

Notifications