Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-3610

AuditTrailEntry instances not correlated back to command if executed via CommandExecutorService (ie background commands)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0-RC2
    • 2.0.0-RC3
    • Core
    • None

    Description

      The AuditTrailEntry#getInteractionId() is copied from InteractionService#currentInteractionId(), which is a different value than that of InteractionService#currentInteraction().getInteractionId() when the CommandExecutorService is in use.

      This is because the latter delegates to Interaction#getCommand(), where the CommandExecutorService mutates the interactionId with that of the command being executed, whereas the former is unchanged with its own copy of the interactionId taken prior to this.

      The fix I think is to eliminate the cache in the former so that InteractionService#currentInteractionId() returns the correct value (that of the interactionId of the command being executed).

      Attachments

        Activity

          People

            danhaywood Daniel Keir Haywood
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: