[rules-users] Calling POJO class get Method in BRL

srinivasasanda srinivasasanda at gmail.com
Mon Jan 16 08:08:55 EST 2012


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.



More information about the rules-users mailing list