I’m having trouble dynamically specifying a CandidateStarterGroup to a deployed process definition.
I’ve successfully added a candidate starter user and then used a ProcessDefinitionQuery to list all processes startable by that user as follows:
repositoryService.addCandidateStarterUser("holidayRequest:1:3", "dan");
List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery()
.deploymentId(deployment.getId())
.startableByUser("dan")
.list();
for (int i=0; i<processDefinitions.size(); i++) {
System.out.println((i+1) + ") " + processDefinitions.get(i).getName());
}
Now I’d like to use addCandidateStarterGroup
in order to specify a group of users who can start a particular process and issue a similar query. I can’t seem to find the corresponding .startableByGroup("some group")
on the ProcessDefinitionQuery
object. Are Candidate Starter Groups queried or used differently?
addCandidateStarterGroup(String processDefinitionId, String groupId)
Authorizes a candidate group for a process definition.
The bigger picture here is that I’d like to be able to deploy a process to a downstream environment (i.e. QA, UAT, PROD) and have the ability to configure who can access a process using the groups defined on the target environment.
Thanks,
Dan