Block Transaction Mode

The block transaction mode requires explicit <tx> tags around all of the requests in a transaction.

The block transaction is sent as one XML request, and all requests contained within the block are executed in sequence within a database transaction. If any request fails, then the entire transaction is automatically rolled back. If all requests are successful, then the transaction is automatically committed.

If a block transaction fails, then the request within the block that encountered an error will have the appropriate error code set. All requests after the failed request will have the error code set to NOT_PROCESSED. Any requests before the failed request will indicate success, and the number of affected rows.

All transactions must also satisfy limits indicated by the Max Transaction Size, Maximum Transaction Lifetime, and Transaction Durability Timeout system variables, which are defined in XML/SOAP Interface System Variables. If any of those limits are exceeded, the transaction is aborted and automatically rolled back.

Note:

A block transaction cannot be sent in the context of a normal database transaction, for example, after a <startTransaction/> request has been sent and before a <commit/> or <rollback/> request is sent. Normal database transaction requests, such as <startTransaction/>, <commit/> or <rollback/>, cannot be sent within a block transaction. If any normal requests are sent, then the block transaction fails with an INV_REQ_IN_BLOCK_TX error.

When incrementing measurements related to block transactions, the whole block is treated as a single provisioning command. If a block contains four requests (such as <updateSubscriber>), then the subsequent measurements are incremented by one.