[jboss-user] [jBPM] - Re: How to get active processes via ksession.getProcessInstances() (Jbpm 5.1.1)

Ryan Peterson do-not-reply at jboss.com
Thu Oct 20 10:57:34 EDT 2011


Ryan Peterson [http://community.jboss.org/people/rrpeterson] created the discussion

"Re: How to get active processes via ksession.getProcessInstances()  (Jbpm 5.1.1)"

To view the discussion, visit: http://community.jboss.org/message/632789#632789

--------------------------------------------------------------
I wound up doing something similar to Amin's solution, where I check the ProcessInstanceInfo table first to see if the session is "alive".  If so I know its still active & working, and if no result is found then it's probable the processInstance is complete.  For anyone else that may have the same issue, I used the JPA query:


// Query the DB for active processInstances that match the given processId
final Query nativeQuery = entityManagerFactory.createEntityManager().createQuery("SELECT procInfo from ProcessInstanceInfo procInfo where procInfo.processId = :processId");
nativeQuery.setParameter("processId", processId);
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/632789#632789]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

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


More information about the jboss-user mailing list