Comments (13)
Good morning, Herve,
I need to integrate Service Now with Archi. I have installed the plugin for Archi 4 but I have problems to understand the .ini file. Could you give me a hand to set up the file?
Thanks and best regards,
Javier.
from snow-import-plugin.
Hi Javier,
To be honest, the ServiceNow plugin has not been used by a lot of people. It may not be very useful for you as it has been developed to map full ServiceNow tables to Archi and it was more than 2 years ago. I do not know if the plugin still works with the actual datamodel of ServiceNow.
This said, the ini file has got comments that explain the different fields to fill in.
So could you be a bit more explicit about the help you require and I'll do my best to assist you.
Best regards
Hervé
from snow-import-plugin.
Good Morning,
I want to load a Service Now table in Archi. The table is cmdb_ci_database.
To do that, I only have the following in the .ini file.
Then I give "File / import / import from service now" but it gives me an error.
Could you tell me what the error is?
Thanks and best regards,
Javier.
from snow-import-plugin.
SNowPlugin.version = 1.1
log4j.rootLogger = ALL, SNowPlugin
log4j.appender.SNowPlugin = org.apache.log4j.FileAppender
log4j.appender.SNowPlugin.ImmediateFlush = true
log4j.appender.SNowPlugin.Append = false
log4j.appender.SNowPlugin.encoding = UTF-8
log4j.appender.SNowPlugin.File = C:\archimate-import_servicenow.log
log4j.appender.SNowPlugin.layout = org.apache.log4j.PatternLayout
log4j.appender.SNowPlugin.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %-5p : %m%n
servicenow.site = https://dev64799.service-now.com/
servicenow.user = admin
servicenow.pass = Vz3BOzWVge8z
archi.elements.id = sys_id
archi.elements.name = name
archi.elements.documentation = short_description
archi.elements.folder = sys_class_name
##
## Generic Archi elements properties
##
archi.elements..sys_id = sys_id
archi.elements..sys_class_name = sys_class_name
## mapping between ServiceNow CI and Archi elements
## SystemSoftware
archi.elements.cmdb_ci_database.mapping = "SystemSoftware"
archi.elements.cmdb_ci_database.folder = "Business"
from snow-import-plugin.
I have managed to connect to the Service Now Database.
I commented: I have a table called "x_252969_test_cmdb_ci_database". In that table I have 6 records. The columns are: Active, Number, Name, Description, Type, Version.
How do I have to put this in the .ini code so that I get the properties in ARCHI.
With the following code I only load the 6 objects of type "SystemSoftware" and in the properties only the sys_class_name and sys_id. How do I have to put it so that I put all the properties?
I put only the code part of the properties
Thanks and best regards,
Javier.
from snow-import-plugin.
....
....
...
archi.elements.id = sys_id
archi.elements.name = name
archi.elements.documentation = short_description
archi.elements.folder = sys_class_name
##
## Generic Archi elements properties
##
archi.elements.x_252969_prueba_cmdb_ci_database.sys_id = sys_id
archi.elements.x_252969_prueba_cmdb_ci_database.sys_class_name = sys_class_name
## mapping between ServiceNow CI and Archi elements
## Locations
archi.elements.x_252969_prueba_cmdb_ci_database.mapping = "SystemSoftware"
archi.elements.x_252969_prueba_cmdb_ci_database.folder = "prueba"
from snow-import-plugin.
Hi,
The plugin is effectively a bit too old to work with the latest version of Archi (4.2):
- class IRelationship renamed to IArchimateRelationship
- method getDefaultFolderForElement has been replaced by a method getDefaultFolderForObject
I recompiled a new 1.2 version with these 2 changes and it works with my ServiceNow access :-)
Please note that you also need to double the backslash in your log filename (i.e. C:**\**archimate-import_servicenow.log).
Best regards
Hervé
from snow-import-plugin.
Thank you very much for the help Herve91,
Regarding the .log file:
• Regarding the .log file, do not believe me and yes I have put the double bar, is it necessary to have created the .log previously?
• Yes, I have the double the backslash
Regarding the behavior of the .ini I have some doubts. If you can connect to my instance in Service Now:
servicenow.site = https://dev64799.service-now.com/
servicenow.user = admin
servicenow.pass = Everis01
You can see that I have an application called test and in it a table called "x_252969_prueba_cmdb_ci_database" with the following fields: Active, Number, Name, Description, Type, Version, etc.
These fields do load me in the properties of the objects, putting it in the following way:
The problem comes when you create the objects, you create them all with the name "System Software". How do I have to do it so that I put the names and the documentation in each one of the objects? I do not mean in the "propierties" tab but in the "main" tab of each object.
Could you give me your email and we talk better? Would be a great help
I hope you have explained me well.
Thanks and best regards,
Javier.
from snow-import-plugin.
I do not need a proxy. The code of the servicenow.ini that I use is the following:
SNowPlugin.version = 1.1
##
## logfile properties
## ------------------
## Used to manage the log file. All the Log4J properties may be used.
##
log4j.rootLogger = ALL, SNowPlugin
log4j.appender.SNowPlugin = org.apache.log4j.FileAppender
log4j.appender.SNowPlugin.ImmediateFlush = true
log4j.appender.SNowPlugin.Append = false
log4j.appender.SNowPlugin.encoding = UTF-8
log4j.appender.SNowPlugin.File = C:\\archimate-import_servicenow.log
log4j.appender.SNowPlugin.layout = org.apache.log4j.PatternLayout
log4j.appender.SNowPlugin.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %-5p : %m%n
##
## ServiceNow properties
## ---------------------
## Used to specify how to retrieve data from theServiceNow website.
## servicenow.site = URL spécifies the URL of ServiceNow web site
## servicenow.user = username spécifies the credentials to send to ServiceNow
## servicenow.pass = password
## servicenow.sysparm_limit = nb specifies the maximum number of CIs to retrieve
## if not specified or if zero, then ServiceNow
## limits to 10.000 objects
##
servicenow.site = https://dev64799.service-now.com/
servicenow.user = admin
servicenow.pass = Everis01
#servicenow.sysparm_limit = 50000
##
## Archi elements properties
## -------------------------
## Used to map ServiceNow objects (CI) to Archi elements
## The following properties allow to specify the ServiceNow column that contains the desired value.
## One may use double quote to specify a constant or slashes to specify a path.
##
## archi.elements.id default ID of the Archi element
## archi.elements.name default name of the the Archi element
## archi.elements.documentation default documentation of the Archi element
## archi.elements.folder default folder where the Archi element will be created
##
## archi.elements.<SNow table>.mapping Type of the Archi element to create for each CI in the ServiceNow table
## archi.elements.<SNow table>.id ID of the Archi element
## archi.elements.<SNow table>.name Name of the the Archi element
## archi.elements.<SNow table>.documentation Documentation of the Archi element
## archi.elements.<SNow table>.folder Folder where the Archi element will be created.
##
## All the other properties will be mapped to Archi properties
## <Snow table> may be replaced by a star '*' to be used for all the ServiceNow tables.
##
archi.elements.id = sys_id
archi.elements.name = name
archi.elements.documentation = short_description
archi.elements.folder = sys_class_name
##
## Generic Archi elements properties
##
archi.elements.x_252969_prueba_cmdb_ci_database.sys_id = sys_id
archi.elements.x_252969_prueba_cmdb_ci_database.sys_class_name = sys_class_name
archi.elements.x_252969_prueba_cmdb_ci_database.active = u_active
archi.elements.x_252969_prueba_cmdb_ci_database.numero = u_numero
archi.elements.x_252969_prueba_cmdb_ci_database.nombre = u_nombre
archi.elements.x_252969_prueba_cmdb_ci_database.descripcion = u_descripcion
archi.elements.x_252969_prueba_cmdb_ci_database.tipo = u_tipo
archi.elements.x_252969_prueba_cmdb_ci_database.version = u_version
archi.elements.x_252969_prueba_cmdb_ci_database.propietario = u_propiedad_de
archi.elements.x_252969_prueba_cmdb_ci_database.grupo_propietario = u_grupo_propietario
archi.elements.x_252969_prueba_cmdb_ci_database.aprobador = u_aprobador
archi.elements.x_252969_prueba_cmdb_ci_database.grupo_aprobacion = u_grupo_aprobacion
archi.elements.x_252969_prueba_cmdb_ci_database.grupo_soporte = u_grupo_de_soporte
archi.elements.x_252969_prueba_cmdb_ci_database.grupo_soporte2 = u_grupo_de_soporte_2
archi.elements.x_252969_prueba_cmdb_ci_database.grupo_soporte3 = u_grupo_de_soporte_3
archi.elements.x_252969_prueba_cmdb_ci_database.creado = u_aprobador
archi.elements.x_252969_prueba_cmdb_ci_database.actualizado = u_actualizado
## mapping between ServiceNow CI and Archi elements
## SystemSoftware
archi.elements.x_252969_prueba_cmdb_ci_database.mapping = "SystemSoftware"
archi.elements.x_252969_prueba_cmdb_ci_database.folder = "prueba"
from snow-import-plugin.
Hi,
My apologies for this late answer, I just came back from holidays and spent a lot of time on roads these last days.
Basically, the ini file maps ServiceNow tables content to Archi components.
To check your ServiceNow structure, you may retrieve the following web service:
https://dev64799.service-now.com/api/now/table/x_252969_prueba_cmdb_ci_database?sysparm_exclude_reference_link=true
Then you can see that there is no "name" property, so the mapping "archi.elements.name = name" lead to elements having no name, which is not permitted in Archi so the name defaults to the elements class.
In the opposite, you can see that there is a property called "u_nombre" which should be what you are searching for. So I believe you should replace the previous mapping by "archi.elements.name = u_nombre".
And same for "archi.elements.documentation = u_descripcion"
Hope this helps
Best regards
Hervé
from snow-import-plugin.
Good morning Herve,
Thank you very much for the contribution. You are saving my life! All objects are already created correctly.
Doing tests, I think I have detected an error.
If you modify the properties of the object in Archi, for example, I modify the properties "Active", "Descripcion" and "Tipo" of the object "0prueba_borrar",
and then import again from Service Now (File-> Import-> Import from Service Now); it only modifies the "Active" property (false-> true), because it is the first property in alphabetical order. It does not modify either the "Description" property or the "Type" property.
Reviewing the code, I think the error may be in this loop on line 308, since it seems that in this loop it takes the properties and checks without having to update them or not, and apparently only takes the first property in alphabetical order.
for (Iterator i = element.getProperties().iterator(); i.hasNext(); ) {
IProperty elementProperty = i.next();
if ( elementProperty.getKey().equals(propertyName) ) {
if ( propertyValue.equals(elementProperty.getValue()) )
logger.trace(" existing property " + propertyName + " is not updated as value "" + propertyValue + "" is unchanged.");
else
if ( isSet(propertyValue) ) {
logger.trace(" existing property " + propertyName + " is updated from value "" + elementProperty.getValue() + "" to value "" + propertyValue + """);
elementProperty.setValue(propertyValue);
} else
logger.trace(" existing property " + propertyName + " is not updated from value "" + elementProperty.getValue() + "" to empty value.");
break nextProperty;
}
}
If I modify some property in Archi, it must be modified according to the properties of Service Now.
Can you help me? Thanks for the support.
Greetings,
Javier.
from snow-import-plugin.
Another doubt ... is there any way to recognize the accents in the properties? For example, in the "aprobador" property, it should be: “José Manuel Gómez Rodríguez” but write “José Manuel Gómez RodrÃguez”
from snow-import-plugin.
Hi,
I effectively found the property update and solved it. I let you check the 1.2.1 version. Please note that you'll have to update the property "SNowPlugin.version" to "1.2.1" at the top of the ini file.
As for the accents, this is not related to my plugin but to Archi. You need to run Archi in UTF-8, adding the following line to the archi.ini file (in Archi's folder): -Dfile.encoding=UTF-8
I close this case. Please do not hesitate to open a new one if you discover other issues.
Best regards
Hervé
from snow-import-plugin.
Related Issues (17)
- Feature request: support ServiceNow plugin in ACLI HOT 1
- Specifying a filter is being added as a separate sysparm_query and is ignored by SN
- latest version SNOW plugin HOT 1
- Plugin not working with Archi 4.8.1 HOT 2
- Is it possible to add an explicit license? HOT 3
- log4j vulnerability HOT 3
- Plugin not working with 2FA authent HOT 2
- Current SNOW support HOT 1
- Relationships HOT 16
- pass objects from service now to Archi HOT 5
- Plugin is not working with Archi4.5 HOT 2
- Add filter on URL of import of relationships - useful for large sets HOT 4
- When Java exception is thrown due to JSON parse log the raw JSON for the culprit CI HOT 2
- Fetching and parsing SN relationships per type instead of all in a single request HOT 1
- NumberFormatException when applying valid filter &sysparm_display_value=true on CI mapping HOT 2
- Exception encountered due to whitespace in link value to be dereferenced HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snow-import-plugin.