Any way to run rules in debugging mode?

Testing time based rules is obviously dependent on the time.
Is there any way to run one "now", such that the triggers/preconditions are considered to have been met?

I've used a debugging variable, but this moves the rule from a basic rule to a rule machine and complicates things (esp when I have to remove the reference to the debugging variable later on).

Edit: just found this in Rule Machine - is this possible in Basic Rule?

This is possible without Rule Machine by using "Run Rule Actions," as you may have figured out. It should be noted that triggers aren't really "met"; they are just events, and any event happening that matches any trigger event will cause the actions to run (assuming there isn't a required expression, which will prevent triggering when false). This could be what you mean, but I wanted to make sure that you aren't thinking of triggers as conditions where all need to be true in order for something to happen.

There is nothing like this in Basic Rule, unless you're able to somehow manually "simulate" (or actually create) whatever event starts the rule. In Basic Rule, this can only be one thing, so it's generally a lot simpler. You could also import through the Basic Rule in to Rules Machine if you'd rather have that. Otherwise, it's at least a lot easier to trust yourself without Basic Rule. :slight_smile:

1 Like

Hi bertabcd1234,

yep i know that the triggers are different from the preconditions/guards. I was just hoping that there'd be a way to just run the action without consideration of the trigger.

Clearly the Rule Machine is the way to do this, and that it's (sadly) not possible in the Basic Rule system.

thanks

This feature will be added to the next release for Basic Rule. It's an easy add:

4 Likes

Excellent! Thank you for this :slight_smile:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.