Transaction Scope

Estimated reading: 2 minutes

The Transaction Scope activity enables you to execute a set of operations as a single unit of work. It is particularly useful for handling critical operations that require data consistency, such as database updates or financial transactions.

Structure

The Transaction Scope contains one main section:

a. Body: Contains all activities that participate in the transaction.

Properties

DisplayName: Displays the name of the activity. This can be customized to improve readability and troubleshooting.

Abort Instance On Transaction: Determines whether the entire workflow should stop if the transaction fails.
Checked: Stops the workflow immediately on failure.
Unchecked: Continues the workflow even after failure.

Isolation Level: Defines how a transaction interacts with other transactions.

a. Serializable: Ensures complete data accuracy; no other transaction can read or modify data until completion.
b. Repeatable Read: Prevents changes to already read data but allows new rows to be added.
c. Read Committed: Reads only committed data; changes may occur during execution.
d. Read Uncommitted: Allows reading uncommitted data; fastest but least reliable.
e. Snapshot: Uses a fixed snapshot of data; ensures consistent reads without locking.
f. Chaos: Prevents conflicts with higher-level transactions; rarely used.
g. Unspecified: Uses the default isolation behavior of the system.

Timeout: Defines the maximum time the transaction is allowed to execute before it is automatically cancelled. Example: 00:01:00 (1 minute)

How Transaction Scope Works

On the workflow canvas, the Transaction Scope contains only the Body section where all transactional activities are placed.

Component Overview Behavior
Body Represents all activities that participate in the transaction. Executes all activities as a single unit of work. If all activities complete successfully, the transaction is committed and changes are saved. If any activity fails, the transaction is rolled back, and no partial changes are retained.

Example: Using Transaction Scope

This example shows how the Transaction Scope manages multiple database operations within a single transaction.

Steps

1. Add the Transaction Scope activity to a new workflow.
2. In the Body section, add the following activities:
a. Add an Insert Row, Update Row and Delete Row activity.

These activities simulate a process where multiple database operations are performed as part of a single transaction.

Expected: The transaction commits only when all activities execute successfully; otherwise, all changes are rolled back.

Share this Doc

Transaction Scope

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online