[jboss-user] [JBoss jBPM] - problem: the TaskMgmtInstance cannot return ProcessInstance
cwad0000
do-not-reply at jboss.com
Fri Sep 22 04:15:48 EDT 2006
I have a very strange problem, when iterating over tasks for an actor, i cannot access the ProcessInstance.
I have not had any problems before with this, and suddenly recieved this problem two days ago (my database consists of 720 tasks and 280 process instances).
It started the day before yesterday when the ProcessInstance returned was null for two tasks (for all other tasks in the iteration it was fine),
yesterday suddenly all tasks returns null when calling getProcessInstance();
I assume that my database has somehow gone corrupt....has anyone experienced something similar, or can think of a good way how to tackle this problem? (Can i get the processInstance in some other way perhaps?)
here is the code (for clarity I removed all irrelevant parts)
| JbpmContext jbpmContext = null;
|
| try {
| jbpmContext = jbpmConfiguration.createJbpmContext();
| } catch (Exception e) {
| throw new WorkflowEngineException(errMsg);
| }
|
| try {
| TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSession();
| myTasks = taskMgmtSession.findTaskInstances(uid);
| } catch (Exception e) {
| throw new WorkflowEngineException(errMsg);
| }
|
|
| try {
| for (Iterator iter = myTasks.iterator(); iter.hasNext();) {
| TaskInstance myTaskInstance = (TaskInstance) iter.next();
|
| TaskMgmtInstance tskMgt = myTaskInstance.getTaskMgmtInstance();
|
| ProcessInstance procInstance = tskMgt.getProcessInstance();
|
| //here it breaks, since procInstance will be null!
| long processId = procInstance.getId();
| }
| } finally {
| jbpmContext.close();
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973491#3973491
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973491
More information about the jboss-user
mailing list