task management and association with process instance
fmuhlenberg Jan 4, 2006 1:42 PMWithin jBoss, I am attempting to find all the tasks associated
with a process instance yet I receive this exception every time
the code runs. What is failing and how do I correct my code?
As I'm writing this rant, I keep thinking that I don't have a task
associated a process instance yet I assigned an actor in a
task-node task handler and thought this is enough.
411 List l = new ArrayList();
412 // Find all executing processes with this definition
413 ProcessInstance piarr[] = getExecutingProcesses( jbpms );
414
415 for (int indx = 0; indx < piarr.length; indx++)
416 {
417 ProcessInstance pi = piarr[indx];
418
419 l.addAll( pi.getTaskMgmtInstance().getTaskInstances() );
420 }
org.hibernate.HibernateException: null index column for collection: org.jbpm.graph.exe.ProcessInstance.instances
Stack Trace
org.hibernate.persister.collection.AbstractCollectionPersister.readIndex(AbstractCollectionPersister.java:652)
org.hibernate.collection.PersistentMap.readFrom(PersistentMap.java:222)
org.hibernate.loader.Loader.readCollectionElement(Loader.java:994)
org.hibernate.loader.Loader.readCollectionElements(Loader.java:635)
org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:579)
org.hibernate.loader.Loader.doQuery(Loader.java:689)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
org.hibernate.loader.Loader.loadCollection(Loader.java:1916)
org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520)
org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1562)
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:85)
org.hibernate.collection.AbstractPersistentCollection.readElementByIndex(AbstractPersistentCollection.java:160)
org.hibernate.collection.PersistentMap.get(PersistentMap.java:127)
org.jbpm.graph.exe.ProcessInstance.getInstance(ProcessInstance.java:136)
org.jbpm.graph.exe.ProcessInstance.getTaskMgmtInstance(ProcessInstance.java:170)
servlet.WorkflowAdminServlet.getProcessTasks(WorkflowAdminServlet.java:419)
servlet.WorkflowAdminServlet.doPost(WorkflowAdminServlet.java:203)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
:
I just can't seem to get anything related with tasks to do
anything other then blow up -- even the tutorial examples (copied
line for line) don't work but somehow the webapp does and I don't see
the difference.
Any suggestions are appreciated.