<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
To notify modifications, use "update" operator. This action will
notify all rules using this object instance to re-evaluate. So the
second rule will trigger, but also the first one if you don't check
that MovieStar has its default value in your conditions. Without
this check, you will fall in infinite loop.<br>
<br>
You should read the documentation more carefully.<br>
Your question is on very basic concepts of a rule enine.<br>
<br>
<br>
<br>
Le 25/02/2011 17:54, Jon Gil a écrit :
<blockquote
cite="mid:AANLkTinvmM8xwMHivdyM_7OEKbiyJCZzExfyNZpggpjs@mail.gmail.com"
type="cite">Can you please provide the syntax or point me in the
direction of an example?<br>
<br>
<div class="gmail_quote">2011/2/25 Greg Barton <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>></span><br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204);
margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"
class="gmail_quote">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td valign="top">It's done in the rule action of the
first rule. If you don't inform the engine that the
object has updated the second rule can't know about
it.
<div class="im"><br>
<br>
--- On <b>Fri, 2/25/11, Jon Gil <i><<a
moz-do-not-send="true"
href="mailto:jonsprogrammingemail@gmail.com"
target="_blank">jonsprogrammingemail@gmail.com</a>></i></b>
wrote:<br>
</div>
<blockquote style="border-left: 2px solid rgb(16, 16,
255); padding-left: 5px; margin-left: 5px;">
<div class="im"><br>
From: Jon Gil <<a moz-do-not-send="true"
href="mailto:jonsprogrammingemail@gmail.com"
target="_blank">jonsprogrammingemail@gmail.com</a>><br>
</div>
Subject: Re: [rules-users] Object updated as rules
are running<br>
To: "Rules Users List" <<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org"
target="_blank">rules-users@lists.jboss.org</a>><br>
Date: Friday, February 25, 2011, 10:14 AM
<div>
<div class="h5"><br>
<br>
<div>How do we do that? Since we are using the
rules server, all we are doing is calling with
an HTTP call with the object and the rules
flow we want to call. We then receive back the
results as the HTTP response. <br>
<br>
<div>2011/2/25 Greg Barton <span dir="ltr"><<a
moz-do-not-send="true"
href="http://mc/compose?to=greg_barton@yahoo.com"
rel="nofollow" target="_blank">greg_barton@yahoo.com</a>></span><br>
<blockquote style="border-left: 1px solid
rgb(204, 204, 204); margin: 0px 0px 0px
0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td valign="top">Did you notify the
engine that your data has been
updated?
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e1436"
rel="nofollow" target="_blank">http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e1436</a></div>
<div><br>
</div>
<div>See section 3.3.3.1.3<br>
<br>
--- On <b>Fri, 2/25/11, Jon Gil
<i><<a
moz-do-not-send="true"
href="http://mc/compose?to=jonsprogrammingemail@gmail.com"
rel="nofollow"
target="_blank">jonsprogrammingemail@gmail.com</a>></i></b>
wrote:<br>
<blockquote style="border-left:
2px solid rgb(16, 16, 255);
padding-left: 5px;
margin-left: 5px;"><br>
From: Jon Gil <<a
moz-do-not-send="true"
href="http://mc/compose?to=jonsprogrammingemail@gmail.com"
rel="nofollow"
target="_blank">jonsprogrammingemail@gmail.com</a>><br>
Subject: [rules-users] Object
updated as rules are running<br>
To: <a moz-do-not-send="true"
href="http://mc/compose?to=rules-users@lists.jboss.org" rel="nofollow"
target="_blank">rules-users@lists.jboss.org</a><br>
Date: Friday, February 25,
2011, 9:16 AM
<div>
<div><br>
<br>
<div>
<div>Hi, I have a very
simple rules flow that
I am getting odd
results from. For
now, our project is
planning on
using spreadsheets and
a drools server.</div>
<div> </div>
<div>The test project we
are working on
accepts a movie
name from an external
source and creates a
Movie object that is
passed to the rules.
The first rule looks
at the movieName
attribute and assigns
it a movieStar using
the Movie objects
setMovieStar call. We
have printLn
statements before and
after this action to
confirm that it does
in fact work. </div>
<div> </div>
<div>The second rule,
where things go wrong,
checks the MovieStar
attribute, but no
matter what we've just
set it to, it always
uses the value
("NoStarYet") that was
originally created
when we create the
Movie object in our
Java code in the
condition of our
second rule. We've
tried using the
getMovieStar call in
the condition, but it
has been throwing
errors when we startup
the Drools Server.</div>
<div> </div>
<div>When we retreive
the Movie object from
the resultSet, the
movieStar attribute is
set correclty, but we
can't get our flow to
go as expected. </div>
<div> </div>
<div>This really seems
like a simple issue,
but we've had no luck
with it. Any
thoughts? Does the
rules engine use the
getter methods for
conditions or does it
use the values from
the entityXML we pass
in? Is there a way to
make the engine update
the object between
running each rule? </div>
<div> </div>
<div>Any help is
appreciated greatly.</div>
</div>
<br>
</div>
</div>
-----Inline Attachment
Follows-----
<div><br>
<br>
<div>_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="http://mc/compose?to=rules-users@lists.jboss.org" rel="nofollow"
target="_blank">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
rel="nofollow"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div>
</div>
</blockquote>
</div>
</td>
</tr>
</tbody>
</table>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="http://mc/compose?to=rules-users@lists.jboss.org"
rel="nofollow" target="_blank">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
rel="nofollow" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
-----Inline Attachment Follows-----<br>
<br>
<div>_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="http://mc/compose?to=rules-users@lists.jboss.org"
target="_blank">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div>
</div>
</div>
</blockquote>
</td>
</tr>
</tbody>
</table>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<!-- @author Hadrien HUGOT -->
<!-- Modèle signature thunderbird et autres -->
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>CARTE DE VISITE</title>
<span style="font-size: 13.5pt; font-family:
"Arial","sans-serif"; color: rgb(21, 24,
90);">Vincent LEGENDRE</span><br>
<i><span style="font-size: 8.5pt; font-family:
"Arial","sans-serif"; color: rgb(21, 24,
90);">Consultant Sénior</span></i><br>
<span style="font-size: 4.5pt;"> <br>
</span>
<span style="font-size: 9pt; font-family:
"Arial","sans-serif"; color: rgb(21, 24,
90);">EURODECISION<o:p></o:p></span><br>
<span style="font-size: 9pt; font-family:
"Arial","sans-serif"; color: rgb(21, 24,
90);">9A rue de la Porte de Buc 78000 VERSAILLES<br>
Tél. : +33 (0)1 39 07 12 40<br>
Direct : +33 (0)1 39 07 26 16<br>
<a href="www.eurodecision.com">www.eurodecision.com</a></span><br>
<a href="http://www.eurodecision.com/"><span style="font-size:
12pt; font-family: "Times New
Roman","serif"; color: windowtext;
text-decoration: none;"> <img
src="cid:part1.05000506.09000302@eurodecision.com"
alt="EURODECISION" border="no"></span></a><a
href="http://www.eurodecision.com/"><span style="font-size:
12pt; font-family: "Times New
Roman","serif"; color: windowtext;
text-decoration: none;"> </span></a>
</div>
</body>
</html>