Skip to main content
July 3, 2025
Solved

How to implement transactions in appian

  • July 3, 2025
  • 9 replies
  • 0 views

I have a process like this. I want to use transaction constraints on three write record nodes. Is there some easy way I can implement my require. 

 

another question is what the functional of sync records. 

I have read this document. https://docs.appian.com/suite/help/25.2/Sync_Records_Smart_Service.html But I don't understand the node's function and what scenario will use this node. I think when I use the write records, the data has already update into the database and sync automatically, why I need this node.

 

Best answer by shubhama926776

Constraints :- Instead of using three separate Write Records nodes, configure all three records in a single Write Records node. This automatically creates one transaction, ensuring that if any write fails, all operations roll back while maintaining all record and database relations.


To understand sync record smart service first understand basics of sync record:-
Sync Records synchronizes data from your database into Appian’s record cache.
What is Sync? --> Appian maintains a cache layer of your database data. Instead of querying the database every time, Appian retrieves data from this cache. Much faster data retrieval and better performance
Database ← stores your actual data
Sync Records ← copies/updates data from database to Appian cache
Appian Cache ← fast, in-memory storage for quick access
Record View/Queries ← read from cache instead of database.


When you make database changes (especially outside Appian or bulk operations), you use Sync Records to update Appian’s cache with the latest database information like executing database insert script directly in database.

9 replies

harshas2775
July 3, 2025

For transaction constraints, its good to define the relationships between tables efficiently in database as well as during record type relationship configuration. You can allow the related records to be added/updated / deleted with the base records using single Write records node. You won't need three nodes and Appian will commit the transaction only if all the operations are performed without any errors. 

I suggest to go through the below documents thoroughly to understand this :

docs.appian.com/.../Write_Records_Smart_Service.html

 https://docs.appian.com/suite/help/25.2/record-type-relationships.html#allow-writes-and-deletes 

Anyway if you want the transaction to be applied via code and logic let me know and I can share a workaround for that. 

For sync records smart service - there are use cases when we want to sync the record deliberately to refresh data. E.g. some data manipulation is done via  a store procedure call in process model and then you need to re-sync record data. Some other example use cases are mentioned here https://docs.appian.com/suite/help/25.2/Sync_Records_Smart_Service.html#examples 

shubhama926776
July 3, 2025

Constraints :- Instead of using three separate Write Records nodes, configure all three records in a single Write Records node. This automatically creates one transaction, ensuring that if any write fails, all operations roll back while maintaining all record and database relations.


To understand sync record smart service first understand basics of sync record:-
Sync Records synchronizes data from your database into Appian’s record cache.
What is Sync? --> Appian maintains a cache layer of your database data. Instead of querying the database every time, Appian retrieves data from this cache. Much faster data retrieval and better performance
Database ← stores your actual data
Sync Records ← copies/updates data from database to Appian cache
Appian Cache ← fast, in-memory storage for quick access
Record View/Queries ← read from cache instead of database.


When you make database changes (especially outside Appian or bulk operations), you use Sync Records to update Appian’s cache with the latest database information like executing database insert script directly in database.

July 4, 2025

Thanks, but my data is not the same type, so I use separate Write Records nodes.

shubhama926776
July 4, 2025

If you are using the latest version of Appian, you can write to different types of record types—within the same schema—using a single Write Records smart service, by passing each as a separate pv! of type Record.