简体   繁体   中英

Help with Business Rule

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM