Hi,
I tried to extend the HelloWorld example with an ApplicationData Object.
1) Before launching the algorithm I call:
workingMemory.setApplicationData("contextstr","init");
2) In the DRL I specified the application-data:
<application-data
identifier="contextstr">java.lang.String</application-data>
3) In the consequence tag I changed the value of the String:
<java:consequence>
helloWorld( hello );
contextstr = "consequence-hello";
</java:consequence>
4) After the algorithm terminates, I read the ApplicationData object again:
System.out.println("ctx: " +
(String)workingMemory.getApplicationData("contextstr")) ;
Unfortunately, it returns:
ctx: init
so the value remains unchanged.
What did I do wrong?
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/