Fault Handling BPEL - 12c — oracle-tech

    Forum Stats

  • 3,701,023 Users
  • 2,239,262 Discussions
  • 7,834,978 Comments

Discussions

Fault Handling BPEL - 12c

37476093747609 Posts: 7

Hi All,

I was bit confused with the Oracle documentation. According to the below URL-1, the recommendation from Oracle is don't use below actions and these actions cause dehydration in a synchronous process and can lead to timeouts.

  • Retry
  • Human intervention
  • Terminate

URL-1 : https://docs.oracle.com/middleware/1221/soasuite/develop/GUID-FE546F09-E9DF-4859-AEF6-A1C7A3F40C75.htm#SOASE87868

But in the below URL-2, Starting with 12c, all web service SOAP faults are not automatically retried based on the fault code returned from the external service. SOAP faults are now retried only when the fault code is classified as server-related (also known as receiver-related). Fault codes classified as client-related do not result in retries. In 12c when a fault occurs in a reference binding component, the fault code is returned to a BPEL process. The fault is retried based on the setting in the fault code. This is beneficial because you may want to retry the fault only under specific circumstances (such as a system downtime issue). For all other fault occurrences (such as incorrect input), you may not want a retry to occur. In fact, retries on all SOAP faults can delay the processing of legitimate messages

URL-2: https://docs.oracle.com/middleware/1221/soasuite/develop/GUID-FE546F09-E9DF-4859-AEF6-A1C7A3F40C75.htm#SOASE88186

So what is the final approach we have to consider for the fault handling for synchronous processes ? Any inputs/thoughts would be appreciated.

Thanks !!

Tagged:

Answers

  • Martien van den AkkerMartien van den Akker Posts: 2,756 Bronze Crown
    edited July 2019

    Hi,

    I think, that for Synchronous Services, in most cases, you should just raise a SOAP Fault. You can add fault definitions in the WSDL that identify if the fault is retryable or not.

    If the Synchronous Service would invoke one or more database services, you might consider doing a retry. For instance, to prevent exceptions like 'Existing state of packages have been discarded'.

    The main thing to consider with Synchronous services is the Time Out. A Sync service is called as an atomic action. That means that the service client invokes and waits 'on-line' for the answer. In Weblogic terms: the thread executing that invoke is just 'actively' waiting, keeping resources.

    Now, if you do a retry, you normally would have a back-off. So you wait for a fixed interval of 30 seconds for instance, or you even do an exponential back-off, where you increase the interval. While retrying, the Time Out period may expire. The changes are high that it occurs. So in that case it does not make sense. What if a Time-out on the client side coincides with a successfull second or third retry? Then your client concludes it failed, but it may in fact actually have succeeded.

    Human Intervention, or terminate really do not make sence with Sync Services. With Human Intervention, the fault is reported in the Error Hospital for the Sys Admin to resolute. By the time he/she would pick it up, the client already timed out. With Terminate, the service wouldn't bother answering at al, so also resulting in a time out.

    In those cases it's best to raise a SOAP fault with a proper fault message and have the service client decide to do a retry or not.

    Regards,
    Martien

  • 37476093747609 Posts: 7
    edited July 2019

    Hi Martien,

    Thanks for your reply and much appreciated !!

    Yes we can add SOAPFault in WSDLs. In our case the the BPEL services are interacting with data services (OSB). So the retry can be considered in a right approach.

    Thanks for explaining about the exponential back-off. Have found a good article, before starting the discussion in forum-   Confessions of a Software Developer: Why in Oracle BPM/SOA Suite Attaching a Fault Policy to a Synchronous Service Is No…

    We have two use cases, the above statement suits when the design follows SOAP service based approach. But we are also implementing RESTful approach (both BPEL and OSB are RESTful).

    How to handle it and any thoughts on this ?

    According to you - In those cases it's best to raise a SOAP fault with a proper fault message and have the service client decide to do a retry or not. But in Oracle documentation it was mentioned that, Starting with 12c, all web service SOAP faults are not automatically retried based on the fault code returned from the external service. SOAP faults are now retried only when the fault code is classified as server-related (also known as receiver-related). Fault codes classified as client-related do not result in retries.

    It is not still clear for me.

    Thanks in advance.

    Regards,

    BR

  • Martien van den AkkerMartien van den Akker Posts: 2,756 Bronze Crown
    edited July 2019

    Hi BR,

    For the last remark I have to investigate and think about. For the REST services, instead of raising a SOAP Fault, they work with HTTP Response codes. On Twitter, Julia Evans did some interesting and revealing posts on those: https://twitter.com/b0rk/status/1145824140462608387

    Regards,
    Martien

Sign In or Register to comment.