Class ResultStatus

java.lang.Object
com.yworkflow.definition.model.value.ResultStatus
All Implemented Interfaces:
ModelId, Comparable<ResultStatus>

public class ResultStatus extends Object implements ModelId, Comparable<ResultStatus>
Represents the status of a workflow result. ResultStatus is used to track the current state of workflow execution results, providing visibility into the progress and completion status of workflow operations.
Since:
1.0
See Also:
  • Field Details

    • EMPTY

      public static final ResultStatus EMPTY
      Empty result status with no value.
    • DEFAULT_ENTER_STATUS

      public static final ResultStatus DEFAULT_ENTER_STATUS
      Default status for entering a state or result.
    • DEFAULT_EXIT_STATUS

      public static final ResultStatus DEFAULT_EXIT_STATUS
      Default status for exiting a state or result.
  • Method Details

    • getValue

      public String getValue()
      Description copied from interface: ModelId
      Gets the string value of this model ID.
      Specified by:
      getValue in interface ModelId
      Returns:
      the ID value as a string
    • resultStatus

      public static ResultStatus resultStatus(String value)
      Creates a new ResultStatus with the specified value.
      Parameters:
      value - the status value
      Returns:
      a new ResultStatus instance
      Throws:
      IllegalArgumentException - if the value is null or empty
    • orNull

      public static ResultStatus orNull(String value)
      Creates a ResultStatus from the given value, returning null if the value is null.
      Parameters:
      value - the status value
      Returns:
      a ResultStatus instance or null if value is null
    • orElse

      public static ResultStatus orElse(String value, ResultStatus resultStatus)
      Creates a ResultStatus from the given value, returning the default if the value is null.
      Parameters:
      value - the status value
      resultStatus - the default status to return if value is null
      Returns:
      a ResultStatus instance
      Throws:
      NullPointerException - if resultStatus is null
    • compareTo

      public int compareTo(ResultStatus o)
      Specified by:
      compareTo in interface Comparable<ResultStatus>
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • propertyMissing

      public Object propertyMissing(String name)
      Groovy-style property access method for dynamic property resolution.
      Parameters:
      name - the property name
      Returns:
      true if the property name matches the status value, false otherwise