txn.Rollback

This method is supported by Operations starting from version 2.6.3.

This method rolls a transaction back.

There are the following scenarios how a transaction can be rolled back:

  • During a transaction several methods are called and the last method fails with error. In this case Operations automatically rolls the transaction back.
  • During a transaction several methods are called and all methods are executed successfully. In this case the transaction can be rolled back with the help of the tnx.Rollback method.

The method has the following input parameters:

Name

Type

Short Description

txn_id

string

Transaction ID.

The method has no output parameters.