How to get a process candidate start group by processDefinitionKey?

I can start a process by the procKey.
I think the internal is get the latest procDefId then create by procDefId?
so the user need not to care about the procDefId.

        ProcessInstanceWithVariables processInstance = runtimeService

But when i want to check the role of the use before start proc. I only find the api that is retrive by procDefId.
is there any way to retrive by procKey?


and the query is also have no api to query by candidate start group, how to query by candidate start group?


the processDefinition object is also have no api to retrive the candidate group, how to retrive?

Hi @thinkdoom,

what about this query:


Hope this helps, Ingo

thanks, I’v find it’s imporsoble to query by group.