Query Related to JDBC Data Source
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Everyone,
Recently, I came across a requirement related to loading data into a custom table through a JDBC Data Source.
Here's the scenario:
I have two tables (Table1 and Table2) present in a custom scope.
Requirement:
Once a new record is created in Table1 with the state set to "In Progress", the JDBC Data Source should trigger, load, and transform the data, then import it into the target table (Table2). Upon completion of the data import, the state of the triggering record (the Table1 record) should be set to "Complete".
What would be the correct approach to accomplish this requirement?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
HI @jayeshyadav252 ,
In this scenario, I wouldn't recommend triggering the JDBC Data Source directly from the Table1 record. A cleaner approach would be:
- Create a Business Rule or Flow on Table1 that runs when a record is created (or updated) and the State = In Progress.
- From there, trigger the Data Source import process (Load Data + Transform Map) using a Scheduled Import, Scripted Import, or Flow Action depending on your implementation.
- Once the import and transform activities complete successfully, update the corresponding Table1 record's state to Complete.
- In case of failures, consider updating the state to Failed/Error and logging the import details for troubleshooting.
One common pattern is to store the Table1 record's Sys ID in the import process context so that after the transform finishes (for example, in an onComplete Transform Event Script or post-import script), you can easily identify and update the triggering record.
This keeps the import process decoupled from the business transaction and provides better error handling, monitoring, and scalability.