1. See previous email about identifiers. The dollar sign has no
significance other than some people find it makes identifying variables
in a rule easier.
2. This is a pattern that will match any Person object in WorkingMemory.
The variable "likes" will be bound to the value of field
"favouriteCheese" - i.e. personInstance.getFavouriteCheese().
If you have not already done so I suggest you read the documentation.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mithun
Sent: 17 May 2007 07:14
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Drools basic questions.
hi all,
I am new to Drools, so i have some basic questions. I am sorry if my
questions sound silly. Please help.
1. What does it mean when you prefix a variable with a dollar sign in a
.drl
file? If possible give a simple example please.
2. Please explain the following line of code:
- Person( likes : favouriteCheese )
This is my understanding of the above code.
- 'favouriteCheese' is a global variable which we are
assingining
to 'likes' and an object of type 'Person' is created
by seding 'likes' as a paramerter to the constructor.
Please
correct me if i am wrong. Thank you.
--
View this message in context:
http://www.nabble.com/Drools-basic-questions.-tf3770127.html#a10659146
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users