views:

86

answers:

1

I have a nodeset that contains various number of nodes with unique values. I want the rule to fire if the nodeset contains nodes with some of the possible values.

Example: Instance containing a nodeset with one node with Y=1 AND another node with Y=2 should fire rule.

Instance that should fire:
- X
- - Y - 1
- - Y - 2
- - Y - 3
- - Y - 4

Instance that should NOT fire:
- X
- - Y - 1
- - Y - 3
- - Y - 4

I tried with AND, OR and others, but the "problem" is that since the engine does pattern-matching it tests every node for the condition and it will either always fire, or never.

It's not that complex problem. How hard can it be :) When I found "Set of values" I thought I was home safe, but that was more of "enums".Grateful for any suggestion.

Regards Martin Bring

A: 

Try something along the lines you'll find here It creates an exclusive-OR (When this or that but not this and that) functionality. Not saying it'll fix it for you, but it may help put you on the right track.

AllenG
Thanks for suggesting. The post is giving a solution for mappings, with a functoid, I am using Business Rules Engine.I think I have to create a custom fact that evaluate some kind of "WHERE IN".Thanks anyway.
Martin Bring