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

Calling correlate all in the same transaction twice should not lead to an exception

      Using the correlateAll[WithResult] API with the same correlation in a single transaction raises an exception.

      runtimeService.createMessageCorrelation("waitForCorrelationKeyMessage")
          .setVariables(variablesFistCall)
          .processInstanceVariableEquals("correlationKey", "someCorrelationKey")
          .correlateAllWithResult();
      
      org.camunda.bpm.engine.ProcessEngineException: Execution with id '109' does not have a subscription to a message event with name 'waitForCorrelationKeyMessage': eventSubscriptions is empty
      

      The reason for this is that the second correlate call still finds the execution matching the correlation in the database but not the event subscription inside the cache as it was already removed by the first correlation call.

      We would expect that the first correlation call triggers the correlation and the second one returns with an empty result without raising an error.

        This is the controller panel for Smart Panels app

            [CAM-9381] Calling correlate all in the same transaction twice should not lead to an exception

            Sebastian Menski created issue -
            Sebastian Menski made changes -
            Link New: This issue is related to SUPPORT-4856 [ SUPPORT-4856 ]
            Sebastian Menski made changes -
            Description Original: Using the {{correlateAll\[WithResult\]}} API with the same correlation in a single transaction raises an exception.

            {code}
            runtimeService.createMessageCorrelation("waitForCorrelationKeyMessage")
                .setVariables(variablesFistCall)
                .processInstanceVariableEquals("correlationKey", "someCorrelationKey")
                .correlateAllWithResult();
            {code}

            {code}
            org.camunda.bpm.engine.ProcessEngineException: Execution with id '109' does not have a subscription to a message event with name 'waitForCorrelationKeyMessage': eventSubscriptions is empty
            {code}

            The reason for this is that the second correlate call still finds the execution matching the correlation in the database but not the event subscription inside the cache as it was already removed by the first correlation call.

            We would expect that the first correlation call triggers the correlation and the second one returns without an empty result without raising an error.
            New: Using the {{correlateAll\[WithResult\]}} API with the same correlation in a single transaction raises an exception.

            {code}
            runtimeService.createMessageCorrelation("waitForCorrelationKeyMessage")
                .setVariables(variablesFistCall)
                .processInstanceVariableEquals("correlationKey", "someCorrelationKey")
                .correlateAllWithResult();
            {code}

            {code}
            org.camunda.bpm.engine.ProcessEngineException: Execution with id '109' does not have a subscription to a message event with name 'waitForCorrelationKeyMessage': eventSubscriptions is empty
            {code}

            The reason for this is that the second correlate call still finds the execution matching the correlation in the database but not the event subscription inside the cache as it was already removed by the first correlation call.

            We would expect that the first correlation call triggers the correlation and the second one returns with an empty result without raising an error.
            Roman Smirnov made changes -
            Assignee New: Yana Vasileva [ yana.vasileva ]
            Roman Smirnov made changes -
            Fix Version/s New: 7.10.0 [ 15290 ]
            Fix Version/s New: 7.9.6 [ 15339 ]
            Roman Smirnov made changes -
            Fix Version/s New: 7.9.7 [ 15341 ]
            Fix Version/s Original: 7.9.6 [ 15339 ]
            Roman Smirnov made changes -
            Remote Link New: This issue links to "Page (camunda confluence)" [ 12247 ]
            Yana Vasileva made changes -
            Rank New: Ranked lower
            Roman Smirnov made changes -
            Rank New: Ranked higher
            Roman Smirnov made changes -
            Rank New: Ranked lower
            Yana Vasileva made changes -
            Status Original: Open [ 1 ] New: In Progress [ 3 ]

              nikola.koevski Nikola Koevski
              sebastian.menski Sebastian Menski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: