Import Set / Transform using IRE - Not Creating / Update All Fields on CI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2021 01:51 PM
Hello -
I've been trying to figure out why my import set / transform map with IRE enabled (Identification and Reconciliation) is only working to some degree when it comes to updating/creating a configuration item.
My transform map has a number of mapped fields and only some of them will update the target fields on the corresponding CI. (or populate those fields on a new CI)
Transform Map - Following the instructions on https://docs.servicenow.com/bundle/paris-servicenow-platform/page/product/configuration-management/concept/identification-import-sets.html I have this in an onBefore script.
//Execute Data Precedence rules so that Discovery and Service Mapping does not create duplicate CI's, etc.
//If successful, identifyAndReconcile will update record, therefore ignore is set to true here.
var cmdbUtil = new CMDBTransformUtil();
cmdbUtil.setDataSource('Network-Source);
cmdbUtil.identifyAndReconcile(source, map, log);
ignore = true;
if (cmdbUtil.hasError()) {
var errorMessage = cmdbUtil.getError();
log.error(errorMessage);
} else {
log.info(cmdbUtil.getOutputPayload());
log.info(cmdbUtil.getOutputRecordSysId());
}
Here's a summary of the transform map itself including the resulting CI's fields when it would find / update an existing CI.
Here's the payload after the import set received a record for an existing ci (from the onBefore in the transform map)
The transform map fields using a source script are all pretty basic. Here are two examples of fields that won't update / populate if a new created CI.
such as with the Device Type source
answer = 'Network Hardware';
or u_level_3_support_group
if (source.u_contact == 'Middleware ADC' || source.u_contact == 'Middleware ADC') {
answer = '188550470f090280b6cd00dce1050e8b'; // Level 3 ABC
} else {
answer = 'aaeac510077142001aa6e388b1050ed9'; // Level 3 BBB
}
---------------
I just don't understand why it seems to populate/update some of the fields defined in the transform map but not all.
The logs aren't giving me anything.
Any ideas?
Thanks
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 01:10 AM
Same issue, any solution?