3.2.7.17 Enlistment Phase Zero Complete
The Enlistment Phase Zero Complete event MUST be signaled with the following arguments:
An Enlistment object.
A value indicating the enlistment's outcome for Phase Zero (section 1.3.1.1). This value MUST be set to one of the following values:
Completed
Aborted
If the Enlistment Phase Zero Complete event is signaled, the Core Transaction Manager Facet (section 1.3.3.3.1) MUST perform the following actions:
Remove the enlistment from the transaction's Phase Zero Enlistments list.
If the enlistment's Phase Zero outcome is Aborted:
Set the transaction's Doomed flag to TRUE.
If the transaction's Phase Zero Enlistments list is now empty:
Set the transaction's state to Phase Zero Complete (section 3.2.1.3.4).
If the transaction's Doomed flag is set to true:
Signal the Phase Zero Complete (section 3.8.7.6) event on the transaction's Superior Enlistment's Transaction Manager facet with the following arguments:
The transaction's Superior Enlistment object
The Failure outcome
Signal the Notify Aborted (section 3.2.7.23) event on the Core Transaction Manager Facet with the provided transaction object.
Otherwise:
If the transaction's Root flag is TRUE:
If the transaction's Next Phase Zero Wave Enlistment list is not empty:
Otherwise:
Signal the Phase Zero Complete event on the transaction's Superior Enlistment's Transaction Manager facet with the following arguments:
The transaction's Superior Enlistment object
The Success outcome
Otherwise, if the transaction's Root flag is FALSE:
If the transaction's Next Phase Zero Wave Enlistment list is not empty:
Set the transaction's state to Active.
Signal the Phase Zero Complete event on the transaction's Superior Enlistment's Transaction Manager facet with the following arguments:
The transaction's Superior Enlistment object
The Success outcome