0 Replies Latest reply on Nov 25, 2016 2:02 PM by bancrc3

    Process Compilation error The field x.y is not visible

    bancrc3

      I have 2 data objects as follows:

       

      OBJECT 1:

      package org.kie.example.project1;

      public class x implements java.io.Serializable

      {

         static final long serialVersionUID = 1L;

         private java.lang.String reqType;

         private org.kie.example.project1.y y;

         private java.lang.String reqStatus;

       

         public x()

         {

         }

         public java.lang.String getReqType()

         {

            return this.reqType;

         }

         public void setReqType(java.lang.String reqType)

         {

            this.reqType = reqType;

         }

         public org.kie.example.project1.y getY()

         {

            return this.y;

         }

         public void setY(org.kie.example.project1.y y)

         {

            this.y = y;

         }

        public java.lang.String getReqStatus()

         {

            return this.reqStatus;

         }

         public void setReqStatus(java.lang.String reqStatus)

         {

            this.reqStatus = reqStatus;

         }

        

        public x(java.lang.String reqType, org.kie.example.project1.y y,

               java.lang.String reqStatus)

         {

            this.reqType = reqType;

            this.y = y;

            this.reqStatus = reqStatus;

         }

      }

       

      OBJECT 2:

      package org.kie.example.project1;

      public class y implements java.io.Serializable

      {

         static final long serialVersionUID = 1L;

         private java.lang.String actype;

         public y()

         {

         }

         public java.lang.String getActype()

         {

            return this.actype;

         }

         public void setActype(java.lang.String actype)

         {

            this.actype = actype;

         }

         public y(java.lang.String actype)

         {

            this.actype = actype;

         }

      }

       

      I then have a Guided Decision Rule as follows:

       

      package org.kie.example.project1;

       

      rule "request_validation"

        dialect "java"

        ruleflow-group "request_validation"

        no-loop false

        when

        $nfur : x( reqType == "test" , y.actype not in ( "option1", "option2" ) )

        then

        $nfur.setReqStatus( "rejected" );

      end

       

      Yet whenever I try and test this, it is telling me that:

       

      Process Compilation error The field x.y is not visible

       

      How do I access the value of "actype" in 'y' to evaluate?