Transaction
Description:
Transaction
Similar to JDBC Transaction, this component can be used to group multiple datastores into a single transaction. When you post the changes using Save Transaction
action, all the changes across all the datastores inside this transaction will be posted in a single request. If one datasource fails, then all changes within this transaction will be rolled back.
As a best practice always use Transaction when developing data entry applications. With transaction, you can define the parent-child relationship between datasources using the Mapping
.Querying Child Stores
When Auto Query Child Stores
is checked, all the child datasources will be automatically queried when the user navigates between the parent store records. The child stores will be filtered using the parent attribute values of the defined Mapping.Defaulting of Child Attributes
Let's take a simple example of Dept
(Dept ID, Dept Name) & Emp
(Emp ID, Emp Name & Emp Dept ID) datasources as parent child Transactions with a Mapping Dept ID
- Emp Dept ID
. Let's assume the Dept ID & Emp ID are auto generated on the server only after saving the transaction. When you create a new department and emp at the same time and save the transaction, the platform will first create the department which would generate a Dept ID for the newly created department and then copy the Dept ID
from the Dept
datasource record into Emp Dept ID
attribute of Emp
datasource record before saving the Emp
datasource.
Allowed Parent Components:
Page
Transaction
Allowed Child Components:
Mapping
Transaction
Trigger After Save
Trigger Before Save
Properties
➤ Data Source Alias
Select the DataSource Alias name to perform actions on the store behind this DataSource Alias.
Allowed Values: Select the DataSource Alias name to perform actions on the store behind this DataSource Alias.
➤ Transaction Code
Provide a unique code to group datasources for DML operations.
Allowed Values: Free text field
➤ Auto Query Child Stores
Check this to query all the child datasources when the user navigates between the parent store records. The child stores will be filtered using the parent attribute values of the defined Mapping.
Allowed Values: Yes/No
➤ Hide No Changes Info
Enable this property to Hide the message(no changes to Save) whenever we click on save button without making any changes.
Allowed Values: Yes/No
➤ Allow Duplicate
Check this property to create transaction mapping for already used data source alias.
Allowed Values: Yes/No
➤ Cache Child Records
Enable this property to fetch the child records from cache otherwise it gets from the datastore.
Allowed Values: Yes/No
Last updated