Assuming TYPE_1 is the opposite of TYPE_2 and not just a difference it
should work.
What is "opposite" is perhaps difficult to define as there is probably some
semantics involved: up\down, left\right, yes\no.
These have well defined meanings and hence we can say with some certainty
that these are opposites or one and other.
On 25 May 2012 14:07, Ben Cuthbert <bencuthbert(a)ymail.com> wrote:
All
If I have an object say
class TestObject {
private String type;
private String name;
}
And I want to match opposite types so I fire in the following
insert(new TestObject("TYPE_1", "This is our type 1 object");
insert(new TestObject("TYPE_2", "This is our type 1 object");
So I want to say only match again opposite types
would this work?
rule "#999 Match"
dialect "mvel"
when
$incoming : TestObject($type: type)
$current : TestObject( type != $type)
then
insert(new String("LOGGING: incoming:" + $incoming.getType() + "
current:" + $current.getType() ));
end
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users