[rules-users] A Simple Rule ( using Guided editor )

Ashish Soni learnspring at gmail.com
Mon Jan 26 11:26:01 EST 2009


Hi All ,

I am just trying to write a simple rule but not sure how can i write it ,
Please help me as i am new to drools and still in the learning phase .

I have a below Fact  with three fields

Person

    firstName
    lastName
    fullName


Now i want to assign fullName = firstName + lastName which i am not able to
find out how can i do that.

I am able to define the *when *part using guided editor but able to
define *then
*part , Please help

*rule "PersonRules"
    dialect "mvel"
    when
        p : Person( firstName != "" && lastName != "" )
    then*

Thanks,
Ashish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090126/011d4cb8/attachment.html 


More information about the rules-users mailing list