1 Reply Latest reply on Apr 14, 2009 11:53 AM by Kevin Conner

    jbossESB4.5+jbpm3.2+pop3

    ailing qin Newbie

      Hello,
      I went to receive the email in my jbpm, so, i create a service in jboss-esb.xml, the code of jboss-esb.xml like this:

      <services>
       <service category="Architecture-Journal"
       name="MailProcUsingJCAAndjBPM"
       description="Exemplo de Gateway POP e processamento com jBPM">
      <jca-gateway name="mailListener"
       adapter="mail-ra.rar" endpointClass="com.aj.soa.jbossesb.gateways.JBossESBMailGateway"
       is-gateway="true"
       transacted="false">
       <activation-config>
       <property name="mailServer" value="pop3.toto.fr" />
       <property name="storeProtocol" value="imap" />
       <property name="mailFolder" value="inbox" />
       <property name="userName" value="test@toto.fr" />
       <property name="password" value="test" />
       <property name="pollingInterval" value="5000" />
       </activation-config>
       </jca-gateway>
       <jms-listener name="jmsListener"
       busidref="mailProcJmsChannel"
       maxThreads="1" />
       <action name="execute-process" class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
       <property name="command" value="StartProcessInstanceCommand" />
       <property name="process-definition-name" value="ticketManagements" />
       <property name="esbToBpmVars">
       <mapping esb="BODY_CONTENT" bpm="theBody"/>
       </property>
       </action>

      and my processdefinition.xml like this:
      <node name="Receive mail">
       <action class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
       <esbCategoryName>Architecture-Journal</esbCategoryName>
       <esbServiceName>MailProcUsingJCAAndjBPM</esbServiceName>
       <bpmToEsbVars>
       <mapping bpm="theBody" esb="BODY_CONTENT" />
       </bpmToEsbVars>
       <esbToBpmVars>
       <mapping esb="BODY_CONTENT" bpm="theBody"/>
       </esbToBpmVars>
       </action>
       <transition to="Analyse" name="trAnalyse"></transition>
       </node>


      when I try run the process in jbpm-console,I got error
      [17:32:02,436 ERROR [GraphElement] action threw exception: org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler
      java.lang.ClassCastException: org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler
       at org.jbpm.graph.def.Action.execute(Action.java:121)
       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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.def.Action_$$_javassist_150.execute(Action_$$_javassist_150.java)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
       at org.jbpm.graph.def.Node.execute(Node.java:338)
       at org.jbpm.graph.def.Node.enter(Node.java:318)
       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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.def.Node_$$_javassist_136.enter(Node_$$_javassist_136.java)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       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:585)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.def.Node_$$_javassist_136.leave(Node_$$_javassist_136.java)
       at org.jbpm.graph.exe.Token.signal(Token.java:194)
       at org.jbpm.graph.exe.Token.signal(Token.java:157)
       at org.jbpm.jsf.core.action.SignalActionListener.handleAction(SignalActionListener.java:56)
       at org.jbpm.jsf.core.impl.JbpmActionListenerWrapper.processAction(JbpmActionListenerWrapper.java:82)
       at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
       at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771)
       at javax.faces.component.UICommand.broadcast(UICommand.java:372)
       at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
       at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       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:173)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       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:241)
       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:447)
       at java.lang.Thread.run(Thread.java:595)]


      Thanks in advance!