Record Class WorkflowEvent

java.lang.Object
java.lang.Record
com.axelor.workflow.exec.WorkflowEvent

public record WorkflowEvent(TriggerKind trigger, RecordRef record, Set<String> changedFields, Map<String,Object> self, Map<String,Object> old) extends Record
A captured change handed to the runtime. self and old hold the record's fields, custom fields flattened; old is null on create.
  • Constructor Details

    • WorkflowEvent

      public WorkflowEvent(TriggerKind trigger, RecordRef record, Set<String> changedFields, Map<String,Object> self, Map<String,Object> old)
      Creates an instance of a WorkflowEvent record class.
      Parameters:
      trigger - the value for the trigger record component
      record - the value for the record record component
      changedFields - the value for the changedFields record component
      self - the value for the self record component
      old - the value for the old record component
  • Method Details

    • model

      public String model()
    • jsonModel

      public String jsonModel()
    • recordId

      public Long recordId()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • trigger

      public TriggerKind trigger()
      Returns the value of the trigger record component.
      Returns:
      the value of the trigger record component
    • record

      public RecordRef record()
      Returns the value of the record record component.
      Returns:
      the value of the record record component
    • changedFields

      public Set<String> changedFields()
      Returns the value of the changedFields record component.
      Returns:
      the value of the changedFields record component
    • self

      public Map<String,Object> self()
      Returns the value of the self record component.
      Returns:
      the value of the self record component
    • old

      public Map<String,Object> old()
      Returns the value of the old record component.
      Returns:
      the value of the old record component