States tab
This tab contains a table listing all configured states for the DTC protocol thread.
By default, DTC has two initial states: START and STOP. These are pre-filled on the dialog box. These states are required. They can be edited, but cannot be deleted by users. An icon before the state name indicates the state type: START, STOP, or user-defined.
Define the required states/stops for your message processing -- not the order, but only the steps.
A TPS generates transaction IDs. If left blank, then transaction IDs are auto-generated. This is independent of whether transactions are enabled.
Actions are optional, in which case the message is routed directly to the thread.
This tab contains these editing options:
-
Add DTC State dialog box. This has text fields for State Name, Action TPS, and Rollback TPS.
The TPS fields also have an TPS Editor dialog box for updating the TPS field.
button that opens the
opens the - Edit DTC State dialog box. This is the same as the Add DTC State dialog box, except it is populated with the selected DTC state. is enabled when a state is selected in the state table. Clicking the button opens the
- is enabled when a state is selected in the state table. Clicking the button removes the state from the table, and the next state or last state becomes selected.
This table shows how you can model individual states within a transaction by entering sample information:
State | Action | Next State | Rollback |
---|---|---|---|
1 | Action1.tcl | Action 1 == State 3 Action 2 == State 4 Else – State 2 |
Rollback1.tcl |
2 | Send to thread X | After thread X responds – State 3 |
Rollback2.tcl |
3 | Action3.tcl | Go to State 4 | Rollback3.tcl |
4 | Action4.tcl | Go to State 5 | Rollback4.tcl |
5 | Action5.tcl (optional) | Commit | Rollback5.tcl |
The Action column defines the work that is performed when in that state.
For the Next State column, the state transitions, which are modeled in the user interface, are governed by the return value of the Action step. Message translation is available during the Send to thread action. Receiving threads may belong to a process other than DTC.
The Rollback column defines the work to do when the Distributed Transaction Controller sends a rollback message. Each state does its own cleanup, for example, when Action created files locally on disk. Distributed Transaction Controller is responsible for cleaning up the staging database and state information known by Distributed Transaction Controller.