Skip Headers
Oracle® Application Server Integration B2B User's Guide
10g Release 2 (10.1.2.0.2)
B19370-01
  Go To Table Of Contents
Contents
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Index
Index

Previous
Previous
Next
Next
 

B Exception Handling

OracleAS Integration B2B handles exceptions for inbound and outbound messages. This appendix describes the exception handling, error messages, and structures for OracleAS Integration B2B.

This appendix contains the following topics:

Inbound Messages

This section describes the following inbound message types:

Request or Response Messages

For an incoming request or response message that results in an exception, the following actions occur:

  • An exception message is sent to the application.

    The exception message is enqueued to B2B_IN_QUEUE and has the recipient name b2berroruser. The enqueued exception is based on ipException.xsd and contains information such as the error message (errorText has a short description and errorDescription has a longer description) and the error code.

  • An exception message is sent to the trading partner, if mandated by the exchange specification.

    The exception message is sent back to the trading partner only if there is enough information to identify the outgoing trading partner agreement. For this purpose, the flag B2BHeader.sendException is used. The flag is set to true when enough information is extracted from the incoming message to send the exception message to the trading partner.

  • OracleAS Integration B2B catches exceptions thrown by exchange or document layers.

    If the B2Bheader.sendException flag is set to true, the outgoing trading partner agreement is processed and an exception message is sent to the trading partner.

Acknowledgment Messages

For an incoming acknowledgment message that results in an exception, the following actions occur:

  • An exception message is sent to the application.

    The exception message is enqueued to B2B_IN_QUEUE and has the recipient name b2berroruser. The enqueued exception is based on ipException.xsd and contains information such as error text and error code.

  • No exception message is sent back to the trading partner.

Exception Messages

For an incoming exception message, the following actions occur:

  • The original message is updated so that it is in an errored state. The incoming exception is processed and delivered to the application normally.

  • If the incoming exception message itself results in an exception, an exception message is sent to the application.

    The exception message is enqueued to B2B_IN_QUEUE and has the recipient name b2berroruser. The enqueued exception is based on ipException.xsd and contains information such as error text and error code. No exception message is sent back to the trading partner in this case.

Outbound Messages

If an exception occurs while an outbound message is being sent (for example, if the trading partner identification fails), then an exception message is sent to the application. The exception message is enqueued to B2B_IN_QUEUE and has the recipient name b2berroruser. The enqueued exception is based on ipException.xsd and contains information such as error text and error code.

If an exception occurs during OracleAS Integration B2B startup, then an exception message is enqueued to B2B_IN_QUEUE and has the recipient name b2berroruser. The enqueued exception is based on ipException.xsd and contains information such as error text and error code. The correlation ID is not populated in this case.

Note the following:

Inbound Exception Handling Scenarios

Table B-1 describes inbound exception handling scenarios.

Table B-1 Inbound Exception Handling Scenarios

If an exception occurs because. . . Then OracleAS Integration B2B does . . .

The identification of the exchange fails or the exchange is not supported

  • Notifies the middleware

  • Updates the wire message as in an errored state

  • Creates a business message in an errored state for the wire message

  • Sends a transport error message to the trading partner

Message unpacking fails

  • Notifies the middleware

  • Updates the wire message as in an errored state

  • Creates a business message in an errored state for the wire message

Incoming message decoding fails

  • Notifies the middleware

  • Updates the wire message as in an errored state

  • Creates a business message in an errored state for the wire message

  • Sends an exception message to the trading partner, if the sendException flag is set in the exchange layer

The message is duplicated

  • Notifies the middleware

  • Updates the wire message as a duplicated message error

  • Creates a business message as a duplicated message error for the wire message

Document identification fails

  • Notifies the middleware

  • Updates the wire message as in an errored state

  • Creates a business message in an errored state for the wire message

  • Sends an exception message to the trading partner, if the sendException flag is set in the exchange layer

Incoming trading partner agreement processing fails

  • Notifies the middleware

  • Updates the wire message as in an errored state

  • Creates a business message in an errored state for the wire message

  • Sends an exception message to the trading partner, if the sendException flag is set in the exchange layer

Incoming document processing fails

  • Notifies the middleware

  • Updates the wire message as in an errored state

  • Creates a business message in an errored state for the wire message

  • Sends an exception message to the trading partner, if the sendException flag is set in the exchange layer


Note the following:

Exception Payload Definition

The exception payload, ipException.xsd, is defined as follows:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://integration.oracle.com/B2B/Exception" targetNamespace="http://integration.oracle.com/B2B/Exception">
 
  <xs:element name="Exception">
    <!--xs:complexType name="Exception"-->
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="correlationId"/>
        <xs:element ref="b2bMessageId"/>
        <xs:element ref="errorCode"/>
        <xs:element ref="errorText"/>
        <xs:element ref="errorDescription"/>
        <xs:element ref="errorSeverity"/>
        <xs:element ref="errorDetails" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="correlationId" type="xs:string"/>
  <xs:element name="b2bMessageId" type="xs:string"/>
  <xs:element name="errorCode" type="xs:string"/>
  <xs:element name="errorText" type="xs:string"/>
  <xs:element name="errorDescription" type="xs:string"/>
  <xs:element name="errorSeverity" type="xs:string"/>
  <xs:element name="errorDetails">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="parameter" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="parameter">
    <xs:complexType>
      <xs:attribute name="name" type="xs:string" use="required" /> 
      <xs:attribute name="value" type="xs:string" use="required" /> 
    </xs:complexType>
  </xs:element>
</xs:schema>