Hi Alan,<br>Share with us the simple project, I can take a look on it and get back with some suggestions.<br><br><br><div class="gmail_quote">2010/4/15  <span dir="ltr">&lt;<a href="mailto:Alan.Gairey@tessella.com">Alan.Gairey@tessella.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><font face="sans-serif" size="2">I have a simple rule flow of the form:
Start -&gt; Work Item -&gt; Wait State -&gt; Action -&gt; End.</font>
<br>
<br><font face="sans-serif" size="2">The handler for the work item launches
a separate thread, and then completes. This thread inserts a number of
facts into the (stateful) session&#39;s working memory; each fact (&#39;SimpleFact&#39;)
has a boolean property (&#39;complete&#39;) that is initially set false. Later
on in the thread, the facts in memory are updated by setting their &#39;complete&#39;
properties to true.</font>
<br>
<br><font face="sans-serif" size="2">I want the Wait State to hold execution
of the rule flow until ALL the facts in memory have the &#39;complete&#39; property
set to true. My first attempt at setting the constraint was as follows:</font>
<br>
<br><font face="sans-serif" size="2">forall(SimpleFact(complete == true))</font>
<br>
<br><font face="sans-serif" size="2">With this constraint, the Action node
executes straight after the completion of the Work Item. My next attempt
for the constraint was:</font>
<br>
<br><font face="sans-serif" size="2">exists(SimpleFact()) and forall(SimpleFact(complete
== true))</font>
<br>
<br><font face="sans-serif" size="2">With this constraint, the Action node
executes as soon as the first instance of SimpleFact is inserted into the
working memory.</font>
<br>
<br><font face="sans-serif" size="2">So my question is: how do I specify
the Wait State node constraint so that the rule flow only resumes once
all the SimpleFact instances in working memory have their &#39;complete&#39; property
set to true?</font>
<br>
<br><font face="sans-serif" size="2">(I have a simple project to demonstrate
the problem if required.)<br>
</font>
<br><font face="sans-serif" size="2">Many thanks,</font>
<br>
<br><font face="sans-serif" size="2">Alan</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino &quot;Salaboy&quot; Mauricio -<br>