public protocol RSDTrackingTask
The tracking task protocol is intended for tasks that use scoring data from a previous task run to
inform subsequent runs of the same task by a given participant.
RSDTaskViewModel will check a task for
conformance to this method when the view model is initialized.
Because sometimes it is actually the step navigator attached to a task that uses the previous
run data, the tracking task does not inherit from
RSDTaskObject for example implementation.
Create and return the tracked data task that may be used to inform subsequent runs of this task.
The task result for this task that is used to build the task data.
The task data or
nilif there is no data to track.
Called following initialization and before presentation of the task to allow setting up a task for custom navigation based on the previous stored data.
The stored task data.
The task path component that is calling this method. If a pointer is kept, it should use a weak reference.
Called before showing a step to conditionally skip the step in favor of instead adding the returned result to the step history. This can be used by tracking tasks to check a step for a previous result that is not expected to change across different runs, such as demographics data. Then if the app had a mechanism for storing the results of a previous run, it can skip this step on subsequent runs.
The step to check for previous run data.
- shouldSkip: Whether or not the step should be skipped.
- stepResult: The step to add to the task result for this step in lieu of showing it.