Bonita BPM 6.5 API REST: Get possible users that can perform a task

I can’t find this anywhere, is there a way to know the possible users that can perform a task when said task is not yet assigned?

I’m using Bonita BPM 6.5.3, I want to get this information using the API REST.

Thanks!

Hi,

When you retrieve a task from the REST API you have access to the task actor id (actor_id). From this id, you should be able to retrieve all groups, users, and roles mapped to this actor. (See [the documentation here] for more details on how to use the actorMember API)

I haven’t tested it but it should work

Regards

Quentin

Note that a user can actually do a task based on a mix of two different mechanism:

  • Filter: a filter is a piece of code that run once when task become ready (can run again using API call) and produce a list of user ids. That defines which user can actually do the task. When user login into the Portal, if his id is among the list of ids (candidates) for a task he will be able to do it.
  • Actors: if no filter is define, task is associated with an actor define when creating the process definition in the Studio. Actor is just a static name. Actor is mapped to the organization (groups, roles, users). When a user login into the Portal, based on the groups and roles he got, a list of actors that match this specific user will be created. Then if a task actor match one of the user actors he will be able to do the task.

Using REST API you can actually get the actor id for a specific task (actorId attribute). Using actorMember you can then search for this specific actor associated groups, roles… Then you need to perform other calls to get actual user out of groups…
For filters, sadly there is no method to actually get the list of user ids.

So the solution would actually be to create a REST API extension and use the existing Engine Java API method that do exactly what you need.