1 / 12

Fault Handling

Fault Handling. Activities covered: Scope Throw Catch Sensor. Fault. Fault is an disturbance occurred during the happy path execution of a process which result in a signal being sent from the system. Disturbance can for various reason like Technical Error Programming Error

zuzana
Download Presentation

Fault Handling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fault Handling • Activities covered: • Scope • Throw • Catch • Sensor

  2. Fault • Fault is an disturbance occurred during the happy path execution of a process which result in a signal being sent from the system. • Disturbance can for various reason like • Technical Error • Programming Error • Faulty Operation by Client • Exceptional business behavior • Fault Handling allows a BPEL process service component to handle error messages or other exceptions returned by outside web services, and to generate error messages in response to business or runtime faults. • You can also define a fault management framework to catch faults and perform user-specified actions defined in a fault policy file.

  3. Fault Types • Business Faults: Fault generated in business scenario’s. • 1. From Partner Link • 2. From Process • Technical Faults: Faults generated from system • 1. Standard Faults • 2. Runtime Faults • - Binding Fault • - Remote Fault

  4. Business Fault • Business faults are application-specific faults that are generated when there is a problem with the information being processed (for example, when a social security number is not found in the database). • A business fault occurs when an application executes a throw activity or when an invoke activity receives a fault as a response. The fault name of a business fault is specified by the BPEL process service component • The messageType, if applicable, is defined in the WSDL. A business fault can be caught with a faultHandler using the faultName and a faultVariable. • <catch faultName="ns1:faultName" faultVariable="varName">

  5. Cont… <wsdl:operation name="orderProduct"> <wsdl:input message="order:OrderProductRequestMessage"/> <wsdl:output message="order:OrderProductResponseMessage"/> <wsdl:fault message="order:ProductNotInStockFaultMessage" name="ProductNotInStockFault"/> <wsdl:fault message="order:CustomerNotFoundFaultMessage" name="CustomerNotFoundFault"/> </wsdl:operation> <xsd:element name="CustomerNotFoundFaultMessage"> <xsd:complexType> <xsd:sequence> <xsd:element name="CustName" type="xsd:string"/> <xsd:element name="City" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> 1.Service contract including fault 2. Fault message payload

  6. Cont… <soap:Envelope> <soap:Header/> <soap:Body> <soap:Fault> <faultcode>CST-1234</faultcode> <faultstring>Customer not found</faultstring> <detail> <CustomerNotFoundFault> <CustName>John Doe</CustName> <City>Long Beach</City> </CustomerNotFoundFault> </detail> </soap:Fault> </soap:Body> </soap:Envelope> 3Actual service response

  7. Technical Fault – Standard fault • Standard Faults: Are the faults that directly from BPEL Specification. • BPEL4WS specification defines the following standard faults in the namespace of http://schemas.xmlsoap.org/ws/2003/03/business-process/ • Standard faults are defined as follows: • Typeless, meaning they do not have associated messageTypes • Not associated with any Web Services Description Language (WSDL) message • Caught without a fault variable • <catch faultName="bpws:selectionFailure">

  8. Cont… • bindingFault and remoteFault(BPEL extension fault defined in http://schemas.oracle.com/bpel/extension) • conflictingReceive • conflictingRequest • correlationViolation • forcedTermination • invalidReply • joinFailure • mismatchedAssignmentFailure • repeatedCompensation • ambiguousReceive • completionConditionFailure • invalidBranchCondition • invalidExpressionValue • invalidVariables • missingReply • missingRequest • scopeInitializationFailure • selectionFailure • uninitializedPartnerRole • uninitializedVariable • unsupportedReference • xsltInvalidSource • xsltStylesheetNotFound

  9. Technical Fault – Runtime Fault • Runtime Faults: • - Runtime faults are the result of problems within the running of the BPEL component. • Runtime faults are not user-defined, and are thrown by the system. We need to define parts in the process to handle them. • Are generated if the process tries to use a value incorrectly, a logic error occurs (such as an endless loop), a Simple Object Access Protocol (SOAP) fault occurs in a SOAP call, an exception is thrown by the server, and so on • In BPEL we will use catch activity to handle them. <soap:Body> <soap:Fault> <faultcode>S:Server</faultcode> <faultstring>Could not connect to URL 127.0.0.1 on port 8001</faultstring> </soap:Fault> </soap:Body> Actual service response

  10. Cont… Binding Fault Binding Fault A binding fault is thrown inside an activity if the preparation of the invocation fails. A bindingFault is not retryable. This type of fault usually must be fixed by human intervention. Eg: the WSDL of the process fails to load.

  11. E.g. of Binding Faults

  12. Cont… Remote Fault 2. Remote Fault A remoteFault is also thrown inside an activity. A remoteFault can be configured to be retried Thrown because the invocation fails. Eg: SOAP fault is returned by the remote service.

More Related