Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-8120

Case Data is inserted twice in springboot

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.17.0.Final
    • 7.16.0.Final
    • SpringBoot
    • None
    • 2
    • NEW
    • NEW
    • 2019 Week 02-04

    Description

      Case Data is inserted twice in SpringBoot because 2 different Command scoped entity managers are used when AddDataCaseFileInstanceCommand is called. As a part of its execution, at first processEventSupport.fireAfterVariableChanged() is called, which results in call to NotifyParentCaseEventListener (afterVariableChanged method) which then calls afterCaseDataAdded on all CaseEventListeners. Second, as a part of the command as well, caseEventSupport.fireAfterCaseDataAdded is called which calls afterCaseDataAdded in CaseInstanceAuditEventListener again. On KIE Server it works because there CaseInstanceAuditEventListener will query already inserted data, since it is doing it using the same entity manager. In Springboot, there is each time a different entity manager, so the second run doesn't see already inserted data.

      The test which was failing is:

      CaseRuntimeDataServiceIntegrationTest#testGetCaseInstanceDataItems

      Attachments

        Activity

          People

            mmacik@redhat.com Marian Macik
            mmacik@redhat.com Marian Macik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: