Interactive Application Transaction Processing Scenarios
The typical flow for a transaction is:
An application starts and calls the runtime engine.
The runtime engine initializes the transaction.
The runtime engine opens a view.
The runtime engine performs database operations.
The runtime engine commits database operations.
To include two connected forms in the same transaction boundary, you must activate transaction processing for the parent form and designate Include in parent on the interconnection to the second form. You do not need to activate transaction processing for the second form because your choice on the originating form overrides your choice on the called form.
This table outlines the relationship between two forms and the transaction boundaries that exist in each scenario. Transactions can be started in one form and extended to more forms through form interconnects and business function calls. In the example, the OK button on Form 1 invokes Form 2. You can change the transaction boundaries by specifying TP On or TP Off. The table explains what happens when you define your transaction boundary in various ways.
Scenario |
Forms |
TP On |
TP Off |
"Include in Parent" flag On for Form Interconnect, BSFN, Table I/O |
Comments |
---|---|---|---|---|---|
A |
Form 1 Form 2 |
X X |
All forms use Auto Commit. |
||
B |
Form 1 Form 2 |
X X |
X |
Because neither form uses Manual Commit, the Include in Parent flag on Form Interconnect Properties is ignored. All forms use Auto Commit |
|
C |
Form 1 Form 2 |
X O |
O X |
Form 1 (parent) uses Manual Commit mode, and Form 2 (child) uses Auto Commit. Because the Include in Parent flag is Off, the transaction boundary does not extend to include Form 2 (child) |
|
D |
Form 1 Form 2 |
X O |
O X |
X |
Even though the transaction processing flag is Off for Form 2 (child), the Include in Parent flag is On. The transaction boundary extends to include Form 2 (child) |
E |
Form 1 Form 2 |
O X |
X O |
Because the Include in Parent flag is Off, Form 1 (parent) and Form 2 (child) operate as independent entities. Form 1 operates in Auto Commit mode and Form 2 operates in Manual Commit mode. |
|
F |
Form 1 Form 2 |
O X |
X O |
X |
An atypical case. Because transaction processing is Off on Form 1 (parent), the transaction boundary does not extend to the child, even though the Include in Parent flag is On for Form 2 (child) Form 2 (child) is in Manual Commit mode and the interconnect flag is ignored. |
G |
Form 1 Form 2 |
X X |
Transaction processing is On for both forms. Because in Include in Parent flag is Off, each form is a transaction boundary and a commit is issued for each. |
||
H |
Form 1 Form 2 |
X X |
X |
Transaction processing is On for both forms. However, because the Include in Parent flag is On, one transaction will incorporate both forms. The transaction boundary encompasses both forms. Form 2 is a child of Form 1. |