-boun...@lists.jboss.org] On Behalf Of Esteban Aliverti
Sent: 03 June 2010 23:43
To: Rules Users List
Subject: Re: [rules-users] Object Referencing Error
Yes, your rule entered in an infinite loop because when every time you
insert/modify/retract a Fact, rules are reevaluated to check
-0300
From: Esteban Aliverti esteban.alive...@gmail.com
Subject: Re: [rules-users] Object Referencing error:
To: Rules Users List rules-users@lists.jboss.org
Message-ID:
aanlktimezij5vfmtbeslfjiwoc_4mezsxbkmixavj...@mail.gmail.com
Content-Type: text/plain; charset=iso-8859-1
You can't
the Drools - User mailing list archive at Nabble.com.
--
Message: 3
Date: Fri, 4 Jun 2010 08:47:29 -0300
From: Esteban Aliverti esteban.alive...@gmail.com
Subject: Re: [rules-users] Object Referencing Error
To: Rules Users List rules-users@lists.jboss.org
Message-ID
Hi,
I am getting the following error when I try to do complex object referencing in
drools:
My class:
A{
String Type;
B objectb;
//getters and setters for above
}
My rules:
rule prod
when
$a :A(Type == Prod , objectB != )
then
B bobject = new B();
bobject.setType( Prod
You can't modify bobject, becuase it doesn't exist inside the session. You
just created it a few lines above. Maybe you need an insert() or maybe you
need the bobject reference from the LHS. Something like this:
*rule* prod
*when*
$a :A(Type == Prod , objectB != )
*then*
Aliverti esteban.alive...@gmail.com
Subject: Re: [rules-users] Object Referencing error:
To: Rules Users List rules-users@lists.jboss.org
Message-ID:
aanlktimezij5vfmtbeslfjiwoc_4mezsxbkmixavj...@mail.gmail.com
Content-Type: text/plain; charset=iso-8859-1
You can't modify bobject, becuase