[rules-users] Access the return value in Guvnor

Smurfs smurfs.doll at gmail.com
Fri Sep 6 06:10:33 EDT 2013


Hi

I am working on the guvnor in jboss.
I have created a rule that use two objects Item and Tracker. It checks if
the quantity in the ItemOrcer is greater than 20, then it sets the status in
the Message object.

KnowledgeBuilder kbuilder1 = KnowledgeBuilderFactory.newKnowledgeBuilder();
		kbuilder1.add(ResourceFactory.newClassPathResource("testAdd.drl"),
ResourceType.DRL);
		KnowledgeBase kbase1 = kbuilder1.newKnowledgeBase();
		StatefulKnowledgeSession  ksession1 =
kbase1.newStatefulKnowledgeSession();
		
		Item obj = new Item();
                obj.setQuantity(25);
		ksession1.insert(obj);
		ksession1.fireAllRules();

I am not sure how to access the MEssage object. Can you please help me on
that




--
View this message in context: http://drools.46999.n3.nabble.com/Access-the-return-value-in-Guvnor-tp4025842.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list