Notifications

75 views

Description

While debugging the CI IRE, we may need to run the CI Identification and reconciliation using the payload. This article explains how you can run these.

Procedure

  • Assume that you have the CI payload that is being sent to the CI IRE(or createOrUpdateCI). If you don't know how to get the CI payload which is being sent to the IRE, please see the KB "How to check the data/payload being sent to IRE and check the issues with the payload" to retrieve the payload.
  • Now, we have the payload then either you can use the simulator to simulate the CI identification and reconciliation or use the below steps.
  • Goto Application Navigator >> System Definition >> Scripts - Background
  • Create a Payload as below

    var payload = {

    items: [{

    className:'<CLASS_NAME>',

    values: {

    name: '<CI NAME>',

    serial_number:‘<CIs S NUMBER> ’

    }

    }]

    };

  • Run the below code.
    /* Replace the variable as below:
    YOUR_COPIED_CI_PAYLOAD: This is the payload we copied from step#1 OR your generated payload.
    YOUR_DATA_SOURCE: Replace this with your intended data source like ServiceNow, SCCM, ImportSet, etc.

    */

    runCiIdentificationReconciliation();

    function runCiIdentificationReconciliation() {
    var payload = YOUR_COPIED_CI_PAYLOAD;
    var input = new JSON().encode(payload);
    var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCI('YOUR_DATA_SOURCE', input);
    gs.print(output);
    }
  • Analyze the outcome using the error codes Identification engine error messages

Applicable Versions

Geneva ++

Additional Information

Article Information

Last Updated:2019-07-04 07:02:17
Published:2019-07-04