Data Source with multiple transform maps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 06:53 AM
I have a data source with multiple transform maps. I am trying to execute the two maps via the GlideImportSetTransformerWorker API call. The first map executes and then resets the import set to a "Processed" State inspite of an OnComplete trigger which explicitly resets the state to "Loaded" with the data in "Pending" State. The second map never executes because I see data in a "Pending" state in the importset table. All I want is the functionality behind the Transform in the foreground where you get to pick both the maps one time and be done.
Is there a way to execute all the maps and enforce the order in which they are set through a script? The GlideImportSetTransformerWorker API is being called from global scope which is another issue I have been trying to avoid and I see no other solution on the horizon. Folks have reported it so many times but not a single workable alternate solution has been proposed.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 03:36 AM
any luck on this issue? 🙂
I am loading the data to import table from flow and have the same problem that I can not add the second transform map ( I am creating assets and need also create CI;s but do not want to mess up the BR orders)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 08:14 AM - edited 12-08-2023 08:16 AM
var importSet = new GlideRecord('sys_import_set');
importSet.short_description = 'Import set from scripted rest api';
importSet.table_name = importSetTableName;
var importSetID = importSet.insert();
var transformer = new GlideImportSetTransformer();
transformer.transformAllMaps(importSet);
if(transformer.isError()) {
gs.error('Error executing the transform');
}
transformAllMaps does the trick