[Design of JBoss jBPM] - Help with a Jbpm error
by francesco.franze
Hi all, I'm trying to retrieve the value of some variables added to a remote jbpm process, but when I request the ContextIstance it gaves this error
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.jbpm.context.exe.TokenVariableMap.variableInstances, no session or session was closed
I tryed another way to catch the variables, with the following code
ProcessInstance processInstance1=this.prendiIstanzaWorkflow(workflowDT);
VariablesCommand variabile= new VariablesCommand();
token = processInstance1.getRootToken();
variabile.setTokenId(token.getId());
Object o=servizioWorkflowJbpm.execute(variabile);
TokenVariableMap tmv=(TokenVariableMap) o;
ContextInstance cc=tmv.getContextInstance();
Map map = cc.getVariables();
but the error is the same Can someone help me? Thanks.
There the full stack trace
ERROR [org.hibernate.LazyInitializationException] - failed to lazily initialize a collection of role: org.jbpm.context.exe.TokenVariableMap.variableInstances, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.jbpm.context.exe.TokenVariableMap.variableInstances, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentMap.entrySet(PersistentMap.java:206)
at org.jbpm.context.exe.VariableContainer.getVariablesLocally(VariableContainer.java:119)
at org.jbpm.context.exe.VariableContainer.getVariables(VariableContainer.java:106)
at org.jbpm.context.exe.ContextInstance.getVariables(ContextInstance.java:106)
at org.jbpm.context.exe.ContextInstance.getVariables(ContextInstance.java:95)
at com.linksmt.fpap.services.WorkflowJbpmService.prendiInfo(WorkflowJbpmService.java:109)
at com.linksmt.fpap.services.WorkflowJbpmService.infoStatoCorrente(WorkflowJbpmService.java:76)
at com.linksmt.fpap.controllers.TestWorkflowController.handleRequestInternal(TestWorkflowController.java:31)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:453)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193784#4193784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193784
15 years, 5 months
[Design of JBoss jBPM] - Re: signal name clash
by kukeltje
First of all, nice reading on signals, messages, events is https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a08bc...
For me there is one statement (at least) where I think their scope is to narrow:
anonymous wrote : Remember, in BPMN a "message" really means any kind of signal from outside, even a phone call or web interaction. The key is that it comes from outside the process.
|
but in the intro
anonymous wrote : In BPMN, a signal received from outside the process is called a message, whether it's a SOAP message or a fax, phone call, or paper mail.
No word of a web interaction here, so I agree with the latter, not the former
I'd say from outside the system that facilitates the businessprocess. So more than just the bpms. The webapp is part of this 'system'
Now more concrete
3 is not used by many people I think, so the could be seen as non-existent (not that we do not need it!!). Otoh, it is not that different from 2 and I do not see a conceptual problem with unifying 2 and 3 (maybe there is a techical one).
2 can btw currently influence control flow if you explicitly unlock the token, but since that is also uncommon usage, I'd not give that high priority either
Leaves the unification of 1 and 2/3. One of the key words in 1 is 'external' is it external to the process? or external to the system? For me personally the system is the process(engine) combined with messsaging systems, webapp, java code, scheduler etc, so a message for me really is a businessmessage comming from a real external entity via e.g. ebMS. An incomming message can put some data somewhere and signal (which is then internal) the process. In that case it is not that different from what it currently is, right? We just add the concept of a message
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193759#4193759
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193759
15 years, 5 months