[rules-users] Re: Function Call in LHS
Rafael Alcemar
rafael.alcemar at gmail.com
Fri Aug 17 10:05:32 EDT 2007
I'm receiving the message bellow:
org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule
name=Cliente pode alugar, agendaGroup=MAIN, salience=0, no-loop=false]
vcAluga/Rule_Cliente_pode_alugar_0.java (10:319) : teste cannot be
resolved
at org.drools.rule.Package.checkValidity(Package.java:408)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java
:288)
at
rules.AluguelImediatoAspect.ajc$around$rules_AluguelImediatoAspect$1$55327fd6
(AluguelImediatoAspect.aj:31)
at controller.CtrlLocaoImediata.doRental(CtrlLocaoImediata.java:127)
at controller.CtrlLocaoImediata.EventHandler(CtrlLocaoImediata.java:284)
at controller.CtrlLocaoImediata.actionPerformed(CtrlLocaoImediata.java
:299)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
...
Any idea?
Thanks!
Rafael Alcemar
On 8/17/07, Rafael Alcemar <rafael.alcemar at gmail.com> wrote:
>
> Hello guys! This is my first question for the list. I've defined a
> function in my DRL file to evaluate if a user can do a specific operation in
> my system. This function returns a boolean result. My question is if I can
> use this function in the test of LHS.
>
> For example:
>
> rule "Cliente pode alugar"
> when
> eval(teste)
> then
> System.out.println("XXXXXX");
> end
>
>
> function boolean teste( ) {
> return true;
> }
>
>
> Please, if anybody has some help, send me.
>
> Thanks!
> Rafael Alcemar
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070817/10d259e0/attachment.html
More information about the rules-users
mailing list