RSDCohortTrackingRule
open class RSDCohortTrackingRule : RSDTrackingRule, Codable
A cohort rule can be used to mutate a list of cohorts of which the participant is a member. A cohort is a data group that participants are added to based on the results of survey questions.
-
The initial cohorts before the task starts.
Declaration
Swift
public let initialCohorts: Set<String>
-
The current set of cohorts.
Declaration
Swift
open private(set) var currentCohorts: Set<String> { get }
-
MARK: RSDConditionalRule Check if the step implements
RSDCohortNavigationStep
and apply the before rules for the step to the current cohorts.Declaration
Swift
public func skipToStepIdentifier(before step: RSDStep, with result: RSDTaskResult?, isPeeking: Bool) -> String?
-
This method is used to test whether or not to mutate the current cohorts. This will look to see if the step implements the
RSDCohortAssignmentStep
and if so, apply the new cohorts.Then it will check if the step implements
RSDCohortNavigationStep
and apply the after rules for the step to the current cohorts.Declaration
Swift
open func nextStepIdentifier(after step: RSDStep?, with result: RSDTaskResult?, isPeeking: Bool) -> String?