Re: [rules-users] How do I assign a local variable from a function call?

2008-08-15 Thread Samuel Doyle
4.0.7 This works if I do $changedEventCodes : List( ) from SubmissionReviewRulesActionHelper.checkIfEventCodesExist( submission, entityManager ); However, there might be something added to the function after the call for example in terms of a message passed to the end user. I don't want to have

Re: [rules-users] How do I assign a local variable from a function call?

2008-08-15 Thread Mark Proctor
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. Mark Samuel Doyle wrote: Yes here is the full thing. function List doEventCodesExist( Submission submission, Enti

Re: [rules-users] How do I assign a local variable from a function call?

2008-08-15 Thread Samuel Doyle
Yes here is the full thing. function List doEventCodesExist( Submission submission, EntityManager entityManager ) { return SubmissionReviewRulesActionHelper.checkIfEventCodesExist( submission, entityManager ); } rule "SECOND Event Codes must not exist - EPC" // 4(2) when $event:

Re: [rules-users] How do I assign a local variable from a function call?

2008-08-15 Thread Mark Proctor
Did you try adding types to your functions like the documentation says? samd wrote: Nobody knows? samd wrote: 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: fun

Re: [rules-users] How do I assign a local variable from a function call?

2008-08-15 Thread samd
Oops, looks like this doesn't work in the 'when' portion. Scott Burrows wrote: > > We do this > rule "Transaction" > salience 9000 > no-loop true > when > then >CardTranResponse respObj = new CardTranResponse(); > >respObj = handleTransaction($c

Re: [rules-users] How do I assign a local variable from a function call?

2008-08-15 Thread samd
Looks like this doesn't work in the 'when' portion. Scott Burrows wrote: > > We do this > rule "Transaction" > salience 9000 > no-loop true > when > then >CardTranResponse respObj = new CardTranResponse(); > >respObj = handleTransaction($currcode

Re: [rules-users] How do I assign a local variable from a function call?

2008-08-15 Thread Scott Burrows
We do this rule "Transaction" salience 9000 no-loop true when then CardTranResponse respObj = new CardTranResponse(); respObj = handleTransaction($currcode, c1, t1, $limit_amount_fees, $tot_feedeny,

Re: [rules-users] How do I assign a local variable from a function call?

2008-08-15 Thread samd
Nobody knows? samd wrote: > > 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.staticDoSo

RE: [rules-users] Can drools comtinue testing even if one of theconditions fail ?

2008-08-15 Thread Anstis, Michael (M.)
Please don't cross post: http://www.jboss.org/drools/lists.html IMO, Drools can do what you want but you need to change the way you are thinking about the problem. The behaviour you consider undesirable is by design as all patterns (i.e. conditions) need to be matched for the consequence to acti

[rules-users] Can drools comtinue testing even if one of the conditions fail ?

2008-08-15 Thread DroolUser
Hi, I'm using drools for testing if the few attributes of my MO are not null. I construct the rule in the .drl file in following way : rule "name" when condition1 condition2 condition3 condition4 then consequence end I have observed that the d