nemonik/Intellect

Can I execute a rule after checking a condition?

Opened this issue · 2 comments

Hi,
I need to understand if I can somehow execute a rule inside the "then" part of another rule, for example:
Define rule_b and rule_a inside a policy, but execute rule_b only if rule_a conditions are met:

rule rule_b:
   then:
      print('rule_b fired!')

rule rule_a:
   when:
      exists $classB := ClassB(property1.startswith("apple"))
   then:
      execute rule_b

Please, can you suggest me if there is any way I can do this?
Thank you!

Okay thank you very much for your answer!