I deployed 2 JSR 181 web services, and I am trying to use jbpm bpel to 
orchestrate the 2 web services.  Both web services accept an input string and 
return it as the output, and they are individually tested and working fine.  
Below is my .bpel content:


  |   <partnerLinks>
  |     <partnerLink name="jbpmbpelRelation" 
partnerLinkType="tns:jbpmbpel-front" myRole="frontEnd" />
  |     <partnerLink name="svcRelation" partnerLinkType="tns:front-svc" 
partnerRole="svcRole" />
  |     <partnerLink name="svc2Relation" partnerLinkType="tns:front-svc2" 
partnerRole="svc2Role" />
  |   </partnerLinks>
  | 
  |   <variables>
  |     <variable name="connectReq" messageType="jbpmbpel:jbpmbpelInputMessage" 
/>
  |     <variable name="connectResp" 
messageType="jbpmbpel:jbpmbpelOutputMessage" />
  |     <variable name="svcReq" messageType="svc:EndpointInterface_echo" />
  |     <variable name="svc2Req" messageType="svc2:EndpointInterface2_echo2" />
  |     <variable name="svcOutputMsg" 
messageType="svc:EndpointInterface_echoResponse" />
  |     <variable name="svc2OutputMsg" 
messageType="svc2:EndpointInterface2_echo2Response" />
  |   </variables>
  | 
  |   <sequence name="mainSequence">
  | 
  |     <receive operation="connect" partnerLink="jbpmbpelRelation" 
portType="jbpmbpel:jbpmbpelFrontEnd" 
  |       variable="connectReq" createInstance="yes" />
  | 
  |     <assign name="connectionStart">
  |       <copy>
  |         <from variable="connectReq" part="request" />
  |         <to variable="svcReq" part="String_1" />
  |       </copy>
  |     </assign>
  | 
  |     <invoke operation="echo" partnerLink="svcRelation" 
portType="svc:EndpointInterface"
  |       inputVariable="svcReq" outputVariable="svcOutputMsg" />
  |    
  |     <assign name="connectionBetween">
  |       <copy>
  |         <from variable="svcOutputMsg" part="result" />
  |         <to variable="svc2Req" part="String_1" />
  |       </copy>
  |     </assign>
  |       
  |     <invoke operation="echo2" partnerLink="svc2Relation" 
portType="svc2:EndpointInterface2"
  |       inputVariable="svc2Req" outputVariable="svc2OutputMsg" />
  |       
  |     <assign name="connectionEnd">
  |       <copy>
  |         <from variable="svc2OutputMsg" part="result" />
  |         <to variable="connectResp" part="result" />
  |       </copy>
  |     </assign>
  |     
  |     <reply operation="connect" partnerLink="jbpmbpelRelation" 
portType="jbpmbpel:jbpmbpelFrontEnd" variable="connectResp" />
  | 
  |   </sequence>
  | 

As you can see, the process accept an input string, hands it over to the first 
service, then the output of the first service is fed into the second service, 
and the output of the second service will be returned to the caller.   For some 
reason I am getting the following exception when I am testing the bpel service:


  | 13:46:39,152 ERROR [StartListener] could not start process instance
  | java.lang.reflect.InvocationTargetException
  |         at sun.reflect.GeneratedMethodAccessor262.invoke(Unknown Source)
  |         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:208)
  |         at 
org.jbpm.bpel.def.Receive_$$_javassist_24.accept(Receive_$$_javassist_24.java)
  |         at 
org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:82)
  |         at org.jbpm.bpel.def.Sequence.accept(Sequence.java:84)
  |         at 
org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:29)
  |         at 
org.jbpm.bpel.def.BpelDefinition.messageReceived(BpelDefinition.java:110)
  |         at 
org.jbpm.bpel.relation.jms.StartListener.onMessage(StartListener.java:94)
  |         at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:694)
  |         at java.lang.Thread.run(Thread.java:595)
  | Caused by: org.jbpm.graph.def.DelegationException
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:349)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at org.jbpm.bpel.def.Activity.enter(Activity.java:88)
  |         at org.jbpm.graph.def.Transition.take(Transition.java:119)
  |         at org.jbpm.graph.def.Node.leave(Node.java:382)
  |         at org.jbpm.bpel.def.Activity.leave(Activity.java:148)
  |         at 
org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:43)
  |         at org.jbpm.bpel.def.Receive.accept(Receive.java:64)
  |         ... 12 more
  | Caused by: org.jbpm.graph.def.DelegationException
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:349)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at org.jbpm.bpel.def.Activity.enter(Activity.java:88)
  |         at org.jbpm.graph.def.Transition.take(Transition.java:119)
  |         at org.jbpm.graph.def.Node.leave(Node.java:382)
  |         at org.jbpm.bpel.def.Activity.leave(Activity.java:148)
  |         at org.jbpm.bpel.def.Assign.execute(Assign.java:41)
  |         at org.jbpm.bpel.def.Activity.enter(Activity.java:83)
  |         ... 17 more
  | Caused by: org.jbpm.graph.def.DelegationException
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:349)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at org.jbpm.bpel.def.Activity.enter(Activity.java:88)
  |         at org.jbpm.graph.def.Transition.take(Transition.java:119)
  |         at org.jbpm.graph.def.Node.leave(Node.java:382)
  |         at org.jbpm.bpel.def.Activity.leave(Activity.java:148)
  |         at org.jbpm.bpel.def.Invoke.execute(Invoke.java:29)
  |         at org.jbpm.bpel.def.Activity.enter(Activity.java:83)
  |         ... 22 more
  | Caused by: org.jbpm.graph.def.DelegationException
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:349)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at 
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
  |         at org.jbpm.bpel.def.Activity.enter(Activity.java:88)
  |         at org.jbpm.graph.def.Transition.take(Transition.java:119)
  |         at org.jbpm.graph.def.Node.leave(Node.java:382)
  |         at org.jbpm.bpel.def.Activity.leave(Activity.java:148)
  |         at org.jbpm.bpel.def.Assign.execute(Assign.java:41)
  |         at org.jbpm.bpel.def.Activity.enter(Activity.java:83)
  |         ... 27 more
  | Caused by: java.lang.NullPointerException
  |         at 
org.jbpm.bpel.service.consumer.PortConsumer.writeMessage(PortConsumer.java:154)
  |         at 
org.jbpm.bpel.service.consumer.PortConsumer.callImpl(PortConsumer.java:127)
  |         at 
org.jbpm.bpel.service.consumer.PortConsumer.call(PortConsumer.java:96)
  |         at 
org.jbpm.bpel.relation.jms.JmsRelationService.invoke(JmsRelationService.java:143)
  |         at org.jbpm.bpel.def.Invoke.execute(Invoke.java:28)
  |         at org.jbpm.bpel.def.Activity.enter(Activity.java:83)
  |         ... 32 more
  | 

If I remove any one of the two 'invoke' in the .bpel file and make it only in 
and out of one service, everything works fine.

What did I miss?  Any help would be highly appreciated!

Jiehuan

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

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

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to