Why do you insert "application" and "p" in different sessions?
After your suggestion here is my code,
RuleAgent agent = RuleAgent.newRuleAgent("/Guvnor.properties");FactType appType = rb.getFactType("personDetailss.Personn");
RuleBase rb = agent.getRuleBase();
Object application = appType.newInstance();PersonDetails p=new PersonDetails();
appType.set(application, "age", 40);
rb.newStatelessSession().execute(new Object[] {application});
WorkingMemory wm=rb.newStatefulSession();
wm.insert(p);
wm.fireAllRules();
System.out.println(application);
MY BRL is rule "myrule1"
2. | dialect "mvel"
3. | when
4. | PersonDetails( a : age > 0 )7. | System.out.println("Welcome to drools);
5. | Personn( age == a )
6. | then
10. | end
Even both are 40,Im unable to get output.Please help me
--
View this message in context: http://drools.46999.n3.nabble.com/Calling-POJO-class-get-Method-in-BRL-tp3662420p3663129.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users