Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Integrating your MettleCI Workbench with ServiceNow will enable MettleCI Workbench to perform a dynamic lookup when linking DataStage Git commits to one or more ServiceNow work items directly within the Workbench user interface. It is a two step process, there are some items to configure and collect from the Service Now instance, and then some items to configure in Workbench.

...

Register Workbench as an OAuth2 ServiceNow Application

  1. Setup OAuth in ServiceNow in your ServiceNow instance.

  2. Create a new OAuth API endpoint for Workbench to access ServiceNow:

  3. Set the “Name” Field to “MettleCI Workbench” and the “Redirect URL” to https://<workbench url>:<port>/api/auth/delegated/<N> where <workbench url>is the URL of your Workbench installation (usually your Development engine), <port> is the https port you are running on (often but not always 8443, check your <config.yml file if unsure), and <N>is the index of the WIM you plan to add (the default generic is 0 and if this is the first other WIM you are adding, the value here would be 1) and click “Submit”:


    Record the redirect URL for later use so you don’t have to derive it again. If your organization has installed multiple MettleCI Workbench applicationapplications, you can add them all to the same ServiceNow Application Registration by adding multiple Redirect URLs. (comma separated)

  4. Click on your newly created Application Registration:

  5. Anchor
    ServiceNowRegisterConfig
    ServiceNowRegisterConfig
    Note down the “Client ID” and “Client Secret” field properties for later use:

...

  1. Access the MettleCI Workbench page to integrate with your Service Now Work Item Management system by logging in to MettleCI Workbench and select Issue Management from the Profile menu (top right)

    1. Image RemovedImage Added
  2. On the Registered Issue Management Systems screen select the “+” to create a new Issue Management type.. Initially you will have only the “Default Generic Issue Manager” present, but you can add as many as you need to (including more than one of the same type if necessary) one at a time. It is recommended that you get one working before you add another.

  3. On the Add Issue Management screen that appears

...

Info

...

Expand
titleTips to debug aid debugging when havig having trouble registering a new ServiceNow issue management system.
  • It is not necessary to restart the Workbench service, but if clearing the log and then restarting the service may aid in debugging

    Code Block
    $> cd /opt/dm/mci
    $> mv mci.log mci.log_preIssueManagementChanges
    $> sudo service dm-mettleci-workbench restart
  • During issue lookup, Workbench will search each ServiceNow Table configured in the Search Queries list. The Ids that will appear in the commit message are generated from the value of the “Primary Key Column” value and the text shown to the user in the lookup is generated from the “Ticket Summary Column” value. These settings are retained in the issuesmanagement-settings.yaml file in the installation directory. Assuming the choices above were made, this file would would appear like so: (ID 0 is the default generic issue management which takes no other parameters)

Code Block
---
- id: 0
  type: "GENERIC"
  name: Default Generic Issue Manager"
- id: 1
  type: "SERVICENOW"  
  name: MyServiceNow:
  url: <your ServiceNow instance URL>
  clientId: <your Client ID>
  clientSecret: "<your Client Secret>"
  search:
      - table: "change_ task"
        id: "${number}"
        summary: "${number}: ${short_description}"
        filter: "state='ACTIVE'"

Template Strings are text containing special ${column_name} variables which Workbench will replace with Column data from the ServiceNow Table based on the column_name.

...

5. You can now select your new Service Now WIM from for any existing or new project.

From the Registered Projects page, select an existing project for editing via the pencil icon:

...