title: Drools: How to compare attributes of two different objects in drools?
body: <p>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:</p>
  
  <pre><code>Object1{
  String name;
  }
  
  Object2{
  String sname;
  }
  </code></pre>
  
  <p>Can I compare name(Object1) with sname(Object2) in the drl file?</p>
  
  <pre><code>Object1(name)==Object(name)
  </code></pre>
  
  <p>I tried to add this line in the drl file but it gives an error "Unexpected token name"</p>
  
  <p>Also Help me to insert these objects in working memory. I am getting the kie session using below steps</p>
  
  <pre><code>KieContainer container=KieServices.Factory.get().getKieClasspathContainer();
  
  KieSession kieSession = container.newKieSession("SampleSession");
  </code></pre>
  
  <p>Now can Insert object1 and Object2 using insert method simultaneously ? </p>
  
  <pre><code>kieSession.insert(object);
  </code></pre>