7 Replies Latest reply on Jun 19, 2009 5:48 PM by karypid

    Using jBPM EL in Seam

    vanyatka

      Hi,


      I've asked this on jBPM forum, but I feel this issue might be more related to Seam than to jBPM, so let me post it here as well.


      The general question idea is how Seam EL corresponds to jBPM EL used in process definitions?
      For example, in the jPDL decision node I'd like to use jbpm context variable.


      <decision name="check banner list" expression="#{bannersCount}">
           <transition to="select stub" name="no banners found"></transition>
           <transition to="select banner" name="banners found"></transition>
      </decision>



      The bannerCount variable defined in the Seam as


      @Out(scope = ScopeType.BUSINESS_PROCESS, required = false)
      private String bannersCount;     



      But I get this error:


      13:28:46,887 FATAL [application] javax.ejb.EJBTransactionRolledbackException: Identity 'bannersCount' does not reference a MethodExpression instance, returned type: java.lang.String
      javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: Identity 'bannersCount' does not reference a MethodExpression instance, returned type: java.lang.String
      



      Regarding to bannersCount, should it be handed by Seam EL or jBPM EL? Who's in charge of resolving the variable and where to find the docs on using EL in process definitions?


      Thanks for your help.

        • 1. Re: Using jBPM EL in Seam
          pmuir

          If you use Seam with jBPM, then Seam deals with EL resolution.


          Post the full stack trace

          • 2. Re: Using jBPM EL in Seam
            vanyatka

            Sure, the dump is below. In fact it is even longer, but it is full of dupes, the same block keeps repeating many times.


            I have to say that everything works fine if EL points to


            #{mycomponent.bannersCount}



            But I don't the meaning of defining a variable in BUSINESS_CONTEXT then.



            22:23:29,793 FATAL [application] javax.ejb.EJBTransactionRolledbackException: Identity 'bannersCount' does not reference a MethodExpression instance, returned type: java.lang.String
            javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: Identity 'bannersCount' does not reference a MethodExpression instance, returned type: java.lang.String
                    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
                    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
                    at javax.faces.component.UICommand.broadcast(UICommand.java:383)
                    at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
                    at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
                    at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
                    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
                    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                    at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                    at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                    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:230)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                    at java.lang.Thread.run(Thread.java:619)
            Caused by: javax.ejb.EJBTransactionRolledbackException: Identity 'bannersCount' does not reference a MethodExpression instance, returned type: java.lang.String
                    at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
                    at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
                    at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                    at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
                    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:77)
                    at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                    at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                    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:240)
                    at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
                    at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
                    at $Proxy302.newChain(Unknown Source)
                    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:597)
                    at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                    at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                    at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                    at org.javassist.tmp.java.lang.Object_$$_javassist_2.newChain(Object_$$_javassist_2.java)
                    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:597)
                    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
                    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
                    at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
                    at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
                    at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
                    at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
                    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
                    ... 46 more
            Caused by: org.jbpm.graph.def.DelegationException: Identity 'bannersCount' does not reference a MethodExpression instance, returned type: java.lang.String
                    at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:387)
                    at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:378)
                    at org.jbpm.graph.node.Decision.execute(Decision.java:148)
                    at org.jbpm.graph.def.Node.enter(Node.java:319)
                    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:597)
                    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
                    at org.jbpm.graph.def.Node_$$_javassist_203.enter(Node_$$_javassist_203.java)
                    at org.jbpm.graph.def.Transition.take(Transition.java:151)
                    at org.jbpm.graph.def.Node.leave(Node.java:394)
                    at org.jbpm.graph.def.Node.leave(Node.java:358)
                    at org.jbpm.graph.def.Node.execute(Node.java:350)
                    at org.jbpm.graph.def.Node.enter(Node.java:319)
                    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:597)
                    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
                    at org.jbpm.graph.def.Node_$$_javassist_203.enter(Node_$$_javassist_203.java)
                    at org.jbpm.graph.def.Transition.take(Transition.java:151)
                    at org.jbpm.graph.def.Node.leave(Node.java:394)
                    at org.jbpm.graph.def.Node.leave(Node.java:358)
                    at org.jbpm.graph.def.Node.execute(Node.java:350)
                    at org.jbpm.graph.def.Node.enter(Node.java:319)
                    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:597)
                    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
                    at org.jbpm.graph.def.Node_$$_javassist_203.enter(Node_$$_javassist_203.java)
                    at org.jbpm.graph.def.Transition.take(Transition.java:151)
                    at org.jbpm.graph.def.Node.leave(Node.java:394)
                    at org.jbpm.graph.def.Node.leave(Node.java:358)
                    at org.jbpm.graph.def.Node.execute(Node.java:350)
                    at org.jbpm.graph.def.Node.enter(Node.java:319)
                    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:597)
                    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
                    at org.jbpm.graph.def.Node_$$_javassist_203.enter(Node_$$_javassist_203.java)
                    at org.jbpm.graph.def.Transition.take(Transition.java:151)
                    at org.jbpm.graph.def.Node.leave(Node.java:394)
                    at org.jbpm.graph.def.Node.leave(Node.java:358)
                    at org.jbpm.graph.def.Node.execute(Node.java:350)
                    at org.jbpm.graph.def.Node.enter(Node.java:319)
                    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:597)
                    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
                    at org.jbpm.graph.def.Node_$$_javassist_203.enter(Node_$$_javassist_203.java)
                    at org.jbpm.graph.def.Transition.take(Transition.java:151)
                    at org.jbpm.graph.def.Node.leave(Node.java:394)
                    at org.jbpm.graph.node.StartState.leave(StartState.java:70)
                    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:597)
                    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
                    at org.jbpm.graph.def.Node_$$_javassist_203.leave(Node_$$_javassist_203.java)
                    at org.jbpm.graph.exe.Token.signal(Token.java:195)
                    at org.jbpm.graph.exe.Token.signal(Token.java:140)
                    at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:271)
                    at org.jboss.seam.bpm.BusinessProcess.afterCreateProcess(BusinessProcess.java:147)
                    at org.jboss.seam.bpm.BusinessProcess.createProcess(BusinessProcess.java:122)
                    at org.jboss.seam.bpm.BusinessProcessInterceptor.afterInvocation(BusinessProcessInterceptor.java:106)
                    at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:49)
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                    at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                    at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                    at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
                    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:597)
                    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.invokeInCallerTx(TxPolicy.java:126)
                    ... 85 more
            Caused by: javax.el.ELException: Identity 'bannersCount' does not reference a MethodExpression instance, returned type: java.lang.String
                    at org.jboss.el.parser.AstIdentifier.getMethodExpression(AstIdentifier.java:113)
                    at org.jboss.el.parser.AstIdentifier.invoke(AstIdentifier.java:75)
                    at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
                    at org.jboss.seam.bpm.SeamExpressionEvaluator$1.evaluate(SeamExpressionEvaluator.java:97)
                    at org.jboss.seam.bpm.SeamExpressionEvaluator.evaluate(SeamExpressionEvaluator.java:45)
                    at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpressionEvaluator.java:39)
                    at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpressionEvaluator.java:30)
                    at org.jbpm.graph.node.Decision.execute(Decision.java:95)
                    ... 173 more
            


            • 3. Re: Using jBPM EL in Seam
              pmuir

              I think this is a bug, but I need to reproduce it to be sure. Can you file a JIRA issue?

              • 4. Re: Using jBPM EL in Seam
                vanyatka
                • 5. Re: Using jBPM EL in Seam
                  luiggitama.luiggitama.gmail.com

                  Hi all...


                  The bug specified in JBSEAM-3250 was fixed, but the patch is included in Seam 2.1.0 only. The patch should be applied to Seam 2.0.x as well.


                  See: JBSEAM-3432.


                  Regards,


                  Luis Tama

                  • 6. Re: Using jBPM EL in Seam
                    mtorres

                    The fix for this caused a regression. Please see JBSEAM-3355.

                    • 7. Re: Using jBPM EL in Seam

                      I want to use variables in a jBPM <mail-node/> and am affected by this. Does anybody know of a workaround that could be used to send a jBPM e-mail without static text only?