Hi All,

These days i came accross a strange problem.
First i create a process instance and return back the start task instance id.
The code is shown in blow.

                 Long lo = (Long)jbpmTemplate.execute(new JbpmCallback() {
                     public Object doInJbpm(JbpmContext context) {
                         ProcessInstance processInstance = context
                                        .newProcessInstance(processName);
                        TaskInstance taskInstance = 
processInstance.getTaskMgmtInstance()
                                        .createStartTaskInstance();
                
                        context.save(processInstance);

                        return taskInstance.getId();
                        }            
                     });
                return lo.longValue();



After creating the process instance, i can't access the corresponding Token and 
TaskMgmtInstance from the TaskInstance which load by using the taskinstanceId 
return back from the above code.

After checking the database, the relationship between the taskinstance and   
Token isn't persisted.

My quesion is why after using JbpmContext.save(ProcessInstance),the 
relationship is lost.

My environment is show below:
1:Using spring module integrate the spring and jbpm.
2:Using  OpenSessionInView filter to keep one session per request.

Thanks in advance.

Best Wishes
Lucas


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968034#3968034

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968034
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to