RSDConditionalRule
public protocol RSDConditionalRule
A conditional rule is appended to the navigable task to check a secondary source for whether or not the step should be displayed.
Note
ResearchSuite does not currently implement any conditional rule objects. The conditional rule is
included here for future implementation of data tracking across runs of a task. (syoung 10/03/2017)
-
Should the given step be skipped, based on the current result set?
Declaration
Swift
func shouldSkip(step: RSDStep, with result: RSDTaskResult?) -> BoolParameters
stepThe step about to be displayed.
resultThe current task result.
Return Value
trueif the step should be skipped, otherwiseno. -
Asks the conditional rule what the identifier is for the next step to display after the given step.
Declaration
Swift
func nextStepIdentifier(after step: RSDStep?, with result: RSDTaskResult?) -> String?Parameters
stepThe step that just finished.
resultThe current task result.
Return Value
The identifier of the next step.
-
Allows the conditional rule to mutate or replace the step that the navigation rules determine should be the return step.
Declaration
Swift
func replacementStep(for step:RSDStep?, with result: RSDTaskResult?) -> RSDStep?Parameters
stepThe step that navigation has opted to return.
resultThe current task result.
Return Value
The actual step to move to. If no action, then
stepshould be returned.
View on GitHub
RSDConditionalRule Protocol Reference