Skip to content

Can I execute a rule after checking a condition? #19

@trinobster

Description

@trinobster

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions