Navigation: ABC Library Reference > TransactionManager > TransactionManager Methods >====== Finish (rollback or commit transaction) ====== | |
Finish( errorlevel )
Finish | Completes the transaction processing |
errorlevel | An integer constant, variable, EQUATE, or expression that sets the current error level, and determines the success of the transaction process. |
Finish completes the TransactionManager process. Using the errorlevel value it will rollback or commit the transaction. An errorlevel of Level:Benign will commit (complete) the transaction, where any other errorlevel set will force a rollback (cancellation) of the transaction.
Implementation:
The Finish method should be called in the TakeCompleted method to validate a transaction. During a process, it can be called at any time to commit or rollback a batch of records processed. The method calls either the TransactionCommit or TransactionRollback methods in order to complete the transaction process.
Example:
ReturnValue = PARENT.TakeCompleted()
! A ReturnValue other than Level:Benign will rollback the transaction
IF SELF.Request<;>ViewRecord
Transaction.Finish(ReturnValue)
END
RETURN ReturnValue
END
See Also: Start, TransactionCommit, TransactionRollback