Record Class EvaluatorResult

java.lang.Object
java.lang.Record
com.flowable.agent.engine.impl.evaluator.EvaluatorResult

public record EvaluatorResult(boolean passed, Double score, Double scoreMin, Double scoreMax, String reason, String referenceScopeId, String referenceScopeType, Instant startTime, Instant endTime) extends Record
The outcome of one evaluator run.
Author:
Prathamesh Mane
  • Constructor Details

    • EvaluatorResult

      public EvaluatorResult(boolean passed, Double score, Double scoreMin, Double scoreMax, String reason, String referenceScopeId, String referenceScopeType, Instant startTime, Instant endTime)
      Creates an instance of a EvaluatorResult record class.
      Parameters:
      passed - the value for the passed record component
      score - the value for the score record component
      scoreMin - the value for the scoreMin record component
      scoreMax - the value for the scoreMax record component
      reason - the value for the reason record component
      referenceScopeId - the value for the referenceScopeId record component
      referenceScopeType - the value for the referenceScopeType record component
      startTime - the value for the startTime record component
      endTime - the value for the endTime record component
  • Method Details

    • completed

      public static EvaluatorResult completed(boolean passed, Double score, Double scoreMin, Double scoreMax, String reason, String referenceScopeId, String referenceScopeType)
    • errored

      public static EvaluatorResult errored(String reason)
    • withTiming

      public EvaluatorResult withTiming(Instant startTime, Instant endTime)
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • passed

      public boolean passed()
      Returns the value of the passed record component.
      Returns:
      the value of the passed record component
    • score

      public Double score()
      Returns the value of the score record component.
      Returns:
      the value of the score record component
    • scoreMin

      public Double scoreMin()
      Returns the value of the scoreMin record component.
      Returns:
      the value of the scoreMin record component
    • scoreMax

      public Double scoreMax()
      Returns the value of the scoreMax record component.
      Returns:
      the value of the scoreMax record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • referenceScopeId

      public String referenceScopeId()
      Returns the value of the referenceScopeId record component.
      Returns:
      the value of the referenceScopeId record component
    • referenceScopeType

      public String referenceScopeType()
      Returns the value of the referenceScopeType record component.
      Returns:
      the value of the referenceScopeType record component
    • startTime

      public Instant startTime()
      Returns the value of the startTime record component.
      Returns:
      the value of the startTime record component
    • endTime

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