RPOrderedTask
A simple linear task which implement the RPTask protocol. It shows the steps one after another without the option of going back or branching.
For simple tasks the RPOrderedTask is perfect. For more features (going back to previous questions, branching...) consider using RPNavigableOrderedTask which inherited from this class.
- Inheritance
-
- Object
- Serializable
- RPTask
- RPOrderedTask
- Implementers
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
RPOrderedTask.fromJson
RPOrderedTask
Properties
fromJsonFunction
The function which can convert a JSON string to an object of this type.
isConsentTask
Returns true if the task is a Consent Task. It is considered a Consent Task if it has an RPConsentReviewStep
numberOfQuestionSteps
The number of question steps in the task
steps
The list of RPSteps of the task
Methods
getStepAfterStep
- RPStep? step,
- RPTaskResult? result
Returns the step after a specified step if there's any. If the specified step is null then it returns the first step.
Returns null if step was the last one in the sequence.
getStepBeforeStep
- RPStep? step,
- RPTaskResult? result
Returns the step that precedes the specified step, if there is one. If the specified step is null then it returns the last step.
Returns null if step was the first one in the sequence.
getStepWithIdentifier
Returns the step that matches the specified identifier. Returns null if there is no step with the identifier.
getTitleForStep
Returns the title of a given step
toJson
Return a JSON encoding of this object.