ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Boisvert" <boisv...@intalio.com>
Subject Re: Problem with Catch statement on an Invoke
Date Tue, 05 Jun 2007 15:33:06 GMT
Hi Michael,

According to the BPEL spec, your <bpel:catch> must be placed under the
<bpel:faultHandlers> element.  So the real issue here is insufficient
validation to warn you against placing a <bpel:catch> directly within a
scope...

alex


On 6/5/07, Michael Horwitz <mike.horwitz@gmail.com> wrote:
>
> Hi,
>
> I am trying to write a process to deploy on Ode 1.0 running inside
> ServiceMix. All was going fine until I tried to add a catch clause to an
> invoke in the process. The process compiles fine, just the catch clause
> gets
> ignored and the fault is thrown out of the service. If I copy and paste
> the
> catch clause to the <faultHandlers> section on the process, then all works
> as expected.
>
> First the snippet from the wsdl service declaring the fault:
>
> <wsdl:portType name="marketbus">
>   <wsdl:operation name="getRecord">
>   <wsdl:input message="tns:getRecordRequest"/>
>   <wsdl:output message="tns:getRecordResponse"/>
>     <wsdl:fault name="noRecordFault"
> message="tns:noSuchRecordFault"></wsdl:fault>
>   </wsdl:operation>
> </wsdl:portType>
>
> Now the snippet from the bpel service:
>
> <bpws:invoke inputVariable="recordRequest" name="invokeMarketBus"
> operation="getRecord" outputVariable="recordResponse"
> partnerLink="marketbusClient" portType="ns1:marketbus">
>   <bpws:catch faultName="ns1:noRecordFault">
>     <bpws:sequence name="HiddenSequence">
>       <bpws:assign name="buildFaultMessage" validate="no">
>         <bpws:copy>
>           <bpws:from>
>             <bpws:literal>No such message.</bpws:literal>
>           </bpws:from>
>           <bpws:to>$echoRequest.payload</bpws:to>
>         </bpws:copy>
>       </bpws:assign>
>       <bpws:invoke inputVariable="echoRequest" name="invokeEchoService"
> operation="echoMessage" partnerLink="echoClient"
> portType="ns1:EchoPortType"/>
>     </bpws:sequence>
>   </bpws:catch>
> </bpws:invoke>
>
> And the debug output from the Ode engine (snippet):
>
> DEBUG - BpelProcess                    - InvokeResponse event for iid 20
> DEBUG - BpelRuntimeContextImpl         - Invoking message response for
> mexid
> 4611686018427387948 and channel 20
> DEBUG - JacobVPU                       - injecting
> BpelRuntimeContextImpl$4(...)
> DEBUG - BpelRuntimeContextImpl         - Triggering response
> DEBUG - SCOPE                          - ({OScope 'invokeMarketBus'
> id=50},TerminationChannel#14,ParentScopeChannel#16): has
> a fault handler for {http://abnamro.com/sc}noRecordFault: {OCatch
> faultName=null, faultVariable=null}
> DEBUG - SCOPE                          - ({OCatch faultName=null,
> faultVariable=null},TerminationChannel:FH#21,ParentScopeCha
> nnel:FH#22): has no fault handler for {http://abnamro.com/sc}noRecordFault
> ;
> scope will propagate FAULT!
> DEBUG - SCOPE                          - ({OScope
> '__PROCESS_SCOPE:algotf-bpe'
> id=3},TerminationChannel#1,ParentScopeChannel#
> 2): has no fault handler for {http://abnamro.com/sc}noRecordFault; scope
> will propagate FAULT!
> DEBUG - BpelProcess                    - ProcessImpl completed with fault
> '{
> http://abnamro.com/sc}noRecordFault'
> DEBUG - ProcessDaoImpl                 - Removing completed process
> instance
> 20 from in-memory store.
> DEBUG - OdeService                     - Consuming MEX tracker
> ID:gbws-00065343-3167-1181051426187-7:20
> WARN  - OdeService                     - Ignoring unknown async reply:
> {MyRoleMex#4611686018427387947 [Client ID:gbws-0006534
> 3-3167-1181051426187-7:20] calling {
> http://abnamro.com/sc/algotf}WorkflowService.processNewRecord(...)}
> DEBUG - QuartzSchedulerImpl            - Commiting transaction.
>
> Exactly the same catch statement (copied and pasted) works as expected if
> placed in the <faultHandlers> section of the process.
>
> I am reasonably new to BPEL, so may have missed something?
>
> Thanks
>
> Mike Horwitz
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message