CMDB: Consider Script in Transform Map while using "Identification and Reconciliation framework"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2017 11:03 AM
Hi
I added the code from https://developer.servicenow.com/app.do#!/api_doc?v=geneva&id=r_CMDBTransformUtil-CMDBTransformUtil to a "onBefore" Transform Map Script.
It workes very well, but unfortunately it ignores the Transform Map Script itself (the onBefore works fine)
In the Script I usually enrich various CI attributes based on fields I read from SCCM. e.g. set Company based on the Domain Name.
Any advice?
BTW: very good examples https://community.servicenow.com/docs/DOC-6808
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2017 11:06 AM
Marc,
In your Onbefore script, you have ignore= true so it will not run any transform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2017 02:45 AM
Hi Mani,
Even when I add the code inside the Transform Map Script at the end, it ignores the enriched "target" object.
The reason might be, "target" is not a parameter for the function
// Call CMDB API to do Identification and Reconciliation of current row
var cmdbUtil = new CMDBTransformUtil();
cmdbUtil.identifyAndReconcile(source, map, log);
ignore = true;
--> I had a look at the CMDBTransformUtil Script Include, it seems that only "field to field" mapping is currently supported.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 08:42 AM
Marc,
Did you get a workaround for this issue where I am not able to enrich the target with the runscript. Putting everything before calling the CMDBTransformUtil did not work either. The other thing I noticed is, even with field mapping, I was not able to transform the location field. Is there an exception for reference field mapping while using the Identification and Reconciliation framework?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 08:45 AM
Hi Sandesh
I have no workaround, we upgrade to Jakarta very soon where it's supported.
regards
Marc