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

Historic process instance start event after variables are set

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • engine
    • None

      User Story (Required on creation):

      I want to be informed when a process instance has been started and initial variables have been set.

      Functional Requirements (Required before implementation):

      An event is published after initial variables have been set on a new process instance

      Technical Requirements (Required before implementation):

      • Define a new event entity that reflects the desired state, e.g., HistoricProcessInstanceInitVariablesSetEvent.
      • Fire the new event after the variables are set on a new process instance. The variables are set in PvmExecutionImpl line 276 .

      Limitations of Scope (Optional):

      Hints (optional):

      • The desired behavior could be achieved with the HistoricProcessInstanceStartEvent until 7.12
      • With CAM-10978, the following was changed in 7.13:
        1. The HistoricProcessInstanceStartEvent is now fired first.
        2. The variables are set (see: PvmExecutionImpl line 276 ).
        3. The HistoricVariableUpdateEvent instances are fired.
      • CAM-10978 leads to the execution having no variables when the HistoricProcessInstanceStartEvent is processed. This refactoring was done to ensure correct ordering of the Historic events, i.e. a HistoricProcessInstanceStartEvent is fired before any HistoricVariableUpdateEventEntity instances are fired.

        This is the controller panel for Smart Panels app

            [CAM-13578] Historic process instance start event after variables are set

            Matthias Dietl created issue -
            Matthias Dietl made changes -
            Attachment New: my-project.zip [ 43179 ]
            Matthias Dietl made changes -
            Description Original: h4. Environment (Required on creation):

            Camunda 7.15 from start.camunda.com
            h4. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

            When starting a process with variables via the runtime service, in the handleEvent-function in a HistoryEventHandler, the variables are not there. This works fine with Camunda 7.12 and below and has stopped working since 7.13.
            h4. Steps to reproduce (Required on creation):

            Start the attached application, make a GET request on [http://localhost:8080/start] and watch the console output.

            The GET request is processed in the file RESTStarter, where a process wit variables is started.

            The output comes from the EventHandler-class.
            h4. Observed Behavior (Required on creation):

            HistoricProcessInstanceEventEntity-event has no variables.

            A following HistoricVariableUpdateEventEntity-event has the variables.
            h4. Expected behavior (Required on creation):

            HistoricProcessInstanceEventEntity should contain the variables, as it does until 7.12.
            h4. Root Cause (Required on prioritization):
            h4. Solution Ideas (Optional):
            h4. Hints (Optional):
            New: h4. Environment (Required on creation):

            Camunda 7.15 from start.camunda.com
            h4. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

            When starting a process with variables via the runtime service, in the handleEvent-function in a HistoryEventHandler, the variables are not there. This works fine with Camunda 7.12 and below and has stopped working since 7.13.
            h4. Steps to reproduce (Required on creation):

            Start the attached application, make a GET request on [http://localhost:8080/start] and watch the console output.

            The GET request is processed in the file RESTStarter, where a process with variables is started.

            The output comes from the EventHandler-class.
            h4. Observed Behavior (Required on creation):

            HistoricProcessInstanceEventEntity-event has no variables.

            A following HistoricVariableUpdateEventEntity-event has the variables.
            h4. Expected behavior (Required on creation):

            HistoricProcessInstanceEventEntity should contain the variables, as it does until 7.12.
            h4. Root Cause (Required on prioritization):
            h4. Solution Ideas (Optional):
            h4. Hints (Optional):
            Matthias Dietl made changes -
            Mentioned Roles
            Matthias Dietl made changes -
            Mentioned Groups
            Nikola Koevski made changes -
            Assignee New: Nikola Koevski [ nikola.koevski ]

            Hi dietl@nbsp.de,

            Thank you for reporting this bug, and for providing an example project to reproduce it. I will try to replicate the error and provide you with feedback as soon as possible.

            Best,
            Nikola

            Nikola Koevski added a comment - Hi dietl@nbsp.de , Thank you for reporting this bug, and for providing an example project to reproduce it. I will try to replicate the error and provide you with feedback as soon as possible. Best, Nikola
            Nikola Koevski made changes -
            Mentioned Roles
            Nikola Koevski made changes -
            Mentioned Groups
            Nikola Koevski made changes -
            Mentioned Roles
            Nikola Koevski made changes -
            Mentioned Groups

              Unassigned Unassigned
              dietl@nbsp.de Matthias Dietl
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: