Do you just mean something like:
(deffunction make-widget (?bean)
(bind ?type (get ?bean aProperty))
(if (eq ?type "FOO") then
(return (new Foo))
else (if (eq ?type "BAR") then
(return (new Bar))
else (if (eq ?type "BAZ") then
(return (new Baz)))))
(return (new NoneOfTheAbove)))
Pretty much exactly as you would do it in Java, yes?
I think Aditya Deshpande wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> How do I do this in JESS:
>
> Implement factory kind of a pattern wherein based on the property of a
> javabean I get a class from JESS returne
>
> Regards
> Aditya
>
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
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]
---------------------------------------------------------------------