Package com.axelor.ai.procedure
Record Class ProcedureRunner.Paused
java.lang.Object
java.lang.Record
com.axelor.ai.procedure.ProcedureRunner.Paused
- Record Components:
state- the form session's statestep- the step it stopped inloaded- the form's values as loaded, for the changes at the endanswers- the alerts met so farsaid- the messages so farwrites- the records the form's actions wrote so faropenForm- 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 Summary
ConstructorsConstructorDescriptionPaused(FormState state, int step, Map<String, Object> loaded, List<ProcedureRunner.Answer> answers, List<ProcedureRunner.Said> said, List<FormResult.Write> writes, ProcedureRunner.OpenForm openForm) Creates an instance of aPausedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionanswers()Returns the value of theanswersrecord component.final booleanIndicates whether some other object is "equal to" this one.static ProcedureRunner.PausedA paused run from whattoMap()gave, as a JSON mapper reads it back.final inthashCode()Returns a hash code value for this object.loaded()Returns the value of theloadedrecord component.openForm()Returns the value of theopenFormrecord component.question()The question the run waits on.said()Returns the value of thesaidrecord component.state()Returns the value of thestaterecord component.intstep()Returns the value of thesteprecord component.toMap()The paused run as JSON values, for any JSON mapper to write.final StringtoString()Returns a string representation of this record class.writes()Returns the value of thewritesrecord component.
-
Constructor Details
-
Paused
public Paused(FormState state, int step, Map<String, Object> loaded, List<ProcedureRunner.Answer> answers, List<ProcedureRunner.Said> said, List<FormResult.Write> writes, ProcedureRunner.OpenForm openForm) Creates an instance of aPausedrecord class.- Parameters:
state- the value for thestaterecord componentstep- the value for thesteprecord componentloaded- the value for theloadedrecord componentanswers- the value for theanswersrecord componentsaid- the value for thesaidrecord componentwrites- the value for thewritesrecord componentopenForm- the value for theopenFormrecord component
-
-
Method Details
-
question
The question the run waits on. -
toMap
The paused run as JSON values, for any JSON mapper to write. -
fromMap
A paused run from whattoMap()gave, as a JSON mapper reads it back.- Throws:
IllegalArgumentException- when the map is not a paused run
-
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 '=='. -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
step
public int step()Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-
loaded
Returns the value of theloadedrecord component.- Returns:
- the value of the
loadedrecord component
-
answers
Returns the value of theanswersrecord component.- Returns:
- the value of the
answersrecord component
-
said
Returns the value of thesaidrecord component.- Returns:
- the value of the
saidrecord component
-
writes
Returns the value of thewritesrecord component.- Returns:
- the value of the
writesrecord component
-
openForm
Returns the value of theopenFormrecord component.- Returns:
- the value of the
openFormrecord component
-