Hello All

Does any body have complete example of multislot example?

I have JIA.I am just learning things.I didnt find any complete example anywhere.

I have  

class DeandPool{

int[] types;

Demand[] demands;

}

class Demand{

String type;

}

Ihave rule file like this:

(watch all)

(defclass demandPool DemandPool)

 

(defrule checkPool

(demandPool (types $?types)(demands $?demands)(OBJECT ?demandPool))

;(test (> $?type 2) )

;test for demand type equals X

=>

(printout t "Got Pool!" ?types (call ?demandPool getTypes)crlf)

(printout t "first type is!" (nth$ 2 ?types) crlf)

==========================

I want to write rule where on LHS, fire rule only if type is > 2..

It doesnt work.

And also I want to write a rule where demand.type="x", then only fire.

Can any body please fill in the blanks? or tell me how does Jess accesses multislots ?

 

Thanks

Bhaskar

 


Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!

Reply via email to