Example: Enabling custom approvals for Problem Management

The following example illustrates how to enable approvals for Problem Management. At the end of this example, you will be able to:

  • Create a problem record that requires an approval
  • Assign the problem record to the approval queue
  • View and act upon the problem approval

Note In order to enable custom approvals for Problem Management, you must perform the entire sequence of example tasks. You must be a System Administrator, or have equivalent system privileges, to perform the steps in this example. Also, you must use the Windows client whenever you need to add a new field/key to a database dictionary table.

Task 1: Edit the object definition for the application to enable approvals by category.

  1. Log on to HPE Service Manager with a System Administrator account.
  2. Click Tailoring > Document Engine > Objects.
  3. Type rootcause in the File Name field, and then click Search.

    The Object Definition form opens.

  4. Click the Approvals tab, and then type the following field values.

    Field Value
    Approval condition true
    Approval location Category
    Approval field name approvals
    Approval status field approval.status
    Approval type All must approve
    Approval process rootcause.save
    Preapprove on open false

    Note The fields approvals and approval.status fields do not yet exist. You will add the field name to the Problem Management database dictionary in a later step.

  5. Click Save.

Task 2: Edit the database dictionary for the application to add an approval status field.

  1. Click Tailoring > Database Dictionary.
  2. Type rootcause in the File Name field, and then click Search.
  3. Select the descriptor row in the Fields tab, and then click New Field/Key.
  4. Type the following field attributes.

    Field attribute Value
    Name approval.status
    Type character
  5. Click Add Field.
  6. Click OK to save the database dictionary.

    Service Manager prompts you to confirm how you want to change the tables in the RDBMS.

  7. If Service Manager has write permissions to the RDBMS, click SM Alters. Otherwise, click User Alters.

    Service Manager displays the database dictionary.

    Note Check your DDL output folder for DDL text you can use to update your RDBMS manually.

Task 3: Edit the database dictionary for the application's categories to add an approval field.

  1. Click Tailoring > Database Dictionary.
  2. Type rootcausecat in the File Name field, and then click Search.
  3. Select the descriptor row in the Fields tab, and then click New Field/Key.
  4. Type the following field attributes.

    Field attribute Value
    Name approvals
    Type array
  5. Click Add Field. Service Manager prompts you to select the array's data type.
  6. Select character, and then click Add Field.
  7. Click OK to save the database dictionary.

    Service Manager prompts you to confirm how you want to change the tables in the RDBMS.

  8. If Service Manager has write permissions to the RDBMS, click SM Alters. Otherwise, click User Alters.

    Service Manager displays the database dictionary.

    Note Check your DDL output folder for DDL text you can use to update your RDBMS manually.

Task 4: Edit the necessary forms to add the new approval fields.

  1. Click Tailoring > Forms Designer.
  2. Type problemcat in the Form field, and then click Search.

    The Problem Control Category Definition form opens.

  3. Click Design.
  4. Click Group.
  5. Click on an empty space on the form to add the group.
  6. Edit the properties of the group as follows.

    Property Value
    Caption Approval Requirements
    Width 152
  7. Click Comfill, and then click within the Approval Requirements group.
  8. Edit the properties of the combo fill field as follows.

    Property Value
    Input approvals
    Array Length 5
  9. Position the Approval Requirements group as desired.

    For example, you may want to position the group between the Active? check box and the Phase name table.

  10. Click OK to exit design mode.
  11. Click OK to save the form and return to the Forms Designer search screen.
  12. Type PM.pc.investigate.and.diag in the Formfield, and then click Search.

    The Problem Control - Problem Investigation and Diagnosis form opens.

  13. Click Design.
  14. Click Label, and then click in the open space beneath the Record Number label.
  15. Edit the properties of the label as follows.

    Property Value
    Caption Approval Status:
    X 2
    Y 5
    Width 34
  16. Click Text, and then click to the right of the Approval Status: label.
  17. Edit the properties of the text field as follows.

    Property Value
    X 36
    Y 5
    Width 36
    Input approval.status
    Read-Only Selected
  18. Click OK to exit design mode.
  19. Click OK to save the form and return to the Forms Designer search screen.

Task 5: Edit the database dictionary for the application's profile record to add to an approval groups field.

  1. Click Tailoring > Database Dictionary.
  2. Type rcenv in the File Name field, and then click Search.
  3. Select the descriptor row in the Fields tab, and then click New Field/Key.
  4. Type the following field attributes.

    Field attribute Value
    Name approval.groups
    Type array
  5. Click Add Field. Service Manager prompts you to select the array's data type.
  6. Select character.
  7. Click Add Field.
  8. Click OK to save the database dictionary.

    Service Manager displays the database dictionary.

Task 6: Create a new approval definition record to manage the application's approvals.

  1. Click Tailoring > Forms Designer.
  2. Type rc.profile.g in the Form field, and then click Search.

    The Problem Management Security Profile form opens.

  3. Click Design.
  4. Click Label, and then click in the open space beneath the Complex Mass Update check box.
  5. Edit the properties of the label as follows.

    Property Value
    Caption Approval Groups:
    X 2
    Y 31
    Width 28
  6. Click Comfill, and then click to the right of the Approval Groups: label.
  7. Edit the properties of the combo fill field as follows.

    Property Value
    X 31
    Y 31
    Input approval.groups
    Array Length 5
    Value List Condition select("name", "assignment", "name", "*")
  8. Click OK to exit design mode.
  9. Click OK to save the form and return to the Forms Designer search screen.

Task 7: Edit the application's category definitions to add your new approval definition.

  1. Click Tailoring > Tailoring Tools > Links.
  2. Type rc.profile in the Name field, and then click Search.
  3. Add the following link entry at the end of the list of links.

    Property Value
    Source Field name approval.groups
    Target File name assignment
    Target Field name name
  4. Click Save.
  5. Click Change Management > Maintenance > Approvals.

    Note You are using a Change Management menu link because by default, Problem Management does not have a menu item for Approvals.

  6. Type the following field values.

    Field Value
    Name Problem Approval
    Approval Condition true
    Group/Oper HELPDESK
    Sequence 1
    Condition true

    Caution The Group/Oper field is case sensitive.

  7. Click Add.
  8. Click Problem Management > Administration > Problem Control Categories.

    Your customized problemcat form opens.

  9. In the Name field, type the name of a Problem Management category that you want to trigger your custom approval process. For example, ITIL.

    Note: You can repeat this step for each Problem Management category you want to trigger approvals.

  10. Click Search.

    Service Manager displays the current ITIL category definition.

  11. In the Approval Requirements array, type Problem Approval.
  12. Click Save.

Task 8: Edit the application profile records that you want to have access to your custom approval group.

  1. Click System Administration > Ongoing Maintenance > Profiles > Problem Management Profiles.

    The Problem Management Security Profile form opens.

  2. In the Profile Name field, type the name of a profile you want to grant approvals. For example, SYSADMIN.
  3. Click Search.

    Service Manager displays the current Problem Management Security Profile.

  4. In the Approval Groups array, type the name of the approval group you defined to manage approvals. For example, HELPDESK.
  5. Click Save.
  6. Log out the current operator and log on to Service Manager with an operator account that has the SYSADMIN Problem Management profile. For example, System.Admin.
  7. Click Problem Management > Problem Control > Create New Problem.
  8. Create a new problem record and note the record number. For example, PM0002.

    Note The Category field on the Problem Control form maps to the Incident Management category, not the Problem Management category. Since there is only one approval category for ITIL Problem Management, any problem you create will automatically be part of the ITIL Problem Management category.

Task 9: Edit the script that controls the approval inbox to add your custom approvals to the list of approvals the system displays.

  1. Click Tailoring > Database Manager.
  2. Type Approvals in the Table field, and then click Search.
  3. Select the Approval form from the list.
  4. In the Id field, type the record number for the problem you created. For example, PM0002.
  5. Click Search to display the pending approval.
  6. Click Tailoring > Script Library.
  7. Type ApprovalCustomPlugin in the Name field, and then click Search.
  8. Locate the appendCustomApprovalSql() function.
  9. Remove the comment lines /* and */ at lines 49 and 55 to enable the function.
  10. Click Save.
  11. Click Compile.
  12. Click Service Catalog > Approve Requests.

    Service Manager displays the list of pending approvals. Check the list for your custom approval. For example, PM0002.