<div>The log file also shows that the BenefitsProgramEvent was inserted properly. So why wouldn't it appear in the working memory? Do I need to do something special or is somehow inserted in another working memory?</div>
<div> </div>
<div>Thanks for any suggestions,<br>Michael</div>
<div> </div>
<div><object-stream><br> <list><br> <org.drools.audit.event.ActivationLogEvent><br> <activationId>RecognizeBenefitsProgramEvent [1]</activationId><br> <rule>RecognizeBenefitsProgramEvent</rule>
<br> <declarations>$edit=com.workscape.oba.model.editor.benefits.BenefitsProgramModelEdit@12d91d5(1)</declarations><br> <type>6</type><br> </org.drools.audit.event.ActivationLogEvent>
<br> <org.drools.audit.event.ObjectLogEvent><br> <factId>84</factId><br> <objectToString>com.workscape.oba.model.events.BenefitsProgramEvent@9b6713[]</objectToString><br> <type>1</type>
<br> </org.drools.audit.event.ObjectLogEvent><br> <org.drools.audit.event.ActivationLogEvent><br> <activationId>RecognizeBenefitsProgramEvent [1]</activationId><br> <rule>RecognizeBenefitsProgramEvent</rule>
<br> <declarations>$edit=com.workscape.oba.model.editor.benefits.BenefitsProgramModelEdit@12d91d5(1)</declarations><br> <type>7</type><br> </org.drools.audit.event.ActivationLogEvent>
<br> </list><br></object-stream></div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 8/15/07, <b class="gmail_sendername">Michael Waluk</b> <<a href="mailto:mwaluk@gmail.com">mwaluk@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>I just upgraded to Drools 4.0 and changed my assertObject calls to insert. I also switched from WorkingMemory to StatefulSession. The rules seem to be fine, but I am not able to retrieve any inserted objects from the working memory for some reason. Here is what I'm doing. I'd appreciate any suggestions...
</div>
<div><font size="2">
<p align="left">StatefulSession <strong>workingMemory</strong> = getActiveWorkingMemories(id);<br><strong>workingMemory</strong>.fireAllRules();</p>
<p>// Here is the rule that fires:</p><b><font color="#960000" size="2">
<p align="left">rule</p></font></b></font><font size="2"></font><font color="#008000" size="2">"RecognizeBenefitsProgramEvent"</font><font size="2"> <strong><br></strong></font><b><font color="#960000" size="2">
when</font></b><font size="2"> $edit: BenefitsProgramModelEdit() <br></font><b><font color="#960000" size="2"> then</font></b><font size="2"> <br></font><b><font color="#960000" size="2"> insert</font></b><font size="2">
(</font><b><font color="#960000" size="2">new</font></b><font size="2"> <strong>BenefitsProgramEvent</strong>(</font><font color="#008000" size="2">"BenefitsProgramEvent"</font><font size="2">, $edit.getValidFrom(),
</font><font color="#008000" size="2">"AnnualEnrollmentEvent"</font><font size="2">)); <strong><br></strong><strong> System</strong>.out.println(</font><font color="#008000" size="2">"Rule RecognizeBenefitsProgramEvent fired "
</font><font size="2">); <strong><br></strong></font><b><font color="#960000" size="2">end</font></b><br><br>I see the print statement in the console but the inserted object is not actually in the working memory. I look using this:
<br><br>Iterator events = <strong>workingMemory</strong>.iterateObjects(new ClassObjectFilter(BenefitsProgramEvent.class));
<p align="left">This iterator is empty. I also debug and look at the assetMap inside workingMemory and it never changes.</p>
<p align="left">Thanks,</p>
<p align="left">Michael</p></div></blockquote></div><br>