couple of weeks ago.
Thanks.
Tihomir
On 9/23/10 12:13 PM, Scott Mayne wrote:
OK after jumping through some hoops to get development mode working,
I
found the problem. Class
org.drools.guvnor.client.modeldriven.ui.ActionValueEditor has a method
showTypeChoice(Widget w) which has a variable (FactPattern
factPattern) used in an if-clause without a null check. The variable
was coming back null and blowing up with a NPE, hence the icon didn't
work.
I noticed things are uneven in the code regarding null-checks by
callers of the function
org.drools.ide.common.client.modeldriven.brl.RuleModel.getBoundFact(final
String var) - might be something to look at.
--- On *Fri, 9/17/10, Scott Mayne
/<smayne(a)webfinancialsolutions.com>/* wrote:
From: Scott Mayne <smayne(a)webfinancialsolutions.com>
Subject: [rules-users] Guvnor 5.1: Pencil icon not clickable in
BRL editor
To: rules-users(a)lists.jboss.org
Date: Friday, September 17, 2010, 1:47 PM
Hi all,
I'm reading Paul Browne's "JBoss Drools Business Rules" and in Ch.
5 we make a BRL in the guided editor. We're using a simple fact
model with a single class (Sales) which has (among others) a field
"sales", type long. The book uses an earlier version of Guvnor so
things look a little different but everything's worked so far,
until I use the editor to make a rule that looks like this in
"view source":
rule "SalesDiscount"
dialect "mvel"
when
mySales : Sales( salesValue : sales >= "100" )
then
mySales.setSales( salesValue-10 );
update( mySales );
end
When I try it out, I get this line in the THEN section
"1. Modify value of Sales [mySales] sales [pencil
icon] [remove icon]
but neither "sales" nor the pencil icon is clickable, so I can't
enter what it should change to. When click view source using what
I could do I get:
rule "SalesDiscount"
dialect "mvel"
when
mySales : Sales( salesValue : sales >= "100" )
then
mySales.setSales( );
mySales.setWait( );
update( mySales );
end
[I added the "wait" because the modify field dropdown has this as
an option but it's not in the Java class and I'm not sure where it
came from.]
Can anyone shed light on this behavior? I'm using the latest
version of Firefox, compiling with GWT/building my own EAR (though
I haven't done any code changes) using RAD 7.5.5.1 (based on
Eclipse 3.4), and am running Guvnor on WebSphere.
-----Inline Attachment Follows-----
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
</mc/compose?to=rules-users(a)lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users