Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-11410 Camunda Engine Quarkus Extension
  3. CAM-13752

CDI: Investigate if interceptors should be enabled by default

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.16.0, 7.16.0-alpha5
    • None
    • quarkus
    • None

      Problem

      • The engine-cdi module has two interceptors:
        • org.camunda.bpm.engine.cdi.impl.annotation.StartProcessInterceptor
        • org.camunda.bpm.engine.cdi.impl.annotation.CompleteTaskInterceptor
      • In Weld-based CDI, interceptors can be enabled via the META-INF/beans.xml file.
        • By default, we enable our interceptors in this file.
      • In Quarkus, the interceptors are automatically discovered and registered.

      Solution Ideas

      1. Interceptors are enabled by default; the user can exclude them via the property quarkus.arc.exclude-types in the application.properties file
        • Pros
          • engine-cdi behavior works out of the box
        • Cons
          • The annotation @Priority is not present on the interceptors, which is logged on the log level INFO => leads to confusion for the users.
            • We cannot directly add the @Priority annotation to the interceptors of the engine-cdi module since the annotation does not exist in CDI 1.0
              • We could extend the interceptors in the Quarkus extension and assign the @Priority annotation to get rid of the logs => this is not a very robust solution when we add more interceptors in the future
      2. Interceptors are excluded by default; the user can enable them by extending and annotating the interceptors in the Quarkus application.
        • Pros
          • Users have full control over exact annotations (e.g., priority, scope, etc.)
        • Cons
          • engine-cdi behavior does not work out of the box
          • Not robust since new interceptors we add in the future must be manually excluded in Quarkus
          • Higher documentation effort

      Decision

      Choosing solution #1 since it is better to maintain and less documentation effort. We accept for now that users see a log that the @Priority annotation is missing. With CAM-13841 we should evaluate if we can move our camunda-engine-cdi module to a higher CDI version (at least 1.1) and add this annotation to the module to get rid of the warning.

        This is the controller panel for Smart Panels app

              tassilo.weidner Tassilo Weidner
              tassilo.weidner Tassilo Weidner
              Tassilo Weidner Tassilo Weidner
              Nikola Koevski Nikola Koevski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: