Record Class ProcedureRunner.Paused

java.lang.Object
java.lang.Record
com.axelor.ai.procedure.ProcedureRunner.Paused
Record Components:
state - the form session's state
step - the step it stopped in
loaded - the form's values as loaded, for the changes at the end
answers - the alerts met so far
said - the messages so far
writes - the records the form's actions wrote so far
openForm - how the open form was used at the start, or null
Enclosing class:
ProcedureRunner

public static record ProcedureRunner.Paused(FormState state, int step, Map<String,Object> loaded, List<ProcedureRunner.Answer> answers, List<ProcedureRunner.Said> said, List<FormResult.Write> writes, ProcedureRunner.OpenForm openForm) extends Record
A run stopped at a question for the user, with all it needs to carry on: the form's state, the procedure step it stopped in (-1 for the form's load hooks), and what the run met so far. Kept as JSON, as FormState is: toMap() and fromMap(java.util.Map<java.lang.String, ?>).
  • Constructor Details

  • Method Details

    • question

      public ActionAlert question()
      The question the run waits on.
    • toMap

      public Map<String,Object> toMap()
      The paused run as JSON values, for any JSON mapper to write.
    • fromMap

      public static ProcedureRunner.Paused fromMap(Map<String,?> map)
      A paused run from what toMap() gave, as a JSON mapper reads it back.
      Throws:
      IllegalArgumentException - when the map is not a paused run
    • 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.
    • state

      public FormState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • step

      public int step()
      Returns the value of the step record component.
      Returns:
      the value of the step record component
    • loaded

      public Map<String,Object> loaded()
      Returns the value of the loaded record component.
      Returns:
      the value of the loaded record component
    • answers

      public List<ProcedureRunner.Answer> answers()
      Returns the value of the answers record component.
      Returns:
      the value of the answers record component
    • said

      public List<ProcedureRunner.Said> said()
      Returns the value of the said record component.
      Returns:
      the value of the said record component
    • writes

      public List<FormResult.Write> writes()
      Returns the value of the writes record component.
      Returns:
      the value of the writes record component
    • openForm

      public ProcedureRunner.OpenForm openForm()
      Returns the value of the openForm record component.
      Returns:
      the value of the openForm record component