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

User Operation Log Entry Events miss HistoryEventType

    Details

      Description

      There is no HistoryEventType for User Operation Log Entries.

      That means:

      • whether these entries are produced cannot be configured in a custom history level
      • the value of HistoryEvent.getEventType() is null which has to be dealt with in custom history handlers

      A (non-public API) workaround exists for both cases by checking the type of the history event object first.

      Related forum post: https://groups.google.com/forum/#!topic/camunda-bpm-users/rYQjy70Wj48

        Activity

        Hide
        Alex Alexander Tyatenkov added a comment - - edited

        Hello,

        Can I try to fix this ticket, or it is too complicated for the novice in Camunda?
        As I understand the Event Type of User History Log Event is null, because it is not initialized during the List of HistoryEvent creation in:

        • UserOperationLogManager.logUserOperations
          • DefaultHistoryEventProducer.createUserOperationLogEvents
            • DefaultHistoryEventProducer.initUserOperationLogEvent

        Is it so that Event Type should be the any value of HistoryEventTypes enum (actually it is the string HistoryEventType.getEventName() ) and could be defined based on Entity Type and Operation Type?
        Entity Type can have 4 values TASK, IDENTITY_LINK, ATTACHMENT, PROCESS_INSTANCE.
        possible Operation Type values are located in UserOperationLogEntry.

        Or this issue is more complicated than just setting Even Type.

        Br,
        Alexander

        Show
        Alex Alexander Tyatenkov added a comment - - edited Hello, Can I try to fix this ticket, or it is too complicated for the novice in Camunda? As I understand the Event Type of User History Log Event is null, because it is not initialized during the List of HistoryEvent creation in: UserOperationLogManager.logUserOperations DefaultHistoryEventProducer.createUserOperationLogEvents DefaultHistoryEventProducer.initUserOperationLogEvent Is it so that Event Type should be the any value of HistoryEventTypes enum (actually it is the string HistoryEventType.getEventName() ) and could be defined based on Entity Type and Operation Type ? Entity Type can have 4 values TASK , IDENTITY_LINK , ATTACHMENT , PROCESS_INSTANCE . possible Operation Type values are located in UserOperationLogEntry. Or this issue is more complicated than just setting Even Type. Br, Alexander
        Hide
        thorben.lindhauer Thorben Lindhauer added a comment -

        Hi Alexander,

        That's pretty much what this ticket is about, so not too complicated. I'm just not sure yet what the the History Event Type should be. Right now, I prefer a single type for all user log events. The reason is that they are supposed to be used in HistoryLevel#isHistoryEventProduced and it would probably be cumbersome for people implementing the interface to differentiate between all the single operation types. In addition, isHistoryEventProduced is also handed the actual history event, so it is still possible to access the user operation log event type if you need that level of detail.

        Cheers,
        Thorben

        Show
        thorben.lindhauer Thorben Lindhauer added a comment - Hi Alexander, That's pretty much what this ticket is about, so not too complicated. I'm just not sure yet what the the History Event Type should be. Right now, I prefer a single type for all user log events. The reason is that they are supposed to be used in HistoryLevel#isHistoryEventProduced and it would probably be cumbersome for people implementing the interface to differentiate between all the single operation types. In addition, isHistoryEventProduced is also handed the actual history event, so it is still possible to access the user operation log event type if you need that level of detail. Cheers, Thorben
        Hide
        Alex Alexander Tyatenkov added a comment -

        Hi Thorben,

        If you prefer the single even type, should be the new one created for custom event in HistoryEventTypes enum or you have to think about the right approach of resolving this ticket?
        Also if History Event Type is supposed to be used in HistoryLevel#isHistoryEventProduced then for now this is not working because of CAM-3967, where custom history event handler is not triggered for custom history level.

        Br,
        Alexander

        Show
        Alex Alexander Tyatenkov added a comment - Hi Thorben, If you prefer the single even type, should be the new one created for custom event in HistoryEventTypes enum or you have to think about the right approach of resolving this ticket? Also if History Event Type is supposed to be used in HistoryLevel#isHistoryEventProduced then for now this is not working because of CAM-3967 , where custom history event handler is not triggered for custom history level. Br, Alexander

          People

          • Assignee:
            nikola.koevski Nikola Koevski
            Reporter:
            thorben.lindhauer Thorben Lindhauer
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development