JESS: Fwd: I (temporarily) give up - jess & jms

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

JESS: Fwd: I (temporarily) give up - jess & jms

gregory richardson


Begin forwarded message:

From: gregory richardson <[hidden email]>
Date: June 3, 2011 2:56:08 PM CDT
Subject: Fwd: I (temporarily) give up - jess & jms



Begin forwarded message:

From: gregory richardson <[hidden email]>
Date: June 3, 2011 1:58:53 PM CDT
Subject: I (temporarily) give up - jess & jms

Gang ...

Am attempting to do something that I thought would be simple ... e.g. :

1: having a jms listener sitting on a queue
2: listener creates a Rete engine and passes the jms event to the engine
3: the engine does whatever and sends a message out

The problem I am running into is that while this approach works via the command line nothing happens when I actually run it from the listener. The problem is simple, if a patient hasn't seen a doctor in 2 days, he gets an email. If a patient hasn't seen a doctor in more than 2 days, the doctor gets an email.

So ... The first attachment is the rule set that I am using. The second attachment is a code snippet from the jms listener that actually triggers something.





This works like a champ from the command line - e.g. :

1: I start jess
2: I execute (batch "test01")
3: I execute (bind ?object (new EscalationEvent))
4: I execute (add ?object)
5: I execute (run)

and Rete does the appropriate thing ...

When I attempt this from java, however, the facts (from rete.add(object)) don't appear to be recognized.

What am I doing wrong?

gregory




test01 (554 bytes) Download Attachment
RuleEngineListener.java (4K) Download Attachment