[jboss-user] [JBoss jBPM] - Re: when i end the TaskInstance, an LazyInitializationExcepti
foolpcman
do-not-reply at jboss.com
Wed Aug 1 21:17:00 EDT 2007
Before save operation ,I never close context.see this:
try {
| hsession.save(businessReport);
| ProcessDefinition pd = jbpmContext.getGraphSession().findLatestProcessDefinition("RNDFProcess");
| ProcessInstance pi = pd.createProcessInstance();
| //pi.getContextInstance().setVariable("username", from_username);
| TaskInstance ti = pi.getTaskMgmtInstance().createStartTaskInstance();
| jbpmContext.close();
| ti.setVariable("report_id", businessReport.getReportId());
| ti.end();
| } catch (Exception e) {
| System.out.println("Unknown error in the SaveGo().");
| return_code = Property.SQL_ERROR;
| message = "?????????";
| event_type = "";
| e.getMessage();
| e.printStackTrace();
| jbpmContext.setRollbackOnly();
| }finally{
| jbpmContext.close();
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069856#4069856
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069856
More information about the jboss-user
mailing list