[rules-users] Facts - can they be non Java Beans

sridhar123 sridhar.peddinti at sabre.com
Thu May 8 13:57:43 EDT 2008


I am trying to access Fact objects that are not always java beans. Example:

Class A {
  Arraylist  Class B b

  getFirst() { return b.first() }

  }

In above Class i dont have any variable called "first" - but returning first
element of the list.

Now following DRL throws compilation errors. 

rule "Some Rule"
  when
        $MyFact :A()
     	$first : $myFact.getFirst() 
   then
       ....
       ....
end

Is there any way to execute the above - or i should have class variable
"first" and access that?

thank you
Sridhar 
-- 
View this message in context: http://www.nabble.com/Facts---can-they-be-non-Java-Beans-tp17130130p17130130.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list