6 Customizing Support Ticketing Inbound Operations

Ticketing Inbound is a new optional feature added in Enterprise Manager 12c. This feature synchronizes the ticket status between Service Manager and Enterprise Manager. This feature requires the addition of a new field to the HP Service Manager incident database to contain the Enterprise Manager connector identifier. It also requires the setup of a Java script in HP Service Manager that is called to send the status information to Enterprise Manager whenever a status change occurs. You can skip this chapter if you choose not to implement this feature.

When a ticket or incident Enterprise Manager creates is updated manually at the Service Manager console, the new ticket status is updated in Enterprise Manager. The update at the Service Manager console triggers a Java script that calls the EM CLI utility to send the new status to Enterprise Manager.

This chapter provides the following procedures to set up the ticketing inbound feature:

6.1 Adding a Custom Field to HP Service Manager

This section provides instructions to add a custom field to the HP Service Manager incident database to contain the Enterprise Manager connector identifier. The identifier must be stored with the incident, because it is a required value that must be supplied when status updates are sent to Enterprise Manager.

To add the custom field:

  1. Log in to the HP Service Manager client using an account that has Administrative permissions.

  2. Add the new custom field to the HP Service Manager database to contain the Enterprise Manager connector ID as follows:

    1. Expand Menu Navigation, then Tailoring in the System Navigator pane.

    2. Double-click on Database Dictionary.

      The Database Dictionary panel appears.

    3. Enter a File Name of probsummary and click Search.

      A form with the probsummary table information appears, as shown in Figure 6-1.

      Figure 6-1 probsummary Information


      probsummary

    4. Click on the line with a Name of descriptor and a Type of structure.

    5. Click on New Field/Key.

      The Add Field window appears.

    6. Enter a Name of oracle.connector.id and a type of character, then click Add.

    7. Scroll down to the bottom of the list of fields and click on the row with the name of oracle.connector.id.

    8. Click on Edit Field/Key. The field edit window appears, as shown in Figure 6-2.

      Figure 6-2 Update Field Window


      update field window

    9. Enter ORACLE_CONN_ID in the SQL Name field, VARCHAR(32) in the SQL Type field, and m2 in the SQL Table field, then click OK.

    10. Click OK on the main panel.

      The ALTER TABLE database SQL statement appears, and you are asked whether Service Manager should automatically apply the change, or whether you want to apply it manually.

    11. Click SM Alters.

      After a period of time, a message states that the record has been updated in the dbdict file.

  3. Modify the web service to include the new database field as follows:

    1. Expand Menu Navigation, then Tailoring, then Web Services in the System Navigator pane.

    2. Double-click on WSDL Configuration.

      The External Access Definition panel appears.

    3. Enter probsummary in the Name field and click Search.

      The record for probsummary will be loaded as shown in Figure 6-3.

      Figure 6-3 External Access Definition Panel


      external access

    4. Click on the Fields tab and scroll to the bottom of the list of fields.

    5. Click on the Field column of the first empty row and select oracle.connector.id from the list.

    6. Click on the Caption column on the same row and enter OracleConnectorId, as shown in Figure 6-4, then click OK.

      Figure 6-4 Oracle Connector ID


      oracle connector

6.2 Setting Up EM CLI

Install the Enterprise Manager EM CLI Client on the Service Manager server system. The EM CLI Client needs to be able to communicate with your OMS.

To install the Enterprise Manager EM CLI Client:

  1. Log into the Enterprise Manager console.
  2. From the Setup menu, select Command Line Interface.
  3. Click the Download the EM CLI kit to your workstation link, and download the emclikit.jar file to the local system.
  4. Transfer the jar file to the Service Manager server system.
  5. At the HP Service Manager server, set your JAVA_HOME environment variable and ensure that it is part of your PATH. You must be running Java 1.6.0_25 or greater. For example:
    setenv JAVA_HOME /usr/local/packages/j2sdk1.6.0_2
    setenv PATH $JAVA_HOME/bin:$PATH
    
  6. Install the EM CLI Client on the Service Manager server. You can install the client portion of EM CLI in any directory using the following command, where <emcli_dir> is the installation directory:
    java -jar emclikit.jar client -install_dir=<emcli_dir>
    
  7. Open a window using the account that runs the Service Manager Server. On a Windows system, this should be the System account.

    To open a window running the System account, run the following command with <time> being 1 minute in the future. At the time specified, a window opens at the system console running under the context of the System account.

    at <time> /interactive cmd.exe
    
  8. Run the following command to configure the EM CLI Client to connect to OMS, where <hostname> is the host name or IP address where the OMS server is located, and <sysman_pwd> is the password for the sysman account in OMS:
    <emcli_dir>\emcli setup -url=https://<hostname>:7801/em -username=<em_super_user> -password=<sysman_pwd>
    
  9. Run the following command to synchronize the EM CLI Client with OMS:
    <emcli_dir>\emcli sync
    

Note:

EMCLI must be installed on the Service Manager server in order to communicate with your OMS.

6.3 Exporting the Notification Script Files

The notification script files are included in the Self Update archive that was installed in Installing the Connector.

To extract the script files:

  1. Determine the command required to export the archive files. To do this, perform the following steps:

    1. From the Setup menu of the Enterprise manager console, select Extensibility, then Self Update.

    2. Click on the Management Connector link in the Type column.

      The HP Service Manager connectors appear in the list with a status of Applied.

    3. Click on the HP Service Manager connector, then select Export from the Actions list.

      A pop-up window, like the example shown in Figure 6-5, appears with the command required to export the file.

      Figure 6-5 Export Command Example


      export command example

  2. Open a command window on the Management Server host system and navigate to a temporary directory where you can copy and unzip the file.

  3. Log into EM CLI using the following command. You will be asked to provide the password information for the sysman account.

    emcli login -username=sysman
    
  4. Run the EM CLI export_update command from your system, changing <dirname> to the full path of the temporary directory.

    This action creates a zip file with a name of p15980954_112000_Generic.zip.

  5. Extract the adapter installation jar file from the zip file using the following command:

    unzip *.zip archives/OracleOMSPost.js
    

6.4 Setting Up the Notification Script

This section provides the steps required to configure HP Service Manager to call the notification script.

To configure HP Service Manager to call the notification script:

  1. Log into the HP Service Manager client with an account that has Administrative permissions.

  2. Create a Script Library that generates the parameters for the EM CLI call by performing the following sub-steps:

    1. Expand Menu Navigation, then Tailoring in the System Navigator pane.

    2. Double-click on Script Library.

      The Script Library panel appears.

    3. Enter a Name of OracleServices and a Package of OracleScripts.

    4. Copy the contents of the OracleOMSPost.js file from Exporting the Notification Script Files into the script panel. Figure 6-6 shows the Script Library panel after the fields have been specified.

    5. Change the value of the username on line 6 from oms_user to the username that Enterprise Manager will use to access the Service Manager web service. See Service Manager Username in Connection Settings for more information.

    6. Click Add.

      Figure 6-6 Script Library Panel


      script library

  3. Create a Script Panel that calls the Script Library by performing the following sub-steps:

    1. Double-click on Scripts in the System Navigator panel.

      The Script Panel Definition panel appears.

    2. Enter a script name of OracleScript.

    3. Click on the Pre RAD Statements tab.

    4. Click on the first line and enter the following text, where <emcli_dir> is the path where the EM CLI tool was installed:

      $L.command="<emcli_dir>\\emcli.bat;"+jscall("OracleServices.OracleOMSPost", $script)
      

      Note:

      Backslashes in the path must be entered as double backslashes. For example, C:\tools\em\emcli.bat would be entered as C:\\tools\\em\\emcli.bat.

      Figure 6-7 shows the Script Library panel after the fields have been specified.

    5. Click on the RAD tab and set Application to us.launch.external.

    6. Click on the first line in the Names column and enter name.

    7. Click on the first line in the Values column and enter $L.command.

    8. Click Add to create the Script Panel.

      Figure 6-7 Script Panel Definition


      script panel

  4. Perform the following sub-steps to update the Format Control to invoke the script upon creating or updating a ticket:

    1. Double-click on Format Control in the System Navigator panel.

      The Search Format Control Records panel appears.

    2. Enter probsummary in the Name field and click Search.

      The Format Control: probsummary panel appears.

    3. Click on the line where the Name is probsummary.

    4. Click Subroutines to open the Subroutines tab.

      One or more subroutines may already be defined.

    5. Scroll down the screen to the last empty entry and enter the following data:

      • Set Add to true.

      • Set Upd to true.

      • Set Names to file on line 1, and name on line 2.

      • Set Values to $file on line 1, and OracleScript on line 2.

      Figure 6-8 shows the Format Control panel after you have specified the fields.

    6. Click Save.

    Figure 6-8 Format Control Panel


    format control

6.5 Uninstall Customization to HP Service Manager for Support Ticket Inbound Operations

This section provides the steps required to remove the changes made to HP Service Manager to allow for ticket inbound operations.

6.5.1 Remove Calls to the Notification Script

Follow the steps below to remove calls to the notification script:

  1. Log in to the HP Service Manager client with an account that has Administrative permissions.
  2. Expand Menu Navigation, then Tailoring in the System Navigator pane.
  3. Double-click on Script Library.
  4. Click Search to view all Scripts in the Script Library.
  5. Find and select OracleServices, then click Delete, and Yes to confirm.
  6. Double-click on Scripts in the System Navigator panel.
  7. Click Search to view all Scripts available.
  8. Find and select OracleScript, click Delete, then Yes to confirm.
  9. Double-click on Format Control in the System Navigator panel.
  10. Enter probsummary in the Name field and click Search.
  11. Click on the line where the Name is probsummary.
  12. Click Subroutines to open the Subroutines tab.
  13. Click Delete, then Yes to confirm.

6.5.2 Remove Custom Field Added for Script Operation

Follow the steps below to remove custom field added for script operation:

  1. Log in to the HP Service Manager client using an account that has Administrative permissions.
  2. Expand Menu Navigation, then Tailoring in the System Navigator pane.
  3. Double-click on Database Dictionary.

    The Database Dictionary panel appears.

  4. Enter a File Name of probsummary and click Search.
  5. Scroll down to the bottom of the list of fields and click on the row with the name of oracle.connector.id.
  6. Click Delete Dbdict Record, and select Yes to confirm.
  7. Expand Menu Navigation, then Tailoring, then Web Services in the System Navigator pane.
  8. Double-click WSDL Configuration.
  9. Enter probsummary in the Name field and click Search.
  10. Click the Fields tab and scroll to the bottom of the list of fields.
  11. Click the Field column of the first empty row and remove oracle.connector.id.
  12. Click the Caption column on the same row and remove OracleConnectorId, then click OK.

6.6 Uninstalling EM CLI

To uninstall the Enterprise Manager command line interface (emcli), perform the following steps:

  1. Navigate to the emcli installation directory.
  2. Delete the emcli directory and all sub-directories from the system.