WebSphere Adapter for SAP Software

Event processing for split, parsed IDoc packets

A split IDoc packet contains multiple IDocs, with each IDoc corresponding to a single business object.

The adapter processes an inbound event for an IDoc packet that contains multiple individual IDocs according to the following procedures:
  1. When the SAP system sends the transaction ID to the adapter, the adapter checks the status of the event and takes one of the following actions:
    • If this is a new event, the adapter stores an EVNTID (which corresponds to the transaction ID) along with a status of 0 (Created) in the event recovery table.
    • If the event status is -1 (Rollback), the adapter updates the status to 0 (Created).
    • If the event status is 1 (Executed), the adapter returns an indication of success to the SAP system.
  2. The SAP system sends the IDoc packet to the adapter, which parses it and converts the IDoc into multiple business objects and stores them in memory.
  3. The adapter updates the BQTOTAL column (or table field) in the event recovery table to the number of IDocs in the packet. This number is used for audit and recovery purposes.
  4. If the adapter encounters an error while processing the IDoc packet, it can behave in one of two ways, depending on the IgnoreIDocPacketErrors configuration property:
    • If the IgnoreIDocPacketErrors property is set to false, the adapter stops processing any additional IDocs in the packet and reports errors to the SAP system.
    • If the IgnoreIDocPacketErrors property is set to true, the adapter logs an error and continues processing the rest of the IDocs in the packet. The status of the transaction is marked 3 (InProgress). In this case, the adapter log shows the IDoc numbers that failed, and you must resubmit those individual IDocs separately. You must also manually maintain these records in the event recovery table.
  5. The SAP system sends a COMMIT call to the adapter.
  6. The adapter sends the business objects to the message endpoint, one after the other, and updates the BQPROC property to the sequence number of the IDoc it is working on. The adapter delivers the objects to the appropriate endpoint as part of a unique XA transaction (a two-phase commit transaction) controlled by the application server.
  7. When the endpoint receives the event and the transaction is committed, the adapter increments the number in the BQPROC property.
    Note: The message endpoint must be configured to support XA transactions.
  8. After the adapter delivers all the business objects in the IDoc packet to the message endpoint, it updates the event status to 1 (Executed).
  9. In case of abrupt interruptions during IDoc packet processing, the adapter resumes processing the IDocs from the current sequence number. The adapter continues updating the BQPROC property, even if IgnoreIDocPacketErrors is set to true. The adapter continues the processing in case you terminate the adapter manually while the adapter is processing an IDoc packet.
  10. If an exception occurs either while the adapter is processesing the event or if the endpoint generates an exception, the event status is updated to -1 (Rollback).
  11. If no exception occurs, the adapter performs the following tasks:
    • It sends a COMMIT call to the adapter, and the event is updated to 1 (Executed).
    • It sends a CONFIRM call to the adapter.

    The adapter then deletes the records with a 1 (Executed) status and logs a common event infrastructure (CEI) event that can be used for tracking and auditing purposes.


Terms of use |

Last updated: Mon 30 Oct 2006 03:34:55

(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)