I am using drools for business level validations. Is it possible to load two objects in working memory and compare their values? Lets say i have 2 objects:
Object1{
String name;
}
Object2{
String sname;
}
Can I compare name(Object1) with sname(Object2) in the drl file?
Object1(name)==Object(name)
I tried to add this line in the drl file but it gives an error "Unexpected token name"
Also Help me to insert these objects in working memory. I am getting the kie session using below steps
KieContainer container=KieServices.Factory.get().getKieClasspathContainer();
KieSession kieSession = container.newKieSession("SampleSession");
Now can Insert object1 and Object2 using insert method simultaneously ?
kieSession.insert(object);
How to insert objects:
How to compare their attributes:
These are elementary questions. Makes sure to read the Drools documentation.