CMDB: Consider Script in Transform Map while using "Identification and Reconciliation framework"

MarcB1
Tera Guru

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

SCCM 2012 Computer Identity _ IT Service Management - Google Chrome 2017-05-26 19.57.43.png

onBefore _ IT Service Management - Google Chrome 2017-05-26 19.59.51.png

16 REPLIES 16

manikorada
ServiceNow Employee
ServiceNow Employee

Marc,



In your Onbefore script, you have ignore= true so it will not run any transform


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.


find_real_file.png


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?


Hi Sandesh



I have no workaround, we upgrade to Jakarta very soon where it's supported.



regards


Marc