[rules-users] drools error: Unable to create restriction

Wolfgang Laun wolfgang.laun at gmail.com
Tue Aug 16 13:18:17 EDT 2011


This may depend on the Drools version you are using. But
   actualTestVal   >  ( innerBean.getTestVal() )
ought to work on 5.1.1 and 5.2.0.

-W


On 16 August 2011 17:52, sam <parishi at gmail.com> wrote:

> I am getting the following error when running a drl script:
> Unable to create restriction '[QualifiedIndentifierRestr:
>
> Anyone can throw more light on what the issue is?
>
> Here is my complete test set up:
>
> public class InnerBean {
>        private int testVal = 100;
>        public int getTestVal() {
>                return testVal;
>        }
>        public void setTestVal(int testVal) {
>                this.testVal = testVal;
>        }
> }
>
> public class ValidationBean {
>        private int actualTestVal = 200;
>        private InnerBean innerBean= new InnerBean ();
>        public int getActualTestVal() {
>                return actualTestVal;
>        }
>        public void setActualTestVal(int actualTestVal) {
>                this.actualTestVal = actualTestVal;
>        }
>
>         public InnerBean getInnerBeanl() {
>               return innerBean;
>         }
>         public void setInnerBeanl(InnerBean argInnerBean) {
>               innerBean = argInnerBean;
>         }
> }
>
> The drl script is
>
> package droolsbook.dsl;
> import com.wellsfargo.mortgage.camr.model.hibernate.*;
> import com.wellsfargo.mortgage.camr.model.service.drools.*;
> rule "Threshold rule 1"
>    when
>       $bean: ValidationBean ( actualTestVal   > innerBean.testVal )
>    then
>       --failure
> end
>
> The ValidationBean ($bean) is inserted into drools working memory.
>
> Thanks in advance
> Sam
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/drools-error-Unable-to-create-restriction-tp3259055p3259055.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110816/fb7a19cc/attachment.html 


More information about the rules-users mailing list