Record Class ProcessWorkItem

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

public record ProcessWorkItem(UUID id, UUID instanceId, UUID tokenId, String definitionKey, int definitionVersion, String stepKey, String title, WorkItemStatus status, ProcessActorId assigneeId, String assignee, ProcessDomainLink subject, Instant createdAt, Instant claimedAt, Instant completedAt, String outcome, List<String> outcomes) extends Record
Durable human task exposed by ProcessEngine.
  • Constructor Details

    • ProcessWorkItem

      public ProcessWorkItem(UUID id, UUID instanceId, UUID tokenId, String definitionKey, int definitionVersion, String stepKey, String title, WorkItemStatus status, ProcessActorId assigneeId, String assignee, ProcessDomainLink subject, Instant createdAt, Instant claimedAt, Instant completedAt, String outcome, List<String> outcomes)
      Creates an instance of a ProcessWorkItem record class.
      Parameters:
      id - the value for the id record component
      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
      stepKey - the value for the stepKey record component
      title - the value for the title record component
      status - the value for the status record component
      assigneeId - the value for the assigneeId record component
      assignee - the value for the assignee record component
      subject - the value for the subject record component
      createdAt - the value for the createdAt record component
      claimedAt - the value for the claimedAt record component
      completedAt - the value for the completedAt record component
      outcome - the value for the outcome record component
      outcomes - the value for the outcomes record component
    • ProcessWorkItem

      public ProcessWorkItem(UUID id, UUID instanceId, String definitionKey, String stepKey, String title, WorkItemStatus status, ProcessActorId assigneeId, String assignee, ProcessDomainLink subject, Instant createdAt, Instant claimedAt, Instant completedAt, String outcome, List<String> outcomes)
      Source-compatible constructor for work items produced before execution tokens.
  • 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
    • 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
    • stepKey

      public String stepKey()
      Returns the value of the stepKey record component.
      Returns:
      the value of the stepKey record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • status

      public WorkItemStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • assigneeId

      public ProcessActorId assigneeId()
      Returns the value of the assigneeId record component.
      Returns:
      the value of the assigneeId record component
    • assignee

      public String assignee()
      Returns the value of the assignee record component.
      Returns:
      the value of the assignee record component
    • subject

      public ProcessDomainLink subject()
      Returns the value of the subject record component.
      Returns:
      the value of the subject record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • claimedAt

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

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

      public String outcome()
      Returns the value of the outcome record component.
      Returns:
      the value of the outcome record component
    • outcomes

      public List<String> outcomes()
      Returns the value of the outcomes record component.
      Returns:
      the value of the outcomes record component