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