[jboss-user] [jBPM] - Re: Active tasks for process instance

Esteban Aliverti do-not-reply at jboss.com
Fri Aug 24 10:54:19 EDT 2012

Esteban Aliverti [https://community.jboss.org/people/eaa] created the discussion

"Re: Active tasks for process instance"

To view the discussion, visit: https://community.jboss.org/message/755825#755825

AFAIK, there is no API to query history log. 
jbpm-bam module inserts a row in NodeInstanceLog each time a node is entered and a different row each time a node is exited. What the query does is to check for odd occurences of a node (using its name) in NodeInstanceLog.
So, if the node is entered but not exited yet, you will have 1 row in NodeInstanceLog table for a particular process instance id and a particular node (assuming the names of your tasks are unique in a process). When the task is exited, a new row is inserted so the total number of rows for that particual node is even (not returned by the query). If it happens that the node is entered again (some kind of recursion in your process), then the row count will be odd again (3). 

Best Regards,

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120824/c74865fa/attachment.html 

More information about the jboss-user mailing list