Closed (won't fix)
Project:
Rules
Version:
6.x-1.2
Component:
Rules Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2010 at 20:28 UTC
Updated:
1 Jun 2012 at 17:51 UTC
Hello,
I am developing my own module and I need to test (evaluate) manually all rules corresponding to a specific event.
I used this to get rules attached to my event "my_event" :
$rules = rules_get_rule_set('my_event');
But how can I test the conditions of each rule ($my_rule['#conditions']) ? How can I pass $arguments values to each conditions ?
I tried this, but this does not work.
$arguments = array(
'arg1' => $arg1,
'arg2' => $arg2,
'arg3' => $arg3,
);
$state = array(
'variables' => $arguments,
);
$result = rules_evaluate_elements($tax_rule['#conditions'], $state);
Thanks for your help.
Comments
Comment #1
mitchell commentedThank you for submitting a support request / issue for Rules 1. Sorry it was not attended to earlier; I hope you found the information you were seeking in another resource, such as the Rules Drupal 6 documentation.
Because it has been a while since it was first submitted, I'm closing it to clear up space. However, if you would still like to submit another support request or help answer others support requests, your efforts would be welcomed and appreciated.