CMDBTransformUtil in Transf. Map onBefore script incorrectly switching CI class from child to parent

AntonioG4352175
Tera Contributor

We are using the CMDBTransformUtil() API within an onBefore transform map script to process records through the CMDB Identification and Reconciliation Engine (IRE). The transform map is targeted to the cmdb_ci_server table.


When running the transform, existing CIs that belong to a child class, Linux servers on table cmdb_ci_linux_server, are being incorrectly upgraded/changed to the parent class cmdb_ci_server instead of remaining on their original subclass. The reconciliation rule is configured for cmdb_ci_server, but the class should not be downgraded or upgraded automatically.

Existing CIs should retain their current class (cmdb_ci_linux_server), IRE should update attributes without switching the CI to a parent class.

Matched CIs are being moved from cmdb_ci_linux_server to cmdb_ci_server after cmdbUtil.identifyAndReconcile() executes.

Is there a property or setting within CMDBTransformUtil / IRE to prevent class switching?
What is the recommended approach to keep the existing CI class while still using the IRE via CMDBTransformUtil?

Script:

var cmdbUtil = new CMDBTransformUtil();
    cmdbUtil.setDataSource('ImportSet');
    cmdbUtil.identifyAndReconcileEnhanced(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());
    }
0 REPLIES 0