> You're doing something odd on your rule RHS, but Jess's "lazy
> execution" semantics are letting you get away with it. (user ?userID)
> and (type-music ?classical) are being parsed as function calls. 
Thank you for your pront response Ernest.

> up to your Userfunction to resolved each of its arguments, which would
> result in those function calls being executed. In this case, there'd
> be an error, since you haven't defined functions named (user) or
> (type-music.) If you want to pass two-item lists as arguments, you
> have to create the lists explicitly:
Actually what I would like to do is to pass as argument a new fact that
responds to the template:

(deftemplate play-music-event 
    (slot user)
    (slot type-music))

or at least a Fact-ID

The idea is that the function in Java receives as argument the new fact
and can later map the fact contents into a Structured Event defined as a
set of name-value pairs that is later transmitted to registered
parties. If I received the argument in the form of a fact I wouldn't need
to parse the arguments and I could use the Fact class interface to extract
each of the components of that fact. Is there something that it could be
done to pass the fact directly?

In the mean time, I will follow your admices to fix the problem.

Another problem I am facing is that some of the events that arrive to my
agent are represented by nested structures, i.e. within a structure
another structure is contained. I would like to map such event to an
unordered fact in CLIPS, containing nested slots. However I believe
that is not possible, is that correct? Is there a workaround for it? For
example what I would like to do is something like this:


struct Location { // Note that what I actually receive are CORBA structs!
  string personID;
  int cameraID;
  Coordinates coord;
  Orientation angles;
}; 

struct Coordinates {
  float coordX;
  float coordY;
  float coordZ;
};

I would like, if possible to map this into Jess to something like:


(Location (personID p) (cameraID c) (Coordinates (coordX x) (coordY
y) (coordZ z)) (Orientation (angleAlpha a) (angleBeta b) (angleGamma g)))


Thanks,

-----
Diego Lopez de Ipina
http://www-lce.eng.cam.ac.uk/~dl231


---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to