Sorry, but I become more confused with every re-read. I think the original code is required.<br><br>I think that this is nothing but a FSM. Generally, this sort of problem should be doable without resorting to salience (except for one or two low priority ones acting as the &quot;safety net&quot;).<br>
<br>-W<br><br><br><br><div class="gmail_quote">On 7 July 2011 16:35, jmolly <span dir="ltr">&lt;<a href="mailto:jmolly@gmail.com">jmolly@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello.<br>
I&#39;m facing some problems in drools with salience. (maybe I don&#39;t understand<br>
how it works)<br>
<br>
We have a rule that check if an import has been satisfied by the client. But<br>
we have a lot of pay methods so, when the import has been satisfied, we have<br>
to stop all the payment devices. If a payment device is in use, we can&#39;t<br>
stop it, so we send stop commands until device can stop.<br>
The problem is that if a device is making a pay process, and consumes an<br>
event, that event is never fired.<br>
<br>
Maybe I can explain better with code:<br>
<br>
<br>
rule &quot;Pay device stop&quot;<br>
Salience 10<br>
Try to stop the device and sends an OPERATION_IN event if can&#39;t stop<br>
(because there is a ticket inside)<br>
<br>
Machine rule<br>
rule &quot;Operation in received witch devices not stopped&quot;<br>
salience 10<br>
   Sent stop events to all devices<br>
<br>
Machine rule<br>
rule &quot;Operation in received with devices stopped&quot;<br>
salience 10<br>
    All ok. Finish operation<br>
<br>
<br>
rule &quot;Ticket data read&quot;<br>
salience 1000<br>
  updates the debt for the user and sends an OPERATION_IN<br>
<br>
The pay hardware, when is reading a ticket, sent a TICKET_DATA_READ<br>
this rule has salience 100 and should be fired inmediatly but Drools is<br>
entering all time in a bucle from Operation in received and Pay stop device.<br>
<br>
<br>
Can someone give a clue about what are we doing wrong?<br>
<br>
<br>
Sorry for the english. I can post the original code if needed.<br>
Thanks in advance<br>
<font color="#888888"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Problem-with-salience-tp3148382p3148382.html" target="_blank">http://drools.46999.n3.nabble.com/Problem-with-salience-tp3148382p3148382.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>