[rules-users] Querying persistence rules flow data

CK chrisckc at gmail.com
Wed Feb 25 07:17:24 EST 2009


Hi all,

Before I ask my question, just wanted to know if others have noticed  
that the Hudson docs for Drools 5 is not available online.  Or maybe  
it's just me?

I'm a little bit of a beginner in this particular area on the Drools  
flow and its persistence mechanism.  I have a couple questions that  
maybe someone can answer for me.

Say that I have a long-running workflow process.  When it reaches a  
human task (ie. take out trash), the workflow gets saved/persisted to  
the DB.  Once the trash is taken out, the user updates this status.   
The workflow continues and finishes.

My questions are fairly simple:

1) How would I query for a list of human tasks that have not yet been  
completed?  I believe the answer for this one is simply in the demo/ 
test/example codes, but somehow I can't seem to find it.  I see mostly  
codes that sends complete/fail methods to indicate that the process is  
completed.  Is there an API for this that I can look at?

2) Is there an API that allows me to query completed items, failed  
items, etc?  It'd be great if someone can point to the right class.

3) What happens to old long-running processes currently still waiting  
to be finished (and stored in the DB) when I decide to change the  
workflow process (either manually or in Guvnor)?  What would be a good  
way in dealing with a situation with changing workflow processes?   
Create a new workflow (with a new workflow id) and have all new  
requests go through the new workflow?  If that's the case, then how  
would one "upgrade" the old workflow processes?  I believe jBPM also  
has an issue with this, along with all other workflow engines with  
long-running processes.  Is there a recommended way?

4) Is it a good idea to just have Drools store the workflow status  
data (ie. task start and completion date) and use that to query and  
calculate performance or is it better to create an additional workflow  
step that updates my own database table containing these data?  Is  
there also a recommended way for this procedure?

I appreciate any insights and recommendations that you have.

Thanks,
Chris



More information about the rules-users mailing list