Develope a manager

A manager is required for both schedule-based and UI-based integrations.

To develop a manager, follow these steps:

  1. Develop appendTasks to prepare tasks in the task queue.
  2. Put the logic in either the preprocess or process method.
  3. Do cleaning in the postProcess or finalize method.
  4. Prepare the destination object in the getDestObj method for the mapping function to set mapped values.
  5. Prepare the action in the getAction method to use in the mapping callback(s).
  6. Implement isScheduleBased to indicate whether the integration is schedule-based or not.

    Tip See smis_TestManager in the Service Manager script library for an example.

    Note For a UI-based integration, the manager only needs to implement isScheduleBased and add the integration specific methods to it. See the following script for an example.

    An example manager for a UI-based integration

    var Class = lib.smis_Prototype.getClass();
    var PIManagerClass = Class.create(lib.smis_Manager.getClass(),
    {
    getUrl: function(vFile) {
    var baseUrl = this.configItem.getConfigParameterValue("baseurl");
    var url = baseUrl + "&IsmEntityId="+vFile["number"];
    url += "&IsmSubject=";
    var device = new SCFile("device");
    var RC = device.doSelect("logical.name=\"" + vFile["logical.name"] +
    "\"");
    if ( RC == RC_SUCCESS && device["ucmdb.id"] != null){
    url += device["ucmdb.id"];
    } else {
    url += vFile["logical.name"];
    }
    return url;
    },
    isScheduleBased: function() {
    return false;
    }
    });
    function getClass() {return PIManagerClass;}