DATABASE Rollback transaction function

Rollback the current database transaction, undoing all changes.

Help CentreBuilding Processes

This article describes the RPA Database functionality to rollback a database transaction.

For a full list of available functions, please read DATABASE functions.


Description

The Rollback transaction function rolls back the current database transaction, undoing all changes made since the transaction began. The connection returns to autocommit mode after the rollback.


Setting it up

To use the Rollback transaction function, follow these instructions:

{{popups:rpas/add:action=db-rollback}}

Once on a process map:

  1. Navigate to the process where you would like to add the Rollback transaction function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the Rollback transaction option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
NameYesText-The alias of a previously opened connection (from db-connect)

Output variables

This action does not produce output variables.


Errors

ErrorDescription
Connection not foundNo open connection exists with the specified name
No active transactionThere is no active transaction to rollback on this connection

Tips

  • Use Rollback in error handlers within try-catch blocks to undo changes when something goes wrong
  • Always pair with Begin transaction

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.