An IDoc corresponds to a single business object. The adapter can
process an ALE event that contains just one IDoc.
The
following steps describe how the adapter processes an inbound event for a
single IDoc.
- When the SAP system pushes the Transaction ID (TID) to the adapter, the
adapter checks the status of the event.
- If this is a new event, the adapter stores the TID along with a status
of CREATED in the event recovery table.
- If the event status is ROLLBACK, the adapter updates
the status to CREATED.
- If the event status is EXECUTED, the adapter returns
a return code of SUCCESS to the SAP system.
- The SAP system pushes the single IDoc to the adapter, which parses and
converts the IDoc to a business object and stores it in memory.
- The adapter sends the business object to the appropriate message endpoint.
Note that the adapter can deliver objects to endpoints that support transactions
as well as endpoints that do not support transactions:
- For endpoints that support transactions, the adapter delivers the business
object as part of a unique XA transaction (a two-phase commit transaction)
controlled by the application server. When the endpoint receives the event
and the transaction is committed, the status of the event is updated to EXECUTED.
The message endpoint must be configured to support XA transactions.
- For endpoints that do not support transactions, the adapter delivers the
business object to the endpoint and updates the status of the event to EXECUTED.
- If an exception occurs while either the adapter processes the event or
the endpoint receives the object, the adapter throws an exception to the SAP
system.
- The SAP system sends a ROLLBACK call to the adapter and
the event status is updated to ROLLBACK.
- If no exception occurs, the SAP system sends a COMMIT call
to the adapter, and the event is updated to EXECUTED.
- The SAP system sends a CONFIRM call to the adapter.
- The adapter deletes the records with an EXECUTED status
and logs a common event infrastructure (CEI) event that can be used for tracking
and auditing purposes.