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]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to