ServiceNow plugin error

Started by Manj75, August 12, 2019, 08:26:20 AM

Previous topic - Next topic

Manj75

Hi Herve,

I've been evaluating your ServiceNow importer plugin past week for my client.  Service Delivery Team of the organisation are rolling out and expanding ServiceNow to map/discover their technology assets to enable ITIL capabilities, and within the Architecture team I've recently promoted the use of Archi as a standardised design tool and further looking to integrate with ServiceNow to automate the model capture for the Technology Layer, so that Architect/Designers can link Views to high layer views (application and business).

There is limited documentation on the plugin GIT project and I am also new to ServiceNow, but having created a REST API user for Archi in ServiceNow and running for the first time, I saw that it was parsing only to be aborted due to a connection error.  The error states:

Cannot get Cls from ServiceNow web service
MyException: Cannot connect to web site (Error reported by ServiceNow website: code 400)

I presume this is a HTTP 400 error, but only occurs part way through the import parse.  I can also see that there are a number of model concepts populated in the Technology & Physical folder of the model, indicating the error occurs for a particular request.

Can you provide assistance/guidance with resolving this error?

Is there any detailed log file I can look at for the error to determine what CMDB table it fails for?

When submitting this post I noticed your recent update about generating views using JArchi and this looks very promising and also the natural next step that I'd like to take this to.

With regards to ServiceNow plugin is it possible to also import defined Business Services into either Archi Application or Business Service concepts and associate them to technology layer.  I want to be able to create views similar to the SN dependency graphs based on chosen Business Service.

Many Thanks,
Manjit

Hervé

Hi Manjit,

The error code 400 is sent by ServiceNow and means "bad request": The request URI does not match the APIs in the system, or the operation failed for unknown reasons. Invalid headers can also cause this error.

As a first step, you may have a look in the log file that has been generated by the plugin (the filename is in the plugin's configuration file on the line starting with "log4j.appender.SNowPlugin.File"). In this log file, you'll find the HTTP request sent to ServiceNow.

Regarding your last question, the plugin's configuration file allows you to specify how to map ServiceNow tables and Archi classes. So if you know the ServiceNow table that holds your business services, it is easy to translate its content into "ApplicationComponent" or "BusinessService" components.

The configuration file is self documented but please do not hesitate to drop me a line (here or on the plugin's GitHub) and I'll give you a hand  :)

Manj75

Hi Herve,

I had made a lot of progress and through some process elimination I determined the issue of 400 Bad Request was due to requests being made for CMDB tables that do not exist in our ServiceNow environment, primarily those prefixed with 'u_' which I understand to be custom configuration.  After going through the ini file and commenting out it worked very well.

This plugin is a fantastic extension to Archi and is really what we need to integrate Architecture with Service Delivery functions and easily model the physical layer - thank you.

Also, once I have some confidence in this capability I will be looking at your JScript work to generate views from concepts - exactly what I needed as the next step.

Thanks,
Manjit

Hervé

Indeed, tables starting with "u_" are customer customer tables.

Happy to learn that you managed to have the plugin working. Please be aware that it was the first plugin I wrote, so it is quite archaic because all the logical is done through the configuration file.

Also, if you need to import a lot of component from ServiceNow, please to do forget to give a bit more memory to your Archi instance (you may add "-Xmx 1024m" at the end of your archi.ini file).

michel.wicky

Hello Hervé, we expect to manage components and their dependencies from EasyVista CMDB. I saw you write a plugin for Service Now. I would like to know what was the effort, trouble, problem and risks.
Thanks Michel

Hervé

#5
Hi Michel,

To me, as I'm not a dev person, the biggest difficulties were to install an up and running Eclipse environment with Archi sources, and to create the plugin's skeleton from the sample files provided on Archi's web site. In addition, I had to learn learn Archi internal structure, with all its classes and methods.

What I would do if I was starting a new plugin today (and what I would suggest ) is to create a jArchi script, the key advantages beeing:

  • Eclipse is not required
  • Could be tested very easily (no compile required)
  • Java classes (like SWT for graphical interface) call be natively called from jArchi
  • No need to learn the Archi internal java classes as methods are provided to find and update model components

Hope this helps

Best regards
Hervé

michel.wicky

Thank you Hervé, it is clear to me also that jArchi seem the way.