def evaluate(self):
    '\n        Evaluate trigger instance against the rule.\n\n        :return: ``True`` if the rule matches, ``False`` otherwise.\n        :rtype: ``boolean``\n        '
    rule_db = self._get_rule_db()
    (trigger_instance_db, trigger_db) = self._get_trigger_instance_db()
    if (rule_db.trigger != trigger_db.ref):
        LOG.info('rule.trigger "%s" and trigger.ref "%s" do not match.', rule_db.trigger, trigger_db.ref)
        return False
    matcher = RulesMatcher(trigger_instance=trigger_instance_db, trigger=trigger_db, rules=[rule_db], extra_info=True)
    matching_rules = matcher.get_matching_rules()
    if (len(matching_rules) < 1):
        return False
    enforcer = RuleEnforcer(trigger_instance=trigger_instance_db, rule=rule_db)
    runner_type_db = mock.Mock()
    runner_type_db.runner_parameters = {}
    action_db = mock.Mock()
    action_db.parameters = {}
    params = rule_db.action.parameters
    (context, additional_contexts) = enforcer.get_action_execution_context(action_db=action_db, trace_context=None)
    try:
        params = enforcer.get_resolved_parameters(action_db=action_db, runnertype_db=runner_type_db, params=params, context=context, additional_contexts=additional_contexts)
        LOG.info('Action parameters resolved to:')
        for param in six.iteritems(params):
            LOG.info('\t%s: %s', param[0], param[1])
        return True
    except (UndefinedError, ValueError) as e:
        LOG.error('Failed to resolve parameters\n\tOriginal error : %s', six.text_type(e))
        return False
    except:
        LOG.exception('Failed to resolve parameters.')
        return False
Evaluate trigger instance against the rule.

:return: ``True`` if the rule matches, ``False`` otherwise.
:rtype: ``boolean``
def evaluate(self):
    '\n        Evaluate trigger instance against the rule.\n\n        :return: ``True`` if the rule matches, ``False`` otherwise.\n        :rtype: ``boolean``\n        '
    rule_db = self._get_rule_db()
    (trigger_instance_db, trigger_db) = self._get_trigger_instance_db()
    if (rule_db.trigger != trigger_db.ref):
        LOG.info('rule.trigger "%s" and trigger.ref "%s" do not match.', rule_db.trigger, trigger_db.ref)
        return False
    matcher = RulesMatcher(trigger_instance=trigger_instance_db, trigger=trigger_db, rules=[rule_db], extra_info=True)
    matching_rules = matcher.get_matching_rules()
    if (len(matching_rules) < 1):
        return False
    enforcer = RuleEnforcer(trigger_instance=trigger_instance_db, rule=rule_db)
    runner_type_db = mock.Mock()
    runner_type_db.runner_parameters = {}
    action_db = mock.Mock()
    action_db.parameters = {}
    params = rule_db.action.parameters
    (context, additional_contexts) = enforcer.get_action_execution_context(action_db=action_db, trace_context=None)
    try:
        params = enforcer.get_resolved_parameters(action_db=action_db, runnertype_db=runner_type_db, params=params, context=context, additional_contexts=additional_contexts)
        LOG.info('Action parameters resolved to:')
        for param in six.iteritems(params):
            LOG.info('\t%s: %s', param[0], param[1])
        return True
    except (UndefinedError, ValueError) as e:
        LOG.error('Failed to resolve parameters\n\tOriginal error : %s', six.text_type(e))
        return False
    except:
        LOG.exception('Failed to resolve parameters.')
        return False