Fault handling in dynamic Split-Join in OSB

Without appropriate Error-Handling logic, the first fault thrown by a service invocation within any one of the Split-Join's threads will re-raise in the Split-Join and halt the entire message flow.

In order to prevent this, Catch clauses need to be added to the scope of each thread as shown next.

How to do it...

  1. Right-click on the loop's scope and select Add Catch.
    How to do it...
  2. Select the new Catch block, label it with the name of the fault you wish to catch and then review the Properties tab.
  3. Click on <Soap Fault Variable Name> and assign any name you like (the default is simply soapFault which should be fine).
  4. Repeat this step for each expected Soap Fault.
  5. Select Define Fault and enter the fault name and namespace of the fault you expect to catch.
  6. Drag in a new Scope below the Catch and add any mitigation actions as necessary to resolve the fault. It may be appropriate to do nothing. Simply log the error, or perhaps aggregate a default value into the total. All variables available within the normal scope are also available to you within the Catch block.
  7. Optionally, add a Catch All clause to the loop to capture any unexpected faults.

How it works…

Fault handling within a Split-Join in OSB is very similar to fault handling in proxy services. One simply has to define a Catch block for the appropriate scope and mitigate each fault appropriately.

By handling faults within the For loop, we ensure that each of the individual threads is managed separately, without impacting the rest of the batch.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.151.164