(self, case, now)
:return: CaseRuleActionResult object aggregating the results from all actions.
:return: CaseRuleActionResult object aggregating the results from all actions.
: return : CaseRuleActionResult object aggregating the results from all actions .
def run_rule(self, case, now):
        """
        :return: CaseRuleActionResult object aggregating the results from all actions.
        """
        if self.deleted:
            raise self.RuleError("Attempted to call run_rule on a deleted rule")

        if not self.active:
            raise self.RuleError("Attempted to call run_rule on an inactive rule")

        if not isinstance(case, CommCareCaseSQL) or case.domain != self.domain:
            raise self.RuleError("Invalid case given")

        if self.criteria_match(case, now):
            return self.run_actions_when_case_matches(case)
        else:
            return self.run_actions_when_case_does_not_match(case)
def run_rule ( self , case , now ) : if self . deleted : raise self . RuleError ( "Attempted to call run_rule on a deleted rule" ) if not self . active : raise self . RuleError ( "Attempted to call run_rule on an inactive rule" ) if not isinstance ( case , CommCareCaseSQL ) or case . domain != self . domain : raise self . RuleError ( "Invalid case given" ) if self . criteria_match ( case , now ) : return self . run_actions_when_case_matches ( case ) else : return self . run_actions_when_case_does_not_match ( case )