Perhaps this is the answer: Just add a rule that retracts the "initial fact(s)". <div><br></div><div>Your description confuses me. At one point you use the plural, then the</div><div>singular. What does "initial" mean in your parlance? Session-initial or</div>
<div>client-request-initial? What is the lifetime of the stateful session? Longer</div><div>than the processing of a single event? </div><div><br></div><div>-W</div><div><br><div class="gmail_quote">On 13 January 2012 22:16, dunnlow <span dir="ltr"><<a href="mailto:dunnlow@yahoo.com">dunnlow@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi. I've got a stateful session running in drools-server. A separate client<br>
is inserting facts using a batchexecutioncommand and reading/using the<br>
result returned from the service call. I need a stateful session because<br>
when I insert the facts from the client, some of the rules that trigger<br>
insert new facts. However, once those main facts are inserted, and the<br>
relevant rules fire, the initial facts can be retracted.<br>
<br>
Can anyone tell me the best way to do this. Basically, I'd like to do<br>
something like an insertLogical (I suppose) to the server so that the fact<br>
is retracted once all the rules have fired.<br>
<br>
I realize I can get the facthandle from the result and then send another<br>
command to retract that fact handle. However, this means two calls to the<br>
server for every event; I'd like to make this happen in a single call.<br>
<br>
Does anyone have any ideas?<br>
<br>
Thanks,<br>
-J<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Insert-and-Retract-from-drools-server-in-one-call-tp3657736p3657736.html" target="_blank">http://drools.46999.n3.nabble.com/Insert-and-Retract-from-drools-server-in-one-call-tp3657736p3657736.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></span></blockquote></div><br></div>