Package su.onno.process
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 Summary
ConstructorsConstructorDescriptionProcessSnapshot(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 aProcessSnapshotrecord class.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 Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveStepsrecord component.Returns the value of thecancelledAtrecord component.Returns the value of thecancelReasonrecord component.Returns the value of thecompletedAtrecord component.Returns the value of thecurrentSteprecord component.Returns the value of thedefinitionKeyrecord component.intReturns the value of thedefinitionVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theparentInstanceIdrecord component.Returns the value of theparentTokenIdrecord component.Returns the value of therootInstanceIdrecord component.Returns the value of thestartedAtrecord component.Returns the value of thestartedByrecord component.Returns the value of thestartedByIdrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdatedAtrecord component.intversion()Returns the value of theversionrecord component.
-
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 aProcessSnapshotrecord class.- Parameters:
id- the value for theidrecord componentdefinitionKey- the value for thedefinitionKeyrecord componentdefinitionVersion- the value for thedefinitionVersionrecord componentcurrentStep- the value for thecurrentSteprecord componentactiveSteps- the value for theactiveStepsrecord componentstatus- the value for thestatusrecord componentrootInstanceId- the value for therootInstanceIdrecord componentparentInstanceId- the value for theparentInstanceIdrecord componentparentTokenId- the value for theparentTokenIdrecord componentstartedById- the value for thestartedByIdrecord componentstartedBy- the value for thestartedByrecord componentstartedAt- the value for thestartedAtrecord componentupdatedAt- the value for theupdatedAtrecord componentcompletedAt- the value for thecompletedAtrecord componentcancelledAt- the value for thecancelledAtrecord componentcancelReason- the value for thecancelReasonrecord componentversion- the value for theversionrecord 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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
definitionKey
Returns the value of thedefinitionKeyrecord component.- Returns:
- the value of the
definitionKeyrecord component
-
definitionVersion
public int definitionVersion()Returns the value of thedefinitionVersionrecord component.- Returns:
- the value of the
definitionVersionrecord component
-
currentStep
Returns the value of thecurrentSteprecord component.- Returns:
- the value of the
currentSteprecord component
-
activeSteps
Returns the value of theactiveStepsrecord component.- Returns:
- the value of the
activeStepsrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
rootInstanceId
Returns the value of therootInstanceIdrecord component.- Returns:
- the value of the
rootInstanceIdrecord component
-
parentInstanceId
Returns the value of theparentInstanceIdrecord component.- Returns:
- the value of the
parentInstanceIdrecord component
-
parentTokenId
Returns the value of theparentTokenIdrecord component.- Returns:
- the value of the
parentTokenIdrecord component
-
startedById
Returns the value of thestartedByIdrecord component.- Returns:
- the value of the
startedByIdrecord component
-
startedBy
Returns the value of thestartedByrecord component.- Returns:
- the value of the
startedByrecord component
-
startedAt
Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
updatedAt
Returns the value of theupdatedAtrecord component.- Returns:
- the value of the
updatedAtrecord component
-
completedAt
Returns the value of thecompletedAtrecord component.- Returns:
- the value of the
completedAtrecord component
-
cancelledAt
Returns the value of thecancelledAtrecord component.- Returns:
- the value of the
cancelledAtrecord component
-
cancelReason
Returns the value of thecancelReasonrecord component.- Returns:
- the value of the
cancelReasonrecord component
-
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-