Implement UI controls

An integration normally comes with new UI controls, such as new menu options or buttons. To control the behavior of these UI controls, the integration needs to interact with SMIS. The following are examples:

  • Getting parameter values specified in SMIS;
  • Calling some business logic in the integration’s manager (for example, to prepare a URL);
  • Deciding if a UI element should be visible/enabled by checking the integration's global variables specified in SMIS.

To illustrate new UI controls, consider the Service Manager to Business Availability Center (BAC) Problem Isolation integration. This integration includes a new menu option to the Incident form: Launch Problem Isolation. When you select this menu option, a new browser window opens. The URL of this window is based on two things: the value of "baseurl" specified in SMIS and the affected CI field of the incident.

To implement this feature, you can use the Display Options tailoring tool to create a display option record, in which the script on the Pre Javascript tab controls the above described behavior. See the following figure.

The following examples show you some of the values you can retrieve or set. This is not an exhaustive list:

  • To get the enabled instance of the integration:

    var configItem =lib.smis_ConfigurationManager.getEnabledConfigItem(<templateName>);

    For example: var configItem =lib.smis_ConfigurationManager.getEnabledConfigItem(SMPI)

  • To get a URL from the manager:

    vars.$L_url = configItem.getManager().getUrl(vars.$L_file);

  • To get a parameter value:

    var paramValue = configItem.getConfParamaterValue(paramName)

  • To set the property of a UI element:

    Each integration has global variables, which can be used in RAD expressions like SMBSM in vars.$G.system.info. If an integration has global parameters, they can be used the same way, for example: PI in vars.$G.system.info. You can use these global variables to set the property of a UI element (for example, to set a menu item to be visible/invisible, or to set a button to be enabled/disabled).