Getting Candidate Groups / Users for a Task Definition (not for a Task Instance)

775 views
Skip to first unread message

M. Çetin

unread,
Feb 11, 2016, 6:07:34 AM2/11/16
to camunda BPM users
I am trying to get Candidate Groups / Users for a Task Definition (not for a Task Instance). TaskDefinition class has a protected method called candidateGroupIdExpressions but I cannot find a way to get a handle to it. It is also not available in the Data Model as far as I can see. Am I overlooking something here?

I need this information mainly in custom UI where Process Administrators will monitor and check only the processes falling into their domain. I am trying to avoid maintaining an extra list of User/Process association as it will be out of synch with process definitions easily.

thorben....@camunda.com

unread,
Feb 11, 2016, 9:53:40 AM2/11/16
to camunda BPM users
Hi,

Accessing the definition of candidate groups via the TaskDefinition is not a feature that we provide, so there is no API to access it. If you are interested in the contents that are written in the BPMN XML, you could parse the candidate groups from the model using the BPMN model api [1]. Note that in delegation code like an execution listener, you can use the method DelegateExecution#getBpmnModelElementInstance to access the BPMN activity that is currently executed as represented by the model API.

For your use case, you could also employ Camunda's authorization features [2]. Users that are candidates or assignees for a task automatically receive the right to read and update a task.

Cheers,
Thorben

[1] https://docs.camunda.org/manual/latest/user-guide/model-api/bpmn-model-api/read-a-model/
[2] https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/

M. Çetin

unread,
Feb 11, 2016, 11:00:07 AM2/11/16
to camunda BPM users
Hi Thorben,

Thanks for your reply.

Parsing BPMN XML using the API suggested by you will not be suitable for my use-case (I am using a datatable with filter and sort options at process-instance level).

Good to know the Authorization feature you mentioned but my need is different. I will try to find a workaround in my application specific data model.

Thanks once again,

Melih
Reply all
Reply to author
Forward
0 new messages