<!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">
What version of drools you using? I think I remember some issue with
calling functions directly from a "from" - not sure if it was fixed for
4.0.7 or if is in the upcomfing 4.0.8.<br>
<br>
Mark<br>
Samuel Doyle wrote:
<blockquote cite="mid:583050.31201.qm@web82304.mail.mud.yahoo.com"
 type="cite">
  <style type="text/css"><!-- DIV {margin:0px;} --></style>
  <div
 style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
  <div>Yes here is the full thing.<br>
  <br>
function List doEventCodesExist( Submission submission, EntityManager
entityManager )<br>
{<br>
&nbsp;&nbsp; return SubmissionReviewRulesActionHelper.checkIfEventCodesExist(
submission, entityManager );<br>
}<br>
  <br>
rule "SECOND Event Codes must not exist - EPC"<br>
// 4(2)<br>
&nbsp;&nbsp;&nbsp; when<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $event: Event( );<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $submission: Submission( );<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $entityManager : EntityManager( );<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $changedEventCodes : List( ) from doEventCodesExist(
$submission, $entityManager );<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; eval( $changedEventCodes.size() &gt; 0 );<br>
&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $event.addReviewIssue( new ReviewIssue( $event, $submission,
SubmissionReviewConstants.SUBMISSION,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; ReviewCriticality.CRITICAL, SectionFiltersEnum.SUBMISSION,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; $changedEventCodes + "
submissionReview.submission.eventCodesAlreadyExist" ) );<br>
end<br>
  </div>
  <div
 style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>
  <div
 style="font-family: times new roman,new york,times,serif; font-size: 12pt;">-----
Original Message ----<br>
From: Mark Proctor <a class="moz-txt-link-rfc2396E" href="mailto:mproctor@codehaus.org">&lt;mproctor@codehaus.org&gt;</a><br>
To: Rules Users List <a class="moz-txt-link-rfc2396E" href="mailto:rules-users@lists.jboss.org">&lt;rules-users@lists.jboss.org&gt;</a><br>
Sent: Friday, August 15, 2008 1:29:16 PM<br>
Subject: Re: [rules-users] How do I assign a local variable from a
function call?<br>
  <br>
Did you try adding types to your functions like the documentation says?<br>
  <br>
samd wrote:
  <blockquote type="cite">
    <pre>Nobody knows?


samd wrote:
  </pre>
    <blockquote type="cite">
      <pre>All I want to do is something simple like the following:

$changedList: java.util.List( ) from getChangedList( $x, $y );

Then in the same .drl file a function something like:

function List getChangedList( $x, $y )
{
    return JavaClass.staticDoSomethingToGetListMethod( $x, $y);
}

I have tried doing this and I get:

Unable to build expression for 'from' node 'getChangedList( $x, $y)'

It looks like there is supposed to be something in between the from and
the function? I have been looking for examples for something like this and
have not found any.

Thanks

    </pre>
    </blockquote>
    <pre>  </pre>
  </blockquote>
  <br>
  </div>
  </div>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
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>
</body>
</html>