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

Process application auto-deployment is called when nested application context is being refreshed

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 7.9.0, 7.9.0-alpha4
    • None
    • engine
    • None

    Description

      What are the steps to reproduce your problem?

      • Create Spring process application, declaring nested application context (Camunda's is the parent one)
      • Call refresh of child application context

      What is the problem?
      The ContextRefreshedEvent is being processed in SpringProcessApplication whenever a context in the application context's hierarchy refreshed, due to Springs event propagation. The event causes deployment of process application, which can be too early, if the event corresponds to a child context instead of application context.

      Side effect: If the @PostDeploy hook publishes some event (as it is done by sprint-boot-starter's process application) and there are EventListener}}s defined on that event on the application context (as we recommend it for spring-boot-starters {{PostDeployEvent), these listeners are not fired as expected, because the application context may not be initialized when the child context refreshes.

      What would be the expected behavior:
      The ContextRefreshedEvent should not be processed in case of child context, so that the parent context is in correct state, when the process application is being deployed

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              svetlana.dorokhova Svetlana Dorokhova
              svetlana.dorokhova Svetlana Dorokhova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce