3 Replies Latest reply: Oct 23, 2011 9:15 PM by Jeff Yu RSS

Failover for invoke activities

anuj bhatia Newbie

Hello,

 

Is it possible for an invoke activity to failover to other nodes in a cluster even after the invoke has actually started but a response has not yet been received?

 

Consider a BPEL process that has an invoke activity to a web service that takes some time to process the request and return a response. Suppose one of the RiftSaw nodes in a cluster start executing the invoke activity in process and make the web service call. While the call is in progress the node dies. Is it possible for other nodes to detect that the invoke activity was started but a response was not recieved and retry the invoke request?

 

I've tried a simple test and can get failover to work if a node is killed while the process is in a wait activity. But it doesn't seem to work if the process has started an invoke and I'm wondering whether this scenario is supported at all?

 

Thanks

Anuj

  • 1. Re: Failover for invoke activities
    Marek Baluch Newbie

    Hi Anuj,

     

    your scenario is completely valid and I can confirm that it works - we tested it on Riftsaw 2.3.1 Final.  In my experience you need to reconfigure the default failure handling on the invoke activity for the failover to work. Please see bellow. Also please note that failover may take longer because of the preset mex.timeout.

     

    Invoke from our test:

    {code}

    <bpel:invoke name="invokeOk" partnerLink="external" operation="reportResultAndAttemptJvmKill" portType="ns1:NotificationWS" inputVariable="okRequest" outputVariable="invokeOutput">

         <ext:failureHandling xmlns:ext="http://ode.apache.org/activityRecovery">

              <ext:faultOnFailure>false</ext:faultOnFailure>

              <ext:retryFor>3</ext:retryFor>

              <ext:retryDelay>5</ext:retryDelay>

         </ext:failureHandling>

    </bpel:invoke>

     

    {code}

     

    For more info on activity failure/recovery please see: http://ode.apache.org/activity-failure-and-recovery.html

     

    Hope this helps.

     

    Regards

    Marek

  • 2. Re: Failover for invoke activities
    anuj bhatia Newbie

    Thanks for confirming and providing this additional info Marek. I'll do some more testing and give an update.

  • 3. Re: Failover for invoke activities
    Jeff Yu Master

    Yeah, please use the acvitity recover feature that Marek suggested for this case. INVOKE and WAIT activity has been implemented differently here.