Help Centre › Building Processes
This article describes the RPA Database functionality to start a database transaction.
For a full list of available functions, please read DATABASE functions.
Description
The Begin transaction function starts a database transaction, disabling autocommit until the transaction is committed or rolled back. All subsequent database operations on this connection will be part of the transaction.
Setting it up
To use the Begin transaction function, follow these instructions:
{{popups:rpas/add:action=db-begin-transaction}}
Once on a process map:
- Navigate to the process where you would like to add the Begin transaction function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the Begin transaction option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Name | Yes | Text | - | The alias of a previously opened connection (from db-connect) |
Output variables
This action does not produce output variables.
Errors
| Error | Description |
|---|---|
| Connection not found | No open connection exists with the specified name |
Tips
- Always pair Begin transaction with either Commit or Rollback to complete the transaction
- Use transactions for multi-step data changes that must succeed or fail together
- Place a Rollback action in a try-catch error handler to undo changes on failure