0

By walking through a tree structure I have to check at each tree-level whether some nodes at that level fulfill certain criterials and then do some related action. Without easyrules, this can be implemented in a recursive call where nodes at each level during an iteration can be checked by if-else. How can this kind of behavior be implemented by using rule?

PengL
  • 1
  • 1

1 Answers1

0

You can try to use an InferenceRulesEngine for that. You need to add facts for each level and register the required rules to trigger actions when a given level meets the criteria.

The inference engine will continuously select candidate rules and apply them until no more rules are applicable. So you need to make sure there is a certain fact that acts as a stop condition in your rules.

Mahmoud Ben Hassine
  • 28,519
  • 3
  • 32
  • 50