[rules-users] Archived documentation for Drools 3?

2010-09-01 Thread Alexandros Karypidis
  Hi all,

The Drools web site only has the docs/tutorials/etc for version 4 
onwards. I am looking for archived documentation of Drools version 3.x.y 
(I am new to Drools and need to work on a legacy application written 
with that version). Does anyone happen to have it?

Kind regards,
Alexandros

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Uses of timer node

2009-10-07 Thread Alexandros Karypidis
Are you running a thread that fires rules [ksession.fireUntilHalt();] as 
described in the link below?

http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-flow/html/ch03.html#sec.timers

Renato Herebia wrote:
 Hi!

 I'm testing the timer node and I did a simple flow with start node, 
 action node (System.out.println(action node 1);),
 a timer node, other action node (System.out.println(action node 2);) 
 and the end node. When the process start,
 the first action node is triggered, after that, the timer node is 
 activated and don't pass for the next action node after
 the delay time programmed.

 Has any configuration to do when working with timer nodes (handlers, 
 etc.)? Someone has a simple example like
 this I'm testing?

 Thanks!

 -- 
 Renato Herebia
 

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
   

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow, threads and persistence in a clustered environment

2009-10-05 Thread Alexandros Karypidis
Hello,

We plan to use Drools (Flow) in our application for managing 
long-running processes. High-availability is important to us and 
therefore we target a clustered JBoss environment with 3 nodes. We are 
looking for advice on how to approach this from a Drools perspective. 
Can anybody share their experiences on running Drools in a cluster? The 
following scenarios come to mind:

1) A singleton ksession runs constantly on one of the nodes and does 
all the work; it migrates when the node goes down to another machine.

2) Multiple ksession instances on different nodes (for distributing 
load); when one fails the other picks up its processes by having a 
second ksession instance created on it and resuming execution.

Are there any wrapper/utility libraries for Drools that help in 
clustered environments?

Thank you

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Latest Drools with Latest Eclipse

2009-10-03 Thread Alexandros Karypidis
Depends which plugins you're referring to. JBoss Tools 3.0.x only 
supports Eclipse Ganymede (3.4.x series). Therefore, if you want to use 
JBoss Tools you can't use the latest Eclipse (3.5.x series) unless you 
settle for a development milestone version of JBoss Tools 3.

Chris Richmond wrote:

 Is it possible to run all the latest Drools 5.1.0 with the latest 
 version of Eclipse and the Elipse plugins, etc?  Has anyone 
 successfully done this?

  

  

 Also, I remember seeing a link to a testing framework within the IDE 
 on the drools blog at some time, but cannot seem to locate it.  Does 
 anyone know what I am talking about and can provide the link?

  

 Thanks,

 Chris

 

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
   

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow: waiting for process to complete without polling

2009-10-01 Thread Alexandros Karypidis
Hello Kris,

Thank you for your reply.

I am currenty doing test-driven development outside an application 
server to learn the API. I launch processes from within a unit test 
method; hence my need to wait in this manner so that I can perform a 
final assertion on process state (after the process is complete).

You are totally correct to point out that in real life, I will be 
executing long-running processes from within JBoss in my application 
across multiple executions of the application. So what is the typical 
approach for doing that? Do you typically install Drools as a service in 
a SAR, or do you launch it with a servlet startup listener when the WAR 
starts? Also, how do you make sure a clean undeploy/shutdown occurs 
where process execution is gracefully suspended and process states are 
saved? Can you give me some pointers?

Thank you.

Kris Verlaenen wrote:
 I'm not sure that having a thread wait like this until all processes
 have completed is a good idea in general, as in theory processes could
 run for a long time (hours/days/weeks/...).  Unless of course you are
 only using synchronous processes, but in that case the engine will only
 return once the process has been completed anyway (if you call it
 synchronously).

 But the approach you suggest is valid, you can register an event
 listener to react whenever a process instance is completed, or similarly
 you could use the history log to retrieve this kind of information
 (making it decoupled from the actual execution).

 Kris

 Quoting Alexandros Karypidis akary...@yahoo.gr:

   
 Hello,

 I'm not very experienced in the Drools Flow API so I'm looking into
 the 
 best way to code a simple thing: wait for all processes in a session
 to 
 complete without polling.

 The only way I could thing of from the javadoc reference I read, is
 to 
 synchronize and do a wait()/notify() using a ProcessEventListener. It

 seems a lot of work for a use-case that is too basic. I set up a 
 listener like this:

 pel = new ProcessEventListener() {
// ...
 public void afterProcessCompleted(ProcessCompletedEvent
 pce) {
 synchronized (this) {
 notifyAll();
 }
 }
 }
 ksession.addEventListener(pel);

 ...then wait for processes (one in this simplified case) to complete

 like this:

 synchronized (pel) {
 new Thread(new Runnable() {
 public void run() {
 ksession.fireUntilHalt();
 }
 }).start();
 ksession.startProcess(some.process);
 pel.wait(); // the notifyAll() resumes this
 }

 Is there a better way to do this?

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
 

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow: waiting for process to complete without polling

2009-09-29 Thread Alexandros Karypidis
Hello,

I'm not very experienced in the Drools Flow API so I'm looking into the 
best way to code a simple thing: wait for all processes in a session to 
complete without polling.

The only way I could thing of from the javadoc reference I read, is to 
synchronize and do a wait()/notify() using a ProcessEventListener. It 
seems a lot of work for a use-case that is too basic. I set up a 
listener like this:

pel = new ProcessEventListener() {
   // ...
public void afterProcessCompleted(ProcessCompletedEvent pce) {
synchronized (this) {
notifyAll();
}
}
}
ksession.addEventListener(pel);

...then wait for processes (one in this simplified case) to complete 
like this:

synchronized (pel) {
new Thread(new Runnable() {
public void run() {
ksession.fireUntilHalt();
}
}).start();
ksession.startProcess(some.process);
pel.wait(); // the notifyAll() resumes this
}

Is there a better way to do this?

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users