IRE engine is not working in on before transform script (ignoring all the record )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2023 03:41 AM
Hi Community ,
To avoid duplication i am trying to use IRE engine in on before transform script, but all the time its ignoring the record even if is the correct record to insert .
on before transform script:
(function runTransformScript(source, map, log, target) {
// Call CMDB API to do Identification and Reconciliation of current row
var cmdbUtil = new global.CMDBTransformUtil();
cmdbUtil.identifyAndReconcile(source, map, log);
ignore = true;
if (cmdbUtil.hasError()) {
var errorMessage = cmdbUtil.getError();
log.error(errorMessage);
} else {
log.info('IE Output Payload: ' + cmdbUtil.getOutputPayload());
log.info('Imported CI: ' + cmdbUtil.getOutputRecordSysId());
}
})(source, map, log, target);
help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2023 05:59 AM - edited ‎02-15-2023 06:30 AM
Actually it is NOT necessarily ignoring the record. This is a known effect of using the IRE from an onBefore() transform script. The "Ignored" status is literally what you told it to do, i.e. "ignore = true". You are not alone. This is a known and documented side effect. So the advice here is to "ignore the ignores" if using IRE from a traditional transform in this manner, and add messages to the log to troubleshoot. That said, a much better way to use the IRE from a transform is to use IntegrationHub ETL to do your transforms and abandon the traditional transforms. This will give you much more flexibility and capability in your transform logic as IHETL uses the Robust Transform Engine. IHETL is a free application and you can convert your existing data sources to use IHETL and disable your existing transform maps. There is a bit of a learning curve but it is the preferred method of integrating into CMDB and it is the method used by Service Graph Connectors.
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2025 05:55 AM
Put this in the script section of the Transform not on the row-level transform script.