Why do you insert "application" and "p" in different sessions?

On 16 January 2012 13:08, srinivasasanda <srinivasasanda@gmail.com> wrote:
After your suggestion here is my code,
               RuleAgent agent = RuleAgent.newRuleAgent("/Guvnor.properties");
               RuleBase rb = agent.getRuleBase();

               FactType appType = rb.getFactType("personDetailss.Personn");
       Object application = appType.newInstance();
       appType.set(application, "age", 40);
               rb.newStatelessSession().execute(new Object[] {application});
WorkingMemory wm=rb.newStatefulSession();
PersonDetails p=new PersonDetails();
wm.insert(p);
wm.fireAllRules();
               System.out.println(application);

MY BRL is rule "myrule1"
2.      |           dialect "mvel"
3.      |           when
4.      |             PersonDetails( a : age > 0 )
5.      |               Personn( age == a )
6.      |           then
7.      |              System.out.println("Welcome to drools);
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