[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
17 years, 4 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
17 years, 4 months
[Design of Messaging on JBoss (Messaging/JBoss)] - JBM 2.0 Strict ordering via ordering groups
by ataylor
Firstly add a groupid and group sequence to message reference, this will be set on send similar to how scheduled delivery time is set. (theres a todo in ServerSessionImpl::send to do with duplicate code which i'll fix whilst I'm doing this)
Create a new interface and impl for controlling the delivery of grouped messages, we'll call this GroupedMessageHandler. This will maintain what messages are in transit for each group, it wll have a method canDeliver(MessageReference ref) that will return true if the message can be delivered, i.e., the consumer has acked the last reference sent and the group seq if this reference is the next in sequence. The deliver method of QueueImpl will use the GroupMessageHandler to decide if what messages can be delivered to the consumer and also notify it of each acknowledgment.
I don't think it makes sense for a queue to handle messages that are both grouped and non grouped so a flag can be added to specify tjhat a queue is handling grouped messages only. If a queue is 'enableGroupOrdering' the it should ignore any messages routed that don't have the groupid and seq set and also disallow message scheduling.
When creating a core producer it should be possible to set its groupid to an arbitrary string and allow it to set the sequence automatically or let the user set it via the message itself.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193751#4193751
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193751
17 years, 4 months
[Design of JBoss jBPM] - signal name clash
by tom.baeyens@jboss.com
i would like to hear all opinions on the jbpm term signal and potential alternatives.
a signal in jbpm terminology is an external trigger that is given on an execution. the execution passes the signal to the current activity implementation for handling it.
in jPDL, the typical association that the activity implementations make is to take a transition that corresponds to the signal. (a la finite state machines)
but (also a la finite state machines) a signal can fire the corresponding internal event if there is one. in that case, the process does not propagate the execution, but just executes a list of listeners to the internal event.
signal is now the method on the activity to receive external triggers.
and the methods on the services are called signalExecution.
some more background:
jBPM has 3 types of events.
1) an external event coming into an execution (signal)
2) an internal event on which listeners can listen. those listeners cannot influence the control flow (called events)
3) outgoing events to which BI tools can listen to be informed about what happens when. those are called process logs.
I have been thinking of unifying those 3 concepts into 1 event concept, but I have not yet been able to fully apply such unification into a simple consistent set of concepts.
Since signal has been a fundamental concept in jBPM till now, I don't want to replace it lightly and then find out later that it wasn't such a bad idea afterall.
But the name clash with BPMN is there. So I would like to hear all options, alternatives and thoughts about this first.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193720#4193720
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193720
17 years, 4 months