User Tools

Site Tools


finish_rollback_or_commit_transaction_.htm
Navigation:  ABC Library Reference > TransactionManager > TransactionManager Methods >====== Finish (rollback or commit transaction) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Finish( errorlevel )

blk2blue.jpg

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

finish_rollback_or_commit_transaction_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1