<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">James -<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Your iterator is on the "added" collection.  An subscription will invoke the execute method of your plugin when the objects that match your predicate are added, changed, or removed.  If you'd like to process changed objects as well as added objects then you should have another snippet of code like:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BLOCKQUOTE type="cite"><SPAN style=""><FONT class="Apple-style-span" face="Arial" size="4"><SPAN class="Apple-style-span" style="font-size: 13.3333px;">for (Iterator i = HypothesisSub.getChangedCollection().iterator(); i.hasNext();) {</SPAN></FONT></SPAN></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>Matt<BR><DIV><BR><DIV><DIV>On Jan 15, 2007, at 1:21 PM, James Livingood wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> <DIV class="Section1"><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">Hello all,<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">I am new to Cougaar development and am having trouble with a plugin I created. My plugin simply monitors objects on the blackboard and puts them into a Microsoft SQL database.<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">I’ve subscribed to the object I want:<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">HypothesisSub = (IncrementalSubscription) getBlackboardService().subscribe(HYPOTHESIS_PRED);<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">And in my execute() I have:<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">for (Iterator i = HypothesisSub.getAddedCollection().iterator(); i.hasNext();) {<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">which grabs all the information and puts it into MS SQL. <O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">I get information in my MS SQL when I first subscribe, but not when objects on the blackboard change. Doesn’t execute() run every time an object (that I have a subscription to) change? If not, what do I have to do?<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">Thanks for any information!<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">James<O:P></O:P></SPAN></FONT></P> </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Cougaar-developers mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Cougaar-developers@cougaar.org">Cougaar-developers@cougaar.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://cougaar.org/mailman/listinfo/cougaar-developers">http://cougaar.org/mailman/listinfo/cougaar-developers</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>