Hi Jan,
this is how the feature works. Add this information to your process definition:
<process ...>
<extensionElements>
<camunda:potentialStarter>
<resourceAssignmentExpression>
<formalExpression>group(management), user(jonny)</formalExpression>
</resourceAssignmentExpression>
</camunda:potentialStarter>
</extensionElements>
...
</process>
Now you can query it using the reporsitoryService
repositoryService.createProcessDefinitionQuery()
.startableByUser("jonny")
.list();
Or even the IdentityService (Yäy!! :) )
identityService().createUserQuery()
.potentialStarter("myProcessDefinitionId")
.list();
Unless of you are using the Ldap Identity Service. In that case it does not work (Damn!! ;( )
Cheers,
Daniel