[rules-users] How to use Drools's global object in a *.java file?

FrankVhh frank.vanhoenshoven at agserv.eu
Tue Jan 15 04:20:20 EST 2013


java.lang.Double result = new java.lang.Double(0);
ksession.setGlobal("result", result);

?


penny wrote
> test.java file:
> 
> KnowledgeBase kbase = readKnowledgeBase();
> StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
> ksession.setGlobal("result", new java.lang.Double(0));
> 
> 
> I have used the global variable “result” in the rule file,how to use it in
> the test.java file?
> I need a judgement like “if(result>0)”.





--
View this message in context: http://drools.46999.n3.nabble.com/How-to-use-Drools-s-global-object-in-a-java-file-tp4021532p4021535.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list