3.4.7.13 Phase One Complete

The Phase One Complete event MUST be signaled with the following arguments:

  • An Enlistment object.

  • A value indicating the outcome of Phase One. The value MUST be set to one of the following values:

    • Read Only

    • Committed

    • Aborted

    • In Doubt

If the Phase One Complete event is signaled, the Transaction Manager Communicating with an Application Facet MUST perform the following actions:

  • If the provided outcome is Read Only or Committed:

    • If the transaction's connection list contains a connection of type CONNTYPE_TXUSER_BEGINNER (section 2.2.8.1.1):

      • Send a TXUSER_BEGINNER_MTAG_REQUEST_COMPLETED (section 2.2.8.1.1.9) message.

      • Set the connection state to Ended.

    • Otherwise, if the transaction's connection list contains a connection of type CONNTYPE_TXUSER_BEGIN2 (section 2.2.8.1.2) or CONNTYPE_TXUSER_PROMOTE (section 2.2.8.1.3):

      • Send a TXUSER_BEGIN2_MTAG_SINK_ERROR (section 2.2.8.1.2.5) message:

        • The Error field MUST be set to TRUN_TXBEGIN_ERROR_NOTIFY_COMMITTED.

      • Set the connection state to Ended.

  • Otherwise, if the provided outcome is Aborted:

    • If the transaction's connection list contains a connection of type CONNTYPE_TXUSER_BEGINNER (section 2.2.8.1.1):

      • If the connection state is Active:

        • Set the connection state to Aborting Transaction.

      • Otherwise, if the connection state is Aborting Transaction or Committing Transaction:

        • Send a TXUSER_BEGINNER_MTAG_REQUEST_COMPLETED (section 2.2.8.1.1.9) message.

        • Set the connection state to Ended.

      • Otherwise, ignore the event.

    • Otherwise, if the transaction's connection list contains a connection of type CONNTYPE_TXUSER_BEGIN2 (section 2.2.8.1.2) or CONNTYPE_TXUSER_PROMOTE (section 2.2.8.1.3):

      • Send a TXUSER_BEGIN2_MTAG_SINK_ERROR (section 2.2.8.1.2.5) message:

        • The Error field MUST be set to TRUN_TXBEGIN_ERROR_NOTIFY_ABORTED.

      • Set the connection state to Ended.

  • Otherwise, if the provided outcome is In Doubt:

    • If the transaction's connection list contains a CONNTYPE_TXUSER_BEGINNER (section 2.2.8.1.1) connection:

      • Send a TXUSER_BEGINNER_MTAG_COMMIT_INDOUBT (section 2.2.8.1.1.7) message.

      • Set the connection state to Ended.

    • Otherwise, if the transaction's connection list contains a CONNTYPE_TXUSER_BEGIN2 (section 2.2.8.1.2) connection:

      • Send a TXUSER_BEGIN2_MTAG_SINK_ERROR (section 2.2.8.1.2.5) message:

        • The Error field MUST be set to TRUN_TXBEGIN_ERROR_NOTIFY_INDOUBT.

      • Set the connection state to Ended.