3.3.5.1.1 Receiving a TXUSER_TIPPROXYGATEWAY_MTAG_PULL or a TXUSER_TIPPROXYGATEWAY_MTAG_PULL2 Message
When the TIP interoperability provider receives one of these messages, it MUST perform the following actions:
If the connection state is Idle:
If the Allow TIP flag of the Core Transaction Manager Facet ([MS-DTCO] section 3.2.1) is set to FALSE<5>:
If the UsesVersion11 flag of the connection is TRUE:
Send a TXUSER_TIPPROXYGATEWAY_MTAG_PULLERROR message using the current connection:
The Error field MUST be set to the TRUN_TIPPROXYGATEWAY_PULLERROR_TIPDISABLED member of the TRUN_TIPPROXYGATEWAY_PULLERROR enumeration.
Otherwise, if the UsesVersion11 flag is FALSE:
Send a TXUSER_TIPPROXYGATEWAY_MTAG_PULLERROR message by using the current connection:
The Error field MUST be set to the TRUN_TIPPROXYGATEWAY_PULLERROR_TIPERROR member of the TRUN_TIPPROXYGATEWAY_PULLERROR enumeration.
Set the connection state to Ended.
Otherwise, if the TIP interoperability provider does not have sufficient memory available to process the message:
Send a TXUSER_TIPPROXYGATEWAY_MTAG_PULLERROR message.
The Error field MUST be set to the TRUN_TIPPROXYGATEWAY_PULLERROR_TIPERROR member of the TRUN_TIPPROXYGATEWAY_PULLERROR enumeration.
Set the connection state to Ended.
Otherwise:
If the fAsync message field is 0x00000001:
Send a TXUSER_TIPPROXYGATEWAY_MTAG_PULLED message to the application.
The guidTx field MUST be set to the value of the szTxId field of the OLETX_TIP_TX_ID structure contained in the tipTxId field of the XUSER_TIPPROXYGATEWAY_MTAG_PULL or the XUSER_TIPPROXYGATEWAY_MTAG_PULL2 message.<6>
Construct a TIP URL value by using the data in the tipTxId and tipTmId fields from the message to obtain its transaction manager address and transaction string, respectively. (More information is specified in [RFC2371] section 8.)
Use the TIP URL value as a key in the TIP transaction table to find the associated transaction object.
If the transaction object is found in the TIP transaction table:
If the fAsync message field is 0x00000001:
Send a TXUSER_TIPPROXYGATEWAY_MTAG_PULL_ASYNC_COMPLETE message using the current connection.
If the fAsync message field is 0x00000000:
Send a TXUSER_TIPPROXYGATEWAY_MTAG_PULLED message using the connection.
The guidTx field MUST be set to the identifier of the transaction object that is found in the TIP transaction table.
Set the connection state to Ended.
Otherwise, if the transaction object is not found in the TIP transaction table, the TIP interoperability provider MUST:
Set the connection state as follows:
If the fAsync message field is 0x00000000:
Set the connection state to Awaiting Sync Pull Response.
Otherwise, if the fAsync message field is 0x00000001:
Set the connection state to Awaiting Async Pull Response.
Create a new transaction object with the default properties (more information is specified in [MS-DTCO] section 3.2.3.1), and set the following fields:
Set the RemoteTipTransactionUrl field to the TIP URL value.
Create a new GUID for the identifier field of the transaction object.
Add this connection to the transaction connection list. (More information is specified in [MS-DTCO] section 3.1.1.)
Add the new transaction object to the TIP transaction table under the following key:
The TIP URL value
Signal the Pull TIP Transaction event on itself with the following argument:
The transaction object
Otherwise, the message MUST be processed as an invalid message, as specified in Common Message Processing Events and Sequencing Rules (section 3.1.5).