[rules-users] [5.4.0] Combining custom operators with OR results in compile error

Stathis Rouvas stathis.rouvas at eurodyn.com
Wed May 23 07:28:22 EDT 2012


Related JIRA created.

https://issues.jboss.org/browse/JBRULES-3517

-Stathis

----- Original Message -----
From: rouvas at mm.di.uoa.gr
To: rules-users at lists.jboss.org
Sent: Monday, May 21, 2012 9:42:31 AM
Subject: Re: [rules-users] [5.4.0] Combining custom operators with OR results in compile error

Thank you for your reply.

I'll try to create a JIRA and let you know about it.

-Stathis

Mark Proctor wrote:
> Sounds like a bug, please read "getting involved" and submit a uni test
> and jira:
> http://docs.jboss.org/drools/release/5.4.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html
>
> Mark
> On 18/05/2012 16:03, Stathis Rouvas wrote:
>> Hello List,
>>
>> I recently migrated from Drools.5.0.1 to Drools.5.4.0 and I am having
>> issues when combining constraints with OR when custom operators are
>> involved.
>>
>> For example, the following rule:
>>
>> rule "r548695.1"
>>    no-loop  true
>>    dialect "mvel"
>> when
>>    gnId : GN()
>>    la : t547147(   )
>>    v1717 : Tra48( gnId.gNo==gNo , name F_str[startsWith] la.c547148 ||
>> postCode F_str[contains] la.c547149 )
>> then
>>    System.out.println("Rule r548695.1 fired");
>> end
>>
>> results in the following exception:
>>
>> Unable to Analyse Expression gnId.gNo == gNo&&  ( F_str0.evaluate( name,
>> la.c547148 ) || F_str1.evaluate( postCode, la.c547149 ) ):
>> [Error: unable to resolve method using strict-mode:
>> my.package.rulez.Tra48.F_str0()]
>> [Near : {... gNo == gNo&&  ( F_str0.evaluate( name, la.c54 ....}]
>>                               ^ : [Rule name='r548695.1']
>>
>> Please note, that the same rule using AND (&&) between the custom
>> operators compiles OK.
>>
>> The above rule had not problem whatsoever in Drools.5.0.1.
>>
>> Any ideas to overcome this issue, are most welcomed.
>>
>> -Stathis
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


More information about the rules-users mailing list