Record Class ProcessExecutionContext

java.lang.Object
java.lang.Record
su.onno.process.ProcessExecutionContext

public record ProcessExecutionContext(UUID instanceId, UUID tokenId, String definitionKey, int definitionVersion, int attempt, Instant enteredAt) extends Record
Stable execution identity supplied to an automatic process step.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProcessExecutionContext(UUID instanceId, UUID tokenId, String definitionKey, int definitionVersion, int attempt, Instant enteredAt)
    Creates an instance of a ProcessExecutionContext record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the attempt record component.
    Returns the value of the definitionKey record component.
    int
    Returns the value of the definitionVersion record component.
    Returns the value of the enteredAt record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Stable key for idempotent work or an outbox message produced by this execution attempt.
    Returns the value of the instanceId record component.
    Returns the value of the tokenId record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ProcessExecutionContext

      public ProcessExecutionContext(UUID instanceId, UUID tokenId, String definitionKey, int definitionVersion, int attempt, Instant enteredAt)
      Creates an instance of a ProcessExecutionContext record class.
      Parameters:
      instanceId - the value for the instanceId record component
      tokenId - the value for the tokenId record component
      definitionKey - the value for the definitionKey record component
      definitionVersion - the value for the definitionVersion record component
      attempt - the value for the attempt record component
      enteredAt - the value for the enteredAt record component
  • Method Details

    • idempotencyKey

      public String idempotencyKey()
      Stable key for idempotent work or an outbox message produced by this execution attempt.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • instanceId

      public UUID instanceId()
      Returns the value of the instanceId record component.
      Returns:
      the value of the instanceId record component
    • tokenId

      public UUID tokenId()
      Returns the value of the tokenId record component.
      Returns:
      the value of the tokenId record component
    • definitionKey

      public String definitionKey()
      Returns the value of the definitionKey record component.
      Returns:
      the value of the definitionKey record component
    • definitionVersion

      public int definitionVersion()
      Returns the value of the definitionVersion record component.
      Returns:
      the value of the definitionVersion record component
    • attempt

      public int attempt()
      Returns the value of the attempt record component.
      Returns:
      the value of the attempt record component
    • enteredAt

      public Instant enteredAt()
      Returns the value of the enteredAt record component.
      Returns:
      the value of the enteredAt record component