Yes, it works. Thank you.

Ernest Friedman-Hill wrote:

This page in the Wiki explains it:

http://www.jessrules.com/jesswiki/view?EnumeratedTypes

On Mar 13, 2008, at 6:06 AM, Joao Antunes Mourao wrote:

Hello,

Its possible in Jess to access enumerated types previously defined in
java. I mean, suppose I define a enumerated type in some .java like

public enum Type {type1, type2, type3};

and then I have some class with a type atribute like:

public class hello{
    Type hello_type;
    String name;
}

Now, what i want is to do something like this in jess:

(defrule hello-rule
    (hello {name=="some name"} {hello_type==type1})
=>
    printout "Hello")

Although, because hello_type is not a "normal" type I can not do this
kind of comparison. I tried to import the Type for the jess code,
still
doesn't work. Any ideas how can solve this?

Regards,

Joao Mourao

--------------------------------------------
Unclassified email<joao.mourao.vcf>


---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.com





--------------------------------------------------------------------
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]
--------------------------------------------------------------------

begin:vcard
fn;quoted-printable:Jo=C3=A3o Mour=C3=A3o
n;quoted-printable;quoted-printable:Mour=C3=A3o;Jo=C3=A3o
org:Thales;Above Water Systems
adr:;;;Hengelo;;;Netherlands
email;internet:[EMAIL PROTECTED]
title:THALES NETHERLANDS B.V.
tel;work:2640
note:-unclassified mail-
version:2.1
end:vcard

Reply via email to