Transaction is a collection of works either committed or rollback.Create a calling and called task flow to go through some of the transaction basics of task flow
Calling Task flow :
Calling Task flow :
Called Task flow :
From the behavior section of the called task flow you can see the following options
- No Controller transaction is the default option means the called task flow does not participate any transaction management.
- Always begin New Transaction - Transaction is created when enter to the task flow and completes the task flow when exists the task flow
- Always Use Existing transaction - Called task flow participates the existing transaction
- User Existing transaction if possible - Participate the existing transaction if available or start a new transaction if not available
- restore-save-option
Use restore-save-option =true if you want to discard the changes the end user makes with in a called bounded task flow when the called bounded task flow exits.This option apply only if the bounded task flow is entered by joining the existing transaction and a save point created on entry
No save point on task flow entry if selected prevent the creation of ADF model save point on task flow entry if taskflow participate in 'Always Use existing transaction ' or 'User existing transaction if Possible' . In this case overhead associated with a save point is not created for the transaction.
End the transaction from task flow return activity by selecting the End transaction property to commit or rollback.
Shared Data control behavior and transaction
Share data controls with calling task flow have the options Shared and Isolated
Transaction
setting
|
Shared
Data Control scope
|
Isolated
Data Control scope
|
No
controller txn
|
DataControlFrame
shared without open txn
|
New
DataControlFrame is created without an open transaction
|
Always
begin new txn
|
Begin
new if one is not open
|
Always
begin new one
|
Always
Use existing txn
|
Throws
exception if txn is already open
|
Invalid.The
checkbox cannot be deselected
|
Use
Existing txn if possible
|
Begin
a new txn if one is not already open
|
Always
begin a new txn
|
1) No Controller Transaction.
ReplyDeleteCalled task flow does not participate any transaction Management.
2) Always Use Existing Transaction.
Task flow participates the existing transaction flow. Used with Shared Data Control.
3) Use Existing Transaction If Possible.
Participate the existing transaction if available or start a new transaction if not available
4) Always Begin New Transaction.
Transaction is created when enter to the task flow and completes the task flow when exists the task Called. Used with Isolated Data Control.
EX. if you use child TF in parent TF and you commit or rollback changes in parent Task Flow then the changes in child TF will be commited or rolled back.
To solve this problem Make Transaction Always begin new transaction and make Data Control Isolated.
Restore-save-option
Use restore-save-option =true if you want to discard the changes the end user makes with in a called bounded task flow when the called bounded task flow exits.This option apply only if the bounded task flow is entered by joining the existing transaction and a save point created on entry