<!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">
Mark Proctor wrote:
<blockquote cite="mid:49C023E3.6010102@codehaus.org" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Femke De Backere wrote:
  <blockquote cite="mid:6B9B90AF-9C8B-4B40-8821-29640856584A@gmail.com"
 type="cite">Another question ;),&nbsp;
    <div><br>
    </div>
    <div>Can I perform a cast in MVEL? eg.&nbsp;<span
 class="Apple-style-span"
 style="font-family: 'Lucida Grande'; font-size: 11px;">Patient((ShortSedation)
sedation.sedation24 == <span style="color: rgb(150, 0, 0);"><b>false</b></span>)</span></div>
  </blockquote>
the LHS "when" is not MVEL, it's DRL Pattern language, it's just that
some things we translate to MVEL for execution. Our pattner language
does not support casting, no. However MVEL itself does support casting,
and you can do that on a RHS "then" which is full MVEL.<br>
</blockquote>
Sorry that's not quite true, if you use an EVAL thats pure MVEL a cast
should work inside of that, as evals are like black boxes to the rule
engine and they are executed directly by java or mvel depending on the
dialect you chose.<br>
<br>
Mark<br>
<blockquote cite="mid:49C023E3.6010102@codehaus.org" type="cite"><br>
Mark<br>
  <blockquote cite="mid:6B9B90AF-9C8B-4B40-8821-29640856584A@gmail.com"
 type="cite">
    <div><font class="Apple-style-span" face="'Lucida Grande'" size="3"><span
 class="Apple-style-span" style="font-size: 11px;"><br>
    </span></font></div>
    <div><font class="Apple-style-span" face="'Lucida Grande'" size="3"><span
 class="Apple-style-span" style="font-size: 11px;">Thx</span></font></div>
    <div><font class="Apple-style-span" face="'Lucida Grande'" size="3"><span
 class="Apple-style-span" style="font-size: 11px;"><br>
    </span></font>
    <div>
    <div>Op 17-mrt-09, om 19:27 heeft Edson Tirelli het volgende
geschreven:</div>
    <br class="Apple-interchange-newline">
    <blockquote type="cite"><br>
&nbsp;&nbsp; Although Drools makes extensive usage of MVEL, it is always embedded
in the DRL language. So, it is Drools that defines that a field
constraint is always a field accessor in the left with one or more
restrictions in the right.<br>
      <br>
&nbsp;&nbsp; We need to find a way to make the Drools x MVEL relationship more
clear because it is not the first time this slight confusion is made.&nbsp; <br>
      <br>
&nbsp;&nbsp; Anyway, docs are being updated, but take a look at the Pattern
documentation (item 7.8.2.1):<br>
      <br>
      <a moz-do-not-send="true"
 href="https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html/ch07.html#RuleLanguage-ConditionalElements">https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html/ch07.html#RuleLanguage-ConditionalElements</a><br>
      <br>
&nbsp;&nbsp; []s<br>
&nbsp;&nbsp; Edson<br>
      <br>
      <br>
      <br>
      <div class="gmail_quote">2009/3/17 Femke De Backere <span
 dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:femmyke@gmail.com">femmyke@gmail.com</a>&gt;</span><br>
      <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thx!<br>
        <br>
Do you know where I could find a tutorial of MVEL in Drools, because I
looked at some MVEL tutorials yesterday and I didn't find the
solution...<br>
        <br>
        <div class="gmail_quote">2009/3/17 Edson Tirelli <span
 dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:tirelli@post.com"
 target="_blank">tirelli@post.com</a>&gt;</span>
        <div class="im"> <br>
        <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
&nbsp;&nbsp; Left side of a constraint should always be a field name... no
expression allowed. Either move the expression to the right side or use
eval.<br>
          <br>
Patient( sedation.ultiva &gt; ( 0.1 - 0.02 ) )<br>
          <br>
&nbsp;&nbsp; Or even better:<br>
          <br>
Patient(sedation.ultiva &gt; 0.08)<br>
          <br>
&nbsp;&nbsp; []s<br>
&nbsp;&nbsp; Edson<br>
          <br>
          <div class="gmail_quote">2009/3/16 Femke De Backere <span
 dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:femmyke@gmail.com"
 target="_blank">femmyke@gmail.com</a>&gt;</span><br>
          <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
            <div>
            <div>
            <div>
            <div style="margin: 0px;">Hi,</div>
            <div style="margin: 0px;"><br>
            </div>
            <div style="margin: 0px;">The following expression keeps
returning the error&nbsp;<span
 style="color: rgb(255, 0, 0); font-family: Monaco; font-size: 11px;">[112,32]:
[ERR 103] Line 112:32 no viable alternative at input '+' in rule
"RuleFlow-Split-masterproef.ruleflows.shortsedation-18-22" in pattern
Patient</span>:</div>
            <div style="margin: 0px;">Patient(sedation.ultiva+0.02 &gt;
0.1)</div>
            <div style="margin: 0px;">with sedation.ultiva returning a
double</div>
            <div style="margin: 0px;">What am I doing wrong?</div>
            <div style="margin: 0px;"> Thx,</div>
            <div style="margin: 0px;">Femke</div>
            </div>
            <br>
            </div>
            </div>
_______________________________________________<br>
rules-users mailing list<br>
            <a moz-do-not-send="true"
 href="mailto: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>
            <br>
          </blockquote>
          </div>
          <font color="#888888"><br>
          <br clear="all">
          <br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a moz-do-not-send="true"
 href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
          </font><br>
_______________________________________________<br>
rules-users mailing list<br>
          <a moz-do-not-send="true"
 href="mailto: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>
          <br>
        </blockquote>
        </div>
        </div>
        <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>
      <br clear="all">
      <br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a moz-do-not-send="true"
 href="http://www.jboss.com">www.jboss.com</a><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" class="moz-txt-link-freetext"
 href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
    </blockquote>
    </div>
    <br>
    </div>
    <pre wrap=""><hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" 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>
</blockquote>
<br>
</body>
</html>