cancel
Showing results for 
Search instead for 
Did you mean: 

Question regarding identityService

srón
Champ in-the-making
Champ in-the-making
I have some bpmn-xml files deployed in an application I finally managed to write. Usergroups are defined in the xmls as follows:


<potentialOwner>
      <resourceAssignmentExpression>
          <formalExpression>1_PRODUKTAPPLIKATEUR</formalExpression>
        </resourceAssignmentExpression>
      </potentialOwner>        


I stored all group-names in an enum, so it is not a real problem for me, and yet I am astounded that the following task call:

getEngine().getIdentityService().createGroupQuery()


is always empty. According to the userguide  "The IdentityService […] allows the management (creation, update, deletion, querying, …) of groups and users." - so normally I should get all of the users with the aforementioned code snippet.
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
I don't follow. You stored your groups in an enum? And you expect the groupQuery (that does a database query) to return those?
Did you create the groups through the GroupService.

srón
Champ in-the-making
Champ in-the-making
The enum holds the users, but of course, I do not expect to grab them (id est the enum's user variables) by the anctiviti engine. But since the following has been done…

<code>
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
repositoryService.createDeployment()
  .addClasspathResource("myOwn.bpmn20.xml")
  .deploy();
</code>

…and myOwn.bpmn20.xml already contains the groups, and they should be accessible with the createGroupQuery() - method of the identity service, yet the list of groups that method gives back is always empty.

jbarrez
Star Contributor
Star Contributor
Still, you haven't answered my questions. Do you have these groups in your ACT_ID_GROUP table? That's the only way they'll pop up in the groupQuery results.

srón
Champ in-the-making
Champ in-the-making
Sorry for not having answered concisely, err - my ACT_ID_GROUP table is empty Smiley Sad So then I will have to make use of the identity service to create those groups(?)