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

ProcessInstance missing sometimes in the CDI-Context

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • None
    • 7.1.0
    • engine
    • None

      After the method “onProcessEvent(@Observes CdiBusinessProcessEvent event)” is called in a cdi-bean, it happens sometimes that the current ProcessInstance is not in the CDI-Context. No method can find the Process-Instance associated with the ProcessInstanceId from the event. In about 70% of the cases the process instance is found through one the following two approaches:

      • Get the ProcessInstance through Injection of the CurrentProcessInstance which provides an instance of BusinessProcess. Call getProcessInstance() to retrieve the instance.
      • Another approach is going with the RuntimeService and its createQuery-methods

      But sometimes - for no recognizable reason - the BusinessProcess returns only null-values and the Query-Methods can’t find the ProcessInstance either. The event on the other hand contains the correct Id of the process-instance and the execution. Also the database contains the data.

      The conclusion is that something is going wrong in the engine or in the cdi-part of the engine, so that the BusinessProcess is not getting always assigned to a bean. The irregularity indicates a fault on the part of the engine.

        This is the controller panel for Smart Panels app

          1. log-screen.png
            log-screen.png
            303 kB
          2. sampleCode.java
            1 kB
          3. workspaceCamunda.zip
            28 kB

              Unassigned Unassigned
              BenjaminTenke Benjamin Tenke
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: