You could define a new operator (similar to "contains" or "memberOf")
that
tests whether a field - a set of values - is a subset of a another set of
values.
See my home page for a full recipe:
http://members.inode.at/w.laun/
The code given there is for both sides being java.util.Collection. Handling
of
arrays could be added. But you should also consider providing the sets for
the rules as static auxiliary facts.
-W
On 29 September 2010 20:47, kpandey <kumar.pandey(a)gmail.com> wrote:
This works great for the case where all entries in fact matches all entries
in rule.
I have a case where a subset of facts can exist in the set of rule.
How would I construct the rule in this case without using the exits and
from
as I did initially?
so MyContext.classes has subset "TStr1", "TStr2", "TStr3"
and rule has set
"TStr1", "TStr2", "TStr3",
"TStr4","TStr5",
The rule should pass in this case as classes values are subset of rules.
Thanks
Kumar
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Matching-strings-in-t...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users