Summary

How to configure ServiceNow and Tachyon so that ServiceNow can be used to approve Tachyon actions and scheduled instructions.

This feature is not related to 1E ITSM Connect.

On this page:

Configuring integration between Tachyon and ServiceNow

Set the DefaultWorkflow value in the Tachyon Master database

The animation opposite illustrates the following steps, using Notepad.exe to make the changes to the DefaultWorkflow string:

  1. Using SQL Server Management Studio, connect to the TachyonMaster database on the SQL server where the Tachyon Master database was installed.
  2. The dbo.WorkflowTemplate table shows the available workflows. There are two for ServiceNow: ServiceNow Approval and ServiceNow Scheduled Instruction Approval.
  3. Edit the dbo.GlobalSetting table
  4. Change the DefaultWorkflow value to the following:

    [{"ReferenceType":0,"InstructionWorkflow":[{"InstructionType":0,"Workflow":{"StateMachine":"State"}},{"InstructionType":1,"Workflow":{"StateMachine":"State with Authentication and Approval","Approval":"ServiceNow Approval"}},{"InstructionType":2,"Workflow":{"StateMachine":"State"}}]},{"ReferenceType":2,"Workflow":{"StateMachine":"Scheduled Instruction State with Authentication and Approval","Authenticating":"Scheduled Instruction Authentication","Approval":"ServiceNow Scheduled Instruction Approval","InProgress":"Scheduled Instruction InProgress","Cancelling":"Scheduled Instruction
    Cancelling"}}]

    The specific changes are: 

    1. Add the Approval workflow: ,"Approval":"ServiceNow Approval" to InstructionType 1 (the Action type)

    2. Modify the existing "Approval":"Scheduled Instruction Approval" for InstructionType 2 (the Scheduled Instruction type) to be: "Approval":"ServiceNow Scheduled Instruction Approval"


Store the ServiceNow credentials for access by the Network Service account

The integration with ServiceNow is performed by a module of the 1E Tachyon Coordinator service. By default this service runs under the Network Service account. To enable the integration to be appropriately authorized the Network Service account will need to access the ServiceNow account credentials. To ensure that these account credentials are stored securely, Tachyon makes use of the Microsoft Credential Manager - available via the command-line using cmdkey.exe. The account credentials must be stored in the Microsoft Credential Manager using the Network Service account. To do this we use the Microsoft tool psexec to start a command-prompt running under the Network Service account credentials on the Tachyon Server.

The following steps show how to do this and are illustrated in the animation shown opposite:

  1.  On the Tachyon Server open an Administrator command prompt and run the following command:

    psexec -i -u "nt authority\Network service" cmd.exe
  2. A new command-prompt window will appear running under the Network Service account. In this new window run a command of the following form:

    c:\windows\system32\cmdkey.exe /generic:<ServiceNow Instance name> /user:<ServiceNow account username> /pass:<ServiceNow account password>

    where <ServiceNow Instance name> should be replaced by your ServiceNow instance - in our example we use a developer instance> dev26664.service-now.com. <ServiceNow account username> and <ServiceNow account password> should be replaced with the username for an admin account in ServiceNow - in our example we use the default developer instance administration account name admin and the password that has been set for that account.

  3. When run, the command should display: CMDKEY: Credential added successfully.

Subsequently, when the 1E Tachyon Coordinator attempts to access ServiceNow using the account specified it will be able to retrieve the credentials and ensure that the access is allowed.

Edit the 1E Tachyon Coordinator configuration file to enable and set the ServiceNow module details

The 1E Tachyon Coordinator service uses a module to enable ServiceNow integration. This must be set in the 1E Tachyon Coordinator configuration file. After a default installation a tag for this module is already in the configuration file, but commented out. The tag must also be edited to point at the location of the ServiceNow instance that will be used. The following steps, and the animation opposite show how this can be done:

  1. Edit the coordinator configuration file using the administrator account. By default this file is:

    C:\Program Files\1E\Tachyon\Coordinator\Tachyon.Server.Coordinator.exe.config
  2. Locate the <modules> tag

  3. Remove the start <!-- and end --> comments surrounding the Tachyon.Server.ServiceNow module

  4. Set the ServiceNowServer value to the URL for your ServiceNow instance. In our example this value is "https://dev26664.service-now.com", so the <module> tag will look like the following:

    <module assemblyName="Tachyon.Server.ServiceNow"
    providerName="Tachyon.Server.ServiceNow.ServiceNowModule">
       <settings>       
          <add key="ServiceNowSeconds" value="30" />
          <add key="ServiceNowServer" value="https://dev26664.service-now.com"/>   
          <add key="ServiceNowInstruction" value="api/now/table/x_132283_tachyon_instructionsimportset" />
          <add key="ServiceNowScheduledInstruction" value="api/now/table/x_132283_tachyon_scheduledinstructionsimportset"/>
          <add key="ServiceNowQueue" value="api/now/table/x_132283_tachyon_instructionsqueue"/>          
       </settings>
    </module>

After changing the TachyonMaster database and configuring the 1E Tachyon Coordinator configuration file you can perform an IISReset to enable the changes to come into effect immediately, otherwise you will have to wait for the cache to be refreshed - which happens on an hourly basis.

The Tachyon side of the integration will now be in place.

Importing the Tachyon Update Set into ServiceNow

The ServiceNow side of the integration is handled via a ServiceNow Tachyon application that is provided in an XML file. You can download this file by clicking the following link: ServiceNow-updateset.xml. In our example we copy this file to the folder C:\ServiceNow Tachyon Integration on the server we browse to the ServiceNow instance from.

The following steps show how to import the ServiceNow Tachyon application into ServiceNow, and are illustrated in the animation shown opposite:

  1. Log onto your ServiceNow instance as an administrator
  2. Locate the System Update Sets category. In our example we find this using the filter field above the navigation panel.
  3. Under System Update Sets click on the Retrieved Update Sets page.
  4. Click on the Import Update Set from XML link on the page.
  5. On the Import XML page click on the Choose File button.
  6. In the Open dialog locate and open the ServiceNow-updateset.xml file. In our example this is in the folder C:\ServiceNow Tachyon Integration.
  7. Once the file has been chosen click Upload to load it into ServiceNow.
  8. Uploading the file displays the Retrieved Update Sets page with an entry for Tachyon
  9. Click the Tachyon link to display the Retrieved Update Set page for Tachyon, then click Preview Update Set.
  10. After the Update Set Preview has finished building click on the Commit Update Set button to commit the Tachyon application to ServiceNow. Click Close on the Update Set Commit dialog when the commit has finished.
  11. The Tachyon application will now be available in ServiceNow. 
  12. To check this filter for System Applications above the navigation panel, then under System Applications click Applications. You should see a Tachyon application displayed on the right-hand pane.
  13. Now filter for Tachyon above the navigation panel. You should see a heading named Tachyon containing three pages: Instructions, Queue and Scheduled Instructions. These pages are used by Tachyon to manage the integration with ServiceNow and initially they will be empty.

Using ServiceNow to approve Tachyon requests

Once the configuration of the Tachyon ServiceNow integration has been done, approving Tachyon action requests in ServiceNow is relatively simple.

Approving a request to perform an action

The following steps outline the process and this is illustrated in the animation shown opposite:

  1. Choose an action and click the Perform this action button. In our example we use the Tachyon Platform verification stage 2 action, loaded from the 1E-TachyonPlatform product pack.
  2. Confirm your credentials in the dialog subsequently displayed and then click the Confirm and send button.
  3. You will then need to supply the Authentication code. This will be sent to the actioner's email address. Fetch the code and paste this into the Authentication code dialog in Tachyon then click the Submit button.
  4. The Instruction will then move into the pending approval state.
  5. Now switch to ServiceNow and click on the My Approvals page. You will see an entry for the Tachyon action in the Requested state.
  6. Click on the Requested link and after having checked the details for the action request click on the Approve button.
  7. When you switch back to Tachyon you should see the action start to run. Tachyon polls ServiceNow every minute, so you may need to wait that long to see the instruction begin.

Approving a scheduled instruction request

The process for approving scheduled instructions from Tachyon is largely the same as for the approval process for performing actions. Except that it is always necessary to approve scheduled instructions, regardless of whether they are questions or actions. In ServiceNow you still interact with your My Approvals page.