Record Class ProcessSnapshot

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

public record ProcessSnapshot(UUID id, String definitionKey, int definitionVersion, String currentStep, List<String> activeSteps, ProcessStatus status, UUID rootInstanceId, UUID parentInstanceId, UUID parentTokenId, ProcessActorId startedById, String startedBy, Instant startedAt, Instant updatedAt, Instant completedAt, Instant cancelledAt, String cancelReason, int version) extends Record
Persistence-oriented view of a durable process instance.
  • Constructor Details

    • ProcessSnapshot

      public ProcessSnapshot(UUID id, String definitionKey, int definitionVersion, String currentStep, List<String> activeSteps, ProcessStatus status, UUID rootInstanceId, UUID parentInstanceId, UUID parentTokenId, ProcessActorId startedById, String startedBy, Instant startedAt, Instant updatedAt, Instant completedAt, Instant cancelledAt, String cancelReason, int version)
      Creates an instance of a ProcessSnapshot record class.
      Parameters:
      id - the value for the id record component
      definitionKey - the value for the definitionKey record component
      definitionVersion - the value for the definitionVersion record component
      currentStep - the value for the currentStep record component
      activeSteps - the value for the activeSteps record component
      status - the value for the status record component
      rootInstanceId - the value for the rootInstanceId record component
      parentInstanceId - the value for the parentInstanceId record component
      parentTokenId - the value for the parentTokenId record component
      startedById - the value for the startedById record component
      startedBy - the value for the startedBy record component
      startedAt - the value for the startedAt record component
      updatedAt - the value for the updatedAt record component
      completedAt - the value for the completedAt record component
      cancelledAt - the value for the cancelledAt record component
      cancelReason - the value for the cancelReason record component
      version - the value for the version record component
    • ProcessSnapshot

      public ProcessSnapshot(UUID id, String definitionKey, String currentStep, ProcessStatus status, ProcessActorId startedById, String startedBy, Instant startedAt, Instant updatedAt, int version)
      Source-compatible constructor for snapshots produced by the original single-token engine.
  • Method Details

    • 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.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id 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
    • currentStep

      public String currentStep()
      Returns the value of the currentStep record component.
      Returns:
      the value of the currentStep record component
    • activeSteps

      public List<String> activeSteps()
      Returns the value of the activeSteps record component.
      Returns:
      the value of the activeSteps record component
    • status

      public ProcessStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • rootInstanceId

      public UUID rootInstanceId()
      Returns the value of the rootInstanceId record component.
      Returns:
      the value of the rootInstanceId record component
    • parentInstanceId

      public UUID parentInstanceId()
      Returns the value of the parentInstanceId record component.
      Returns:
      the value of the parentInstanceId record component
    • parentTokenId

      public UUID parentTokenId()
      Returns the value of the parentTokenId record component.
      Returns:
      the value of the parentTokenId record component
    • startedById

      public ProcessActorId startedById()
      Returns the value of the startedById record component.
      Returns:
      the value of the startedById record component
    • startedBy

      public String startedBy()
      Returns the value of the startedBy record component.
      Returns:
      the value of the startedBy record component
    • startedAt

      public Instant startedAt()
      Returns the value of the startedAt record component.
      Returns:
      the value of the startedAt record component
    • updatedAt

      public Instant updatedAt()
      Returns the value of the updatedAt record component.
      Returns:
      the value of the updatedAt record component
    • completedAt

      public Instant completedAt()
      Returns the value of the completedAt record component.
      Returns:
      the value of the completedAt record component
    • cancelledAt

      public Instant cancelledAt()
      Returns the value of the cancelledAt record component.
      Returns:
      the value of the cancelledAt record component
    • cancelReason

      public String cancelReason()
      Returns the value of the cancelReason record component.
      Returns:
      the value of the cancelReason record component
    • version

      public int version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component