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.
AllIf I have an object sayclass TestObject {private String type;private String name;}And I want to match opposite types so I fire in the followinginsert(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 typeswould this work?rule "#999 Match"dialect "mvel"when$incoming : TestObject($type: type)$current : TestObject( type != $type)theninsert(new String("LOGGING: incoming:" + $incoming.getType() + " current:" + $current.getType() ));end
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users