[rules-users] Error with update in Guvnor

John Peterson john.peterson.gv3k at statefarm.com
Fri Nov 5 15:28:08 EDT 2010


Hi all,

I'm getting a strange error when I run my rules deployed from Guvnor.
Here's the rule:

WHEN
  Fact1 [f1]
Flag1 = false
Flag2 = false
 Fact2 [f2]
    KeyField = f1.KeyField
THEN
f1.Flag2 = true;
update(f1);
f2.count1 = f2.count1 - 1;
f2.count2 = f2.count2 - 1;
f2.count3 = f2.count3 - 1;
f2.count4 = f2.count4 - 1;
f2.count5 = f2.count5 - 1;
update(f2);

I get the following error in my console when I run:

Exception in readKnowledgeBase: [Error: illegal use of operator:
PROJECT]
[Near : {... Unknown ....}]
             ^
[Line: 1, Column: 0]

If I remove the second update, it runs without error (but my rules
dependent on the updated f2 don't work).  I'm doing this in the Guided
Editor.  I've tried both "Modify the values of f2" and doing the update
as free form DRL ("update(f2);").  As listed above, if I put a print
between the last assignment and the update, I get the print results
before the error.  If I put the print last, I never see it, so I'm 99.9%
certain it is choking on my update.

Version Specifics:
-	Guvnor 5.0.1
-	Drools 5.0.1
-	JBoss 4.2.3.GA

Any help/guidance would be appreciated!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101105/c452651f/attachment.html 


More information about the rules-users mailing list