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.
Note that ServiceNow does not support self-signed certificates when using HTTPS … or something. Drew Nuttall-Smith ?
Register Workbench as an OAuth2 ServiceNow Application
Setup OAuth in your ServiceNow instance.
Create a new OAuth API endpoint for Workbench to access ServiceNow:
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 applications, you can add them all to the same ServiceNow Application Registration by adding multiple Redirect URLs. (comma separated)Click on your newly created Application Registration:
Note down the “Client ID” and “Client Secret” field properties for later use:
You are done with the Service Now portion of the configuration, but you may want to keep this open until you have validated everything is working.
Configuring MettleCI Workbench Work Item Lookup with Service Now
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)
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.
On the Add Issue Management screen that appears
select Service Now from the Select Issue Management Type dropdown
and click Next
4. On the Register ServiceNow Issue Management screen that appears next, enter the following values and click Submit:
Field list
Name: Anything you like, but something that identifies your Service Now organisational instance would be a sensible choice
URL: The URI of your Service Now instance recorded earlier.
Client ID: Your Application (client) ID recorded earlier
Client Secret: Your client secret recorded earlier
Search Queries: This has no default, you will need to create at least one query. Consult with your ServiceNow administrators to determine what table(s) your organization uses, and thus, what table(s), then add or edit the query or queries as needed by using the “pencil” icon and “+” icon to edit what is queried or add a new table to query, respectively. The example uses change_task as the table, keyed on ${number} with ${number}: ${short_description} as the summary shown to the user.
OPTIONAL - In the Search Queries section of any query, you can add add a filter expression to limit what is returned. Note that this expression is not checked for correct syntax. Consult with your ServiceNow administrators to determine whether you need to filter (most organizations will not) and what columns/values to filter on.
Search queries use ${ } to represent column values. Other characters, if any, are reproduced as is.
The filter, on the other hand, takes the column name and a literal without any enclosing ${ }.
Submit
(Save) the newly registered Service Now issue management system.
The Callback URL will be displayed on the Workbench Issue Management System page.
Ensure the callback URL matches the setting on the ServiceNow Application Registration page
5. You can now select your new Service Now WIM for any existing or new project.
From the Registered Projects
page, select an existing project for editing via the pencil icon:
At the bottom there is a dropdown to let you select from all currently configured types of Work Item Management
Select myServiceNow
(or whatever you named your connection) from the choices
and then select Update Project. Change all existing projects that you want to use Service Now with, as desired.
6. ServiceNow work items will be available from the the Issues drop down on the Git Commit page during Check-in for projects using it:
That concludes Service Now setup.