3.2.7.16 Enlistment Phase One Complete

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

  • An Enlistment object.

  • A value indicating the enlistment's outcome for Phase One (section 1.3.1.2). This value MUST be set to one of the following values:

    • Committed

    • Aborted

    • In Doubt

    • Read Only

    • Prepared

If the Enlistment Phase One Complete event is signaled, the Core Transaction Manager Facet (section 1.3.3.3.1) MUST perform the following actions:

  • If the transaction's Doomed flag is set to TRUE or the transaction state is Aborting (section 3.2.1.3.11), the Core Transaction Manager Facet (section 1.3.3.3.1) MUST ignore the signal.

  • Otherwise:

    • Remove the enlistment from the transaction's Phase One Enlistment list.

    • If the transaction state is Single Phase Commit (section 3.2.1.3.9):

      • If the enlistment's Phase One outcome is Committed:

        • Set the transaction's state to Phase One Complete (section 3.2.1.3.8).

        • Signal the Phase One Complete (section 3.4.7.13) event on the transaction's Superior Enlistment's Transaction Manager facet with the following arguments:

          • The transaction's Superior Enlistment object

          • The Committed outcome

        • Signal the Begin Commit (section 3.2.7.2) event on the Core Transaction Manager Facet with the provided transaction object.

        • Cease processing the event.

      • Otherwise, if the Enlistment's Phase One outcome is Read Only:

        • Signal the Phase One Complete event on the Transaction Manager Facet of the transaction's Superior Enlistment with the following arguments:

          • The transaction's Superior Enlistment object

          • The Read Only outcome

        • Signal the Forget Transaction (section 3.2.7.22) event on the Core Transaction Manager Facet with the provided transaction object.

      • Otherwise, if the enlistment's Phase One outcome is In Doubt (section 3.2.1.3.12):

        • Set the transaction's state to Phase One Complete.

        • Signal the Phase One Complete event on the transaction's Superior Enlistment's Transaction Manager facet with the following arguments:

        • Signal the Begin In Doubt (section 3.2.7.3) event on the Core Transaction Manager Facet with the provided transaction object.

        • Cease processing the event.

    • If the transaction state is Phase One or Single Phase Commit:

      • If the enlistment's Phase One outcome is Aborted:

        • Set the transaction's Doomed flag to TRUE.

        • Signal the Phase One Complete event on the transaction's Superior Enlistment's Transaction Manager facet with the following arguments:

          • The transaction's Superior Enlistment object

          • The Aborted outcome

        • Signal the Notify Aborted (section 3.2.7.23) event on the Core Transaction Manager Facet with the provided transaction object.

        • Cease processing the event.

      • Otherwise, if the Enlistment's Phase One outcome is Prepared:

        • Add the Enlistment to the transaction's Phase Two Enlistment list.

        • Set the transaction's state to Phase One Complete.

    • If both the transaction's Phase One Voter Enlistment list and Phase One Enlistment list are now empty:

      • Signal the Phase One Completed (section 3.2.7.25) event on the Core Transaction Manager Facet (section 1.3.3.3.1) with the provided transaction object.