[jboss-user] [JBoss Seam] - Pageflow and @StartTask

MelampO do-not-reply at jboss.com
Mon Dec 18 11:32:29 EST 2006


Hello.

I am trying to start a task with @StartTask annotation but it seems not work because I am in a long running conversation.

The problem is that I have a pageflow running and I call the @StartTask annotated method from a decision-node. With the pageflow I have a long conversation, so when it founds @StartTask returns a exception:


JSF:

  | <h:form>
  | 	<h:dataTable var="task"
  | 	value="#{taskInstanceListForType['esperandoEnvio']}"
  | 	rendered="#{not empty taskInstanceListForType['esperandoEnvio']}">
  | 
  | 	<h:column>
  | 		<f:facet name="header">
  | 			<h:outputText value="Título" />
  | 		</f:facet>
  | 		<h:outputText value="#{task.variables.peticionJBPM['url']}" />
  | 	</h:column>
  | 
  | 	<h:column>
  | 		<s:button action="recibido" value="Recibido" taskInstance="#{task}" />
  | 	</h:column>
  | 	
  | 	</h:dataTable>
  | 
  | </h:form>
  | 


Pageflow definition:

  | ....
  | 
  |  <page name="Pedidos" back="enabled" view-id="/peticiones/pedidos.jsp" no-conversation-view-id="/peticiones/login.jsp">
  |    	  <redirect />
  |       <transition name="volver" to="Gestionar Peticiones"></transition>
  |       <transition name="ver" to="Informacion"></transition>
  |       <transition name="buscar" to="Resultados"></transition>
  |       <transition name="recibido" to="Recibido"></transition>
  |  </page>
  | 
  |  <decision name="Recibido" expression="#{avanzarEstadoPeticion.avanzar}">
  |       <transition name="false" to="Pedidos"></transition>
  |       <transition name="true" to="Pedidos"></transition>
  |  </decision>
  | 
  | ....
  | 


Bean:

  | @Stateless
  | @Name("avanzarEstadoPeticion")
  | public class AvanzarEstadoPeticionImpl implements AvanzarEstadoPeticion {
  | 
  | 	@StartTask
  | 	@EndTask
  | 	public boolean avanzar() {
  | 		return true;
  | 	}
  | 
  | }
  | 


And, finally, the stacktrace:

  | 17:28:59,225 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
  | org.jbpm.graph.def.DelegationException
  |         at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
  |         at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
  |         at org.jbpm.graph.node.Decision.execute(Decision.java:131)
  |         at org.jbpm.graph.def.Node.enter(Node.java:316)
  |         at org.jbpm.graph.def.Transition.take(Transition.java:119)
  |         at org.jbpm.graph.def.Node.leave(Node.java:383)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:174)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:137)
  |         at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:229)
  |         at org.jboss.seam.pageflow.PageflowHelper.signal(PageflowHelper.java:47)
  |         at org.jboss.seam.core.Pageflow.navigate(Pageflow.java:214)
  |         at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigationHandler.java:30)
  |         at org.jboss.seam.core.Pages.handleOutcome(Pages.java:319)
  |         at org.jboss.seam.core.Pages.callAction(Pages.java:360)
  |         at org.jboss.seam.jsf.AbstractSeamPhaseListener.callPageActions(AbstractSeamPhaseListener.java:200)
  |         at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:149)
  |         at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:50)
  |         at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersBefore(LifecycleImpl.java:520)
  |         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:342)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  |         at java.lang.Thread.run(Thread.java:595)
  | Caused by: org.jbpm.JbpmException: couldn't evaluate expression '#{avanzarEstadoPeticion.avanzar}'
  |         at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpressionEvaluator.java:38)
  |         at org.jbpm.graph.node.Decision.execute(Decision.java:108)
  |         ... 35 more
  | Caused by: javax.ejb.EJBException: java.lang.IllegalStateException: begin method invoked from a long running conversation, try using @Begin(join=true)
  |         at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
  |         at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
  |         at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
  |         at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
  |         at $Proxy518.avanzar(Unknown Source)
  |         at org.fundacionctic.actions.peticion.AvanzarEstadoPeticion$$FastClassByCGLIB$$acb03afc.invoke(<generated>)
  |         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
  |         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
  |         at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
  |         at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
  |         at sun.reflect.GeneratedMethodAccessor399.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  |         at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  |         at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
  |         at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
  |         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
  |         at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
  |         at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
  |         at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$20d7a2c3.avanzar(<generated>)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jbpm.jpdl.el.impl.BeanMethod.invoke(BeanMethod.java:19)
  |         at org.jbpm.jpdl.el.impl.ArraySuffix.evaluate(ArraySuffix.java:287)
  |         at org.jbpm.jpdl.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
  |         at org.jbpm.jpdl.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:264)
  |         at org.jbpm.jpdl.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:191)
  |         at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpressionEvaluator.java:34)
  |         ... 36 more
  | Caused by: java.lang.IllegalStateException: begin method invoked from a long running conversation, try using @Begin(join=true)
  |         at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:46)
  |         at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  |         at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  |         at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
  |         at sun.reflect.GeneratedMethodAccessor400.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  |         at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  |         at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
  |         at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
  |         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
  |         at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
  |         at sun.reflect.GeneratedMethodAccessor413.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
  |         at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
  |         ... 79 more
  | 
  | 


I have tryed with @Begin(join=true) in the bean method as suggests the exception, but it has not work.

Any idea?

Thanks.


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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994728




More information about the jboss-user mailing list