[rules-users] I am not sure if this is Bug in Guvnor - Please help
Ashish Soni
learnspring at gmail.com
Mon Jan 26 16:07:06 EST 2009
Hi All ,
I have defined a function name *join *using guvnor guided editor which is
mentioned below
function String join(String firstname , String lastname) {
return firstname + " " + lastname;
}
then i created rule using guided editor which make use of the function and
when i validate the rule is validates successfully
rule "persontest"
dialect "mvel"
when
p : Person( firstname != "" && lastname != "" )
then
p.setFullname( join(firstname,lastname) );
end
now i created a test scenario for testing the rule which is like below
GIVEN
insert Person
firstname =Sujit
lastname =Sharma
EXPECT
fullname = Sujit Sharma
and when i run the test i am getting below error
[p] field [fullname] was [] expected [Sujit Sharma ]
Please help.
Regards,
Ashish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090126/5dac767e/attachment.html
More information about the rules-users
mailing list