• Icon: Feature Request Feature Request
    • Resolution: Won't Fix
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • engine
    • None

      User Story (Required on creation):

      I was trying to extend the processing of history events and ran into the following problems:

      1. I can`t replaced/remove HistoryParseListener in camunda configuration via plugin. This is necessary so that I can use my BpmnParseListener implementation(like as HistoryParseListener).
      2. It is difficult to extend the HistoryEvent when writing custom history handlers(for example, I tried to add a business key to the HistoryEvent (not persist it in the database, but just pass it to the handler)

      Functional Requirements (Required before implementation):

      1. Add the ability to disable default BPMN parse listeners
      2. Add the ability to extend the HistoryEvent via composition

      Technical Requirements (Required before implementation):

      1. In class ProcessEngineConfigurationImpl add property as boolean to disable HistoryParseListener in ProcessEngineConfigurationImp #getDefaultBPMNParseListeners
      2. In HistoryEventHandler add new methods with one parameter with type B. B is interface with getter for HistoryEvent. Such a scheme will allow to expand the context of the history handler by replacing the implementation of B.

      Limitations of Scope (Optional):

      Hints (optional):

        This is the controller panel for Smart Panels app

            [CAM-14187] Make history processing more flexible

            Tobias Metzke-Bernstein added a comment - - edited

            Hi bespaltovyj,

            thanks for creating this request.

            Would you mind providing the following things so we can get a better picture of what you would like to achieve:

            • Details on why disabling the HistoryParseListener is necessary in your case. Why would you need it to be disabled? What does specifically not work when it's enabled?
            • An example of the method you would like to see implemented (can be pseudocode) and how it is used. How does this improve the current situation? What can you do with the new method you couldn't do beforehand?

            This will help us in understanding your use case in a more in-depth way and in assessing if a broader user base could benefit from this.

            Thanks and best,
            Tobias

            Tobias Metzke-Bernstein added a comment - - edited Hi bespaltovyj , thanks for creating this request. Would you mind providing the following things so we can get a better picture of what you would like to achieve: Details on why disabling the HistoryParseListener is necessary in your case. Why would you need it to be disabled? What does specifically not work when it's enabled? An example of the method you would like to see implemented (can be pseudocode) and how it is used. How does this improve the current situation? What can you do with the new method you couldn't do beforehand? This will help us in understanding your use case in a more in-depth way and in assessing if a broader user base could benefit from this. Thanks and best, Tobias

            Initially, I needed to solve such a problem by sending the history events to another system. After some time, it took all the events to include the business key (for example, it is not currently in the activity events, but it is easy to get it from the DelegateExecution).

            1. I need to disable HistoryParseListener so that I can replace it with my implementation. The replacement is needed to avoid doing event handling twice.
            2. I created a sample project with an example of exactly what I want to do. https://github.com/bespaltovyj/camunda-history-event-customization

            Pavel Pletnev added a comment - Initially, I needed to solve such a problem by sending the history events to another system. After some time, it took all the events to include the business key (for example, it is not currently in the activity events, but it is easy to get it from the DelegateExecution). I need to disable HistoryParseListener so that I can replace it with my implementation. The replacement is needed to avoid doing event handling twice. I created a sample project with an example of exactly what I want to do. https://github.com/bespaltovyj/camunda-history-event-customization

            Hi bespaltovyj,

            thanks for those details and the example project.

            Looking at what you would like to achieve and the code you added, I assume you would like to produce your own history events or customize how history events are produced.
            Therefore, I believe the history event producer might be something you would rather want to customize here.
            Did you look at the HistoryEventProducer already? It can simply be configured in the process engine configuration via the setHistoryEventProducer method.

            I think it should be more fitting to adjust how the events are produced by using this approach rather than adjusting the whole listener infrastructure.

            Let me know if that makes customizing your events easier and more straightforward.

            Best,
            Tobias

            Tobias Metzke-Bernstein added a comment - Hi bespaltovyj , thanks for those details and the example project. Looking at what you would like to achieve and the code you added, I assume you would like to produce your own history events or customize how history events are produced. Therefore, I believe the history event producer might be something you would rather want to customize here. Did you look at the HistoryEventProducer already? It can simply be configured in the process engine configuration via the setHistoryEventProducer method. I think it should be more fitting to adjust how the events are produced by using this approach rather than adjusting the whole listener infrastructure. Let me know if that makes customizing your events easier and more straightforward. Best, Tobias

            Hi bespaltovyj,

            I am closing this ticket due to inactivity for now.
            That said, feel free to comment at your leisure and we can reopen and revisit this if needed.

            Cheers,
            Tobias

            Tobias Metzke-Bernstein added a comment - Hi bespaltovyj , I am closing this ticket due to inactivity for now. That said, feel free to comment at your leisure and we can reopen and revisit this if needed. Cheers, Tobias

              Unassigned Unassigned
              bespaltovyj Pavel Pletnev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: