<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><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 &lt;mproctor@codehaus.org&gt;<br>To: Rules Users List &lt;rules-users@lists.jboss.org&gt;<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?<br><br><br>samd wrote:<br>  </pre>
  <blockquote type="cite">
    <pre>All I want to do is something simple like the following:<br><br>$changedList: java.util.List( ) from getChangedList( $x, $y );<br><br>Then in the same .drl file a function something like:<br><br>function List getChangedList( $x, $y )<br>{<br>    return JavaClass.staticDoSomethingToGetListMethod( $x, $y);<br>}<br><br>I have tried doing this and I get:<br><br>Unable to build expression for 'from' node 'getChangedList( $x, $y)'<br><br>It looks like there is supposed to be something in between the from and<br>the function? I have been looking for examples for something like this and<br>have not found any.<br><br>Thanks<br><br>    </pre>
  </blockquote>
  <pre>  </pre>
</blockquote>
<br>
</div></div></div></body></html>