Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-4732

DbIdentityServiceProvider - Error when creating a User, Group and the corresponding Membership in one step

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 7.4.0, 7.4.0-alpha3
    • 7.4.0-alpha2
    • engine

    Description

      When writing (creating) a User, a Group and a Membership in one step an Exception is caused due to:

      "Referential integrity constraint violation: "ACT_FK_MEMB_GROUP: PUBLIC.ACT_ID_MEMBERSHIP FOREIGN KEY(GROUP_ID_) REFERENCES PUBLIC.ACT_ID_GROUP(ID_)"

      this is because the Implementation of saveUser() and saveGroup() method from the DbIdentityServiceProvider differ from the Implementation of createMembership()

      saveUser() and saveGroup() add the Entitys into the cache, whereas the createMembership() method is trying to write direct into the Database. This lead to the Exception above, when you try to create all of them in one step.

      My use case is a new identity service plugin which delegates most requests to the Camunda DBIdentitiyServiceProvider. During authentication we want to update the Camunda DB.

      To fix that, the createMembership() method should be refectored to behave in the same way like saveUser() and saveGroup() (And write the entity into the cache rather than into the db). Moreover a getter method for userId and groupId are necessary so that the db driver can access the Id's when writing them into the db.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              thorben.lindhauer Thorben Lindhauer
              S. Jonischkeit Simon Jonischkeit
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce