About the duplicated $s varaible, is because you have 2 DIFFERENT conditions saying $s:Student (same thing for $c)
The rules you have there are translated to (when age field has a value):

when
     $s:Student (age == 18)  //if age value was 18
     $s:Student (mark == 20")
     $c:College (ranking == "85 A")
     $c:College (location == "Delhi")
then
     ....
end

If you want to "join" constraint about Student and constraint about Collegues to get something like:

when
     $s:Student (age == 18, mark == 20")
     $c:College (ranking == "85 A", location == "Delhi")
then
     ....
end

you will need to merge the 2 cells containing $s:Student and the 2 cells containing $c:College. This way is how you tell drools that you want to define 1 condition with multiple constraints instead of multiple condition with one constraint each.

Best Regards,


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Wed, Aug 24, 2011 at 2:12 PM, FrankVhh <frank.vanhoenshoven@agserv.eu> wrote:
Hi to you,

The error message seems to indicate that you are having 2 (types of) errors
in your decision table.

Error type 1: You have duplicate names.
As I am assuming that you are comparing 1 student with 1 college, you can
delete one $s: Student() and one $c: College() cell. Then, you merge the
cells above the columns. That way the engine will not have a duplicate $c,
but work on the same student data.

Error type 2: you are trying to set a String value to a certain attribute.
Bear in mind that the $param parameter is replaced by exactly what is in the
cell and only what is in the cell. Therefore, you need to include " around
you strings. F.e. $c.setValue("$param");

There might be some other things missing as well, but this is what the error
message is stating.

Regards,
Frank


--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-no-subject-tp3280773p3280800.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users