[rules-users] Task persistence problem

fuankarion fuankarion at gmail.com
Tue Oct 12 09:12:58 EDT 2010


Hi, I'm not sure if this is the best place to ask this,  I'll give it a try. 

I'm building an application with drools, one of the features is that it
should keep a “TODO List”, this is given by the human tasks contained in
ruleflows, I've managed to set up drools persistence for workflows
kwnoeledge sessions and humans tasks (tricky but i got it working), however
it seems that I'm still missing something, when I try to start a workflow
with 2 human tasks and a script tasks, arranged like this 

start >> human task 1 >> script task >> human tasks 2 >> end 

its behavior is irregular. 

A first review of this problem got me to the conclusion that the ruleflow 
fails to register (with mina)  the second human task about half the times
(first one is allways a success), interesting is that if you start the
ruleflow several times it shows a “pattern”, it registers the task once then
it does not, then it registers the task again and so on.   

When it is unable to register the second task I don't get any exception
report (on the web interface) however after looking at the server logs I
found that every time the ruleflow fails to register the second task an
exception  is thrown, it is 

        java.lang.IllegalArgumentException: attempt to create merge event
with null entity 

followed by a 

        java.lang.NullPointerException 

(I can provide the full stack trace or the log output of drools if you need
them, I'm trying to keep this post as readable as possible) 

Digging deeper in this situation  I noticed that some weird values are
getting inserted on the column  workItemId on table Task (which I guess is
mapped from org.drools.task.Task), and sometimes the value 0 gets inserted
in this column (this colums right now looks looks like 22,0,24,25,0), so my
guess is that the human task is actually getting registered to mina but, it
is not registered in a “proper way” and those 0s are a sign of it. 

Has any one any idea of what might be happening (what I might be missing),
any help will be appreciated. 

By the way 
I'm using drools 5.1 
The database is a mysql database. 
The persistence of the workflows and tasks is done in the same mysql server
but in different databases. 
I'm using mina as task server and task client on the default port. 
This whole thing is running inside a jboss 5.1 server on jdk 1.5. 

I can provide more implementation details, logs or code if necessary

Thanks in advance
Fuanka
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Task-persistence-problem-tp1687619p1687619.html
Sent from the Drools - User mailing list archive at Nabble.com.




More information about the rules-users mailing list