This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Ignore on Null not working in SM push - use SMUtils.isEmpty(str) instead ?

SM version: 9.71
uCMDB version: 2019.11

Using the out of the box push functions, there is an option for CI fields mapped to SM called Ignore on Null. But that is not working and there is a QCCR (QCCR1E119141) which has been defferred.

But I think it might be possible to call the SMUtils.isEmpty(str) function from the /scripts/SM PushFunctions.groovy:

* Check the input is empty, if a string, check "" and "null"
* @param str input an object
* @return true/false, return true if empty or else return false
public static boolean isEmpty(def str) {
return SMUtils.isEmpty(str);

Question: how do I call this function from the XML mapping? Can I swap the "true" below and somehow call the isEmpty function?


<?xml version="1.0" encoding="UTF-8"?>
<integration xmlns:xsi="">" xsi:noNamespaceSchemaLocation="../mappings_schema.xsd">
<source name="UCMDB" vendor="HP" version="10.20"/>
<target name="SM" vendor="HP" version="9.40"/>
<scriptFile path="mappings.scripts.SMPushFunctions"/>
Push uCMDB CIT to SM Business Service.
<source_instance query-name="SM Business Service Push 2.0" root-element-name="Root">
<target_entity name="bizservice">
<target_mapping datatype="STRING" name="UCMDBId" value="Root['global_id']"/>
<target_mapping datatype="STRING" name="CustomerId" value="'DEFAULT'"/>
<target_mapping datatype="STRING" name="Type" value="'bizservice'"/>
<target_mapping datatype="STRING" name="Subtype" value="SMPushFunctions.getSMSubType(Root['element_type'],ClassModel,'BizService')"/>
<target_mapping datatype="STRING" name="ServiceProvider" value="Root['provider']"/>
<target_mapping datatype="STRING" name="ServiceName" value="Root['name']"/>
<target_mapping datatype="STRING" name="DisplayName" value="Root['display_label']"/>
<target_mapping datatype="STRING" ignore-on-null="false" name="Comments" value="Root['comment']"/>

Parents Reply Children
No Data