Skip to content

Is there any way to disable a rule? #312

Answered by newm4n
denver1111 asked this question in Q&A
Discussion options

You must be logged in to vote

You could create a rule with highest salience and immediately retract rules that you don't need.

rule RunMeFirst "Disable rules we donot want to be evaluated" salience 99999 {
    when
         true
    then
        retract("doNotRunRule1");
        retract("doNotRunRule2");
        retract("doNotRunRule3");
        retract("doNotRunRule4");
        retract("RunMeFirst");
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by denver1111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants