[jboss-user] [JBoss jBPM] - Re: when i end the TaskInstance, an LazyInitializationExcepti
foolpcman
do-not-reply at jboss.com
Wed Aug 1 06:39:00 EDT 2007
Hi,vtysh
you are so warmhearted,I'm so sorry for asking you three times.
Why don't you go to sleep?:)
As you say,I modified the code like this:
| JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| Session hsession = jbpmContext.getSession();
| 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();
| 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();
| }
But it's throws exception all the time
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069565#4069565
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069565
More information about the jboss-user
mailing list