Previous Topic: Create Custom HP Service Manager FieldsNext Topic: Display a CA SOI Alert Instance


Add Custom JavaScript

Custom fields may require more than static text or a direct mapping of a field value. Advanced custom fields that need more flexibility may require that you enter custom code.

Do the following to create custom fields using custom JavaScript code:

Follow these steps:

  1. Start the CA Process Automation Management Console and click CA Process Automation Client on the upper right.

    The CA Process Automation Client application starts.

  2. Select the Configuration Browser tab.
  3. Expand Default Environment and double-click Orchestrator.

    The Folders pane opens.

  4. Expand CA SM Gateway, select HPSM, and double-click the CreateTicket process in the right pane.

    The CreateTicket page opens.

    For more information about the pane, see Configure Processes for HP Service Manager Integration (Configure Processes for BMC Remedy Integration, Configure Processes for HP Service Manager Integration).

    Note: If the icon labels do not display, select Edit User Preferences, select Show icon information on the Configuration tab and click OK.

  5. Click Icon for checking out a process. on the tool bar to check out the process.

    The Check Out icon is disabled and the process is checked out. Custom fields are stored as Keys and Value arrays.

  6. Double-click the Icon for creating custom JavaScript code. icon that is labeled Get HPSM Parameters.

    The Properties of 'CreateHPSMParameters' pane opens.

  7. Click in the Source code field.

    The Source code page opens. This page contains the code that stores all of the custom field properties into the Process.keys variable and all of the custom field property values into Process.Values. These variables are used in the custom code.

  8. Close the Properties pane, and double-click the Icon for creating custom JavaScript code. icon that is labeled Add custom JavaScript Code here to send values to HPSM Incident.

    The Properties of UserAddedCustom*Code pane opens.

  9. Click in the Source Code field.

    The Source Code page opens.

  10. Enter source code in JavaScript to create the delimited property value string.

    The delimited string is of the format Property1=Value1<delimiter>Property2=Value2. By default the delimiter is &&.

    Note: For available variables, see CA Process Automation HP Service Manager Gateway Variables (CA Process Automation Remedy Connector Variables, CA Process Automation HP Service Manager Gateway Variables).

  11. Click OK.

    The Source code pane closes and the code is saved.

  12. Click Apply to accept any changes and close the Properties pane.

    The custom code is added to the process.

  13. Double-click the icon that is labeled Create HPSM Incident.

    The Properties of 'Create_HP_SM_Incident' pane opens.

  14. Enter the variables that you entered in the source code containing the delimited string in the Delimited Params field, and click Apply.

    The variables are saved in the create incident process.

  15. (Optional) Modify other variables that are used when generating an HP Service Manager incident if necessary.
  16. (Optional) Click Apply to save any variable changes and close the Properties pane.
  17. Click the Icon for checking in a process. icon on the tool bar to check in the modified process.

    The Versions page opens.

  18. Click OK.

    The modified process is checked in.