Roll Back Transaction
AutomatR.MSSQLDataBase.Database.RollBackTransaction
The "Roll Back Transaction" activity in AutomatR for SQL Server databases allows you to roll back a transaction initiated by the "Start Transaction" activity. This activity is crucial for ensuring data integrity by undoing any changes made during the transaction in case of errors or other exceptional situations.
Properties
Name | Description |
---|---|
Misc | |
DisplayName | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Roll Back Transaction" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
How to use:
- Drag and drop the "Roll Back Transaction" activity onto the workflow.
- Optionally, configure the delay for synchronization purposes.
- Ensure that the "Roll Back Transaction" activity is placed within the scope of the "Start Transaction" activity to specify the transaction to roll back.
- Execute the workflow to roll back the initiated transaction in case of errors or exceptional situations.
Example: Consider an example where the "Roll Back Transaction" activity is used to roll back a transaction initiated by the "Start Transaction" activity:
Roll Back Transaction:
Delay: 0
In this example, the activity immediately rolls back the transaction, undoing any changes made during the transaction. The delay is set to 0, indicating that the roll back should occur without any additional waiting time.