Logical Unit of Work Begin

The Logical Unit of Work Begin action indicates the beginning of a logical unit of work for a group of transactions. This action returns a logical unit of work identifier (LUWid) that is used to indicate that a Transaction action is part of this unit of work.

The corresponding Logical Unit of Work Commit and Logical Unit of Work Rollback actions are used to indicate the termination point of the unit of work.

Assumptions

The following is assumed:

  • You are familiar with the concept of a logical unit of work as it relates to a relational database.

Parameter descriptions

Parameter Description
Transport Name This parameter provides a list of transports for the node. Select a transport from the list to indicate the database with which you want to start the logical unit of work.

Database transport definition connection pool size

When the Logical Unit of Work Begin action executes, the Transaction Server reserves a connection from the transport's connection pool in order to process transactions associated with this logical unit of work. To allow database transactions outside of a logical unit of work to be processed, the Transaction Server does not allow the last available connection to be reserved. In this condition, the Logical Unit of Work Begin action will fail. Make sure that the connection pool size of the selected transport is set to 2 (at a minimum). However, depending on your application design you should set this value higher based on how many logical unit of work and non-logical unit of work transactions you anticipate executing concurrently.

Slow database connection times

When a transport is loaded at initialization, it establishes the number of connection defined by the transport pool size. If the time to connect to the database is relatively slow, then a Logical Unit of Work Begin action in a trigger may execute before all of the transport's connections have been established. In this case, the Logical Unit of Work Begin action may timeout and need to be retried.

LOCALDB

The Logical Unit of Work feature cannot be used with the LOCALDB transports including LOCALDB through LOCALDB5.

Output tab

Parameter Description
Identifier The 36 character globally unique identifier (GUID) that is the unique identifier for this logical unit of work.
The string is used in the LUWId input parameter of a Transaction action to have it execute as part of this logical unit of work.

Multiple logical units of work can be in process concurrently. The Transaction actions indicate if they are of a logical unit of work with their LUWid parameter.
If a Transaction action is not part of a logical unit of work, the LUWid parameter is left blank.
Related topics

Using a logical unit of work

Logical Unit of Work Commit

Logical Unit of Work Rollback