Class EsbCausation

java.lang.Object
com.kingsrook.qqq.esb.envelope.EsbCausation

public class EsbCausation extends Object
The id of the ESB event that caused the work running on the current thread. A triggered run sets it to the triggering event's id (and clears it when done); EsbEventFactory copies it into each event it makes, as the event's causationId (the qqqcausationid CloudEvent attribute). So a process that is triggered by table X and updates table X publishes events that point back at the event that triggered it, which is how a self-trigger loop can be spotted. It is a thread-local: work handed to another thread doesn't carry it.
  • Constructor Details

    • EsbCausation

      public EsbCausation()
  • Method Details

    • set

      public static void set(String eventId)
      Set the current thread's causing event id (null is the same as clear).
    • current

      public static String current()
      The current thread's causing event id, or null.
    • clear

      public static void clear()
      Remove the current thread's causing event id.