-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relationships #2
Comments
Hi Javier, In fact, you do not need to adapt your ServiceNow relationships to my plugin, but rather adapt my plugin to your ServiceNow database. My plugin ini file indicates how to convert ServiceNow relationships to Archi relationships. As for elements, you may configure general parameter, and relationship specific mappings. Let's consider the following lines:
For all relationships, the plugin will use the "sys_id" field of the ServiceNow relationship as the Archi relationship ID, the ServiceNow "child" field as the Archi relationship's source, and "parent" field as target. Now, let's consider the following lines:
This indicates that the "a8aab4c26f395900f0721cef8d3ee44a" ServiceNow relationships will be mapped in Archi as AssignmentRelationships, that the Archi relationship's name will be "Is hosted on", and that for those specific relationships, the order of source and target are inverted from what was specified in the global parameters. The "parent" and "child" fileds in serviceNow are the ServiceNow IDs of the elements. So the relationships will be imported if, and only if, your elements have got the same ID between ServiceNow and Archi. So if you imported your elements with the plugin, then the relationships can be imported. As stated previously, I did not use my plugin for a while now. Archi and ServiceNow evolved since I wrote my plugin, so my plugin may need to be adapted for relationships as it needed to be adapted for relationships. So if you fail to do what you wish, please do not hesitate to tell me and I will have a closer look. Best regards |
Thank you very much for the explanation. I'm trying to get access to a Service Now that contains the relationships to see how they are configured and try to pass those relationships to Archi. When I have access and see how the relationships are defined, I tell you. As for the Archi id, surely, for the Service Now objects, as you comment, we will use the Service Now IDs to be able to use the relationships later. Thanks and best regards, |
you're welcome. |
Hello Herve, IArchimateElement target = (IArchimateElement) ArchimateModelUtils.getObjectByID (model, getJsonField (jsonNode, this.iniProperties.getProperty ("archi.relations.dest"))); I understand that this sentence collects each of the target of each relationship, but it catches my attention "archi.relations.dest" should not it be "archi.relations.target"? In the file ServiceNow.ini it is declared as "archi.relations.target = parent" Also, I believe that the "Update" counter is always 0, because it is not updated in any of the steps in the relations part. this.updated = this.totalUpdated = 0; --line 480 Thanks and best regards, |
How could I missed this :-( Thanks a lot for pointing me this issue. I just release the version 1.2.2. which replaced "archi.relations.dest" by "archi.relations.target". Please let me know if it works better ... |
By the way, for your information, I will probably start a version 2 of the plugin which will be much more flexible. I was thinking of something like showing ServiceNow content, and allow the user to find and select the elements and relationships he wishes to download and then find a way to automatically match ServiceNow components with Archi components. So please do not hesitate to send me your requirement or any ideas on how you would like things to work as nothing has started yet ... and you'll have to be patient because I already planned updates on my other plugins and I only have got 2 hands :-) |
Thanks for making the change. If I find another problem, I'll tell you. By the way, have you seen the problem of the variable "update" in the relations part? I think it's always 0. In the elements part, this variable it's fine. At the moment, as I indicated a few days ago, I am waiting to have access to the BD to know how the relationships are configured. It is the only part I have left, since my project consists solely of transferring the elements and relationships of Service Now to Archi. As soon as I have news, I will try to pass the relationships and if I have any problems I will write to you in case you can help me. Thank you very much, |
I'm sorry but at this stage, the plugin is able to create relationships, not update them ... I've got a todo regarding this point line 525 |
Hello again Herve, I'm almost finishing the project and all thanks to your plugin. 1 - When importing the relations, I put it in the following way: But when I see the name of the relationship, it appears empty. Why? 2 - I have several elements with properties that in Service Now are of type "Reference". Is there any way that archi shows the value of the field and not the Service Now reference? For example, the "Owner" field is a reference type field in Service Now. The name of the owner should appear in Archi but the field reference appears instead. Thank you very much and greetings, |
Hi Javier,
The issue here is that once I've got the ID (like the propietario property), I've lost the table name that contains that ID. So I do not have the ability to retreive the name of the owner with a second request. So what I suggest is that I will add a flag somewhere that will allow to switch on or switch off the following of the reference ID. When it is switched off, il will reduce the volume of data transfered and therefore accelerate the download, and when it is switched on, I will allow to specify the field of the referenced link to consider. Something like:
which would take the "name" field of the "owner" property. I believe this would suits your need.
What I'm thinking of (with no preference order - yet):
Please do not hesitate to complete the list :) Best regards |
Thank you very much for the quick response. I will investigate what more options you can include in your add-on. Regarding point 2, will it be available in a new version? I need to deliver a proof of the Service Now - Archi integration this week and this is a big problem for us. As you said, I show you an example of my cmdb_ci_server table: With true (https://sarebqa.service-now.com//api/now/table/cmdb_ci_server?sysparm_exclude_reference_link=true): With false (https://sarebqa.service-now.com//api/now/table/cmdb_ci_server?sysparm_exclude_reference_link=false ): As you see, the "owned by" field is a reference field and shows that its value is in the sys_user table. I also have other reference fields like "Assigned to". Is it possible that you give me a solution with your plugin for my last problem? ? Thank you very much again for the collaboration. Greetings, |
As you see, the information is not directly available in the json result:
So I need to update my code to allow th switch the sysparm parameter on and off, then I need to make a separate call to the link provided by ServiceNow, and finally I need to parse the result to get a specific field. I started to develop the functionnality, but this will take some time. |
Hi Javier, Just to keep you informed ... I'm working very hard for you ... As of today in my dev version, you can specify a property like The plugin will automatically switch the request to "sysparm_exclude_reference_link=false" and will get the "display_name" from the link fiven in the "processor" field. I'm currently implementing the possibility to follow several reference links like After that, I need to fix few issues on the relations side. So you won't have the functionality this week I'm afraid. Best regards |
Dear Javier, I've been working very hard to provide your the ability to follow links. the version 1.3 allows this. Please pay attention, to increase this delivery speed; I've been obliged to change few things in the ini file. To ease the migration between the old and new syntax, I added a lot of details in the comments. Please do not hesitate to drop me a line should you require some help. Best regards |
Dear Hervé
Thank you very much Best regards, |
You're welcome. I close this case. Please do not hesitate to open a new one if required ... And if you find a way to determine the operational status of ServiceNow relations, I'm interested to know. Best regards |
Good morning again Herve91,
I have already managed to pass the objects from Service Now to Archi. Thank you very much!
Now, I am trying to pass the service now relations to Archi and I have some doubts.
1- How should the relationships included in Service Now be so that Archi can read them?
2- Where do you get the id of each relationship? For example: 0454da4c6f7e9940f0721cef8d3ee4b9
3- Do you have to do a mapping for each relationship?
It would be very helpful if you could explain to me the relationship part of the serviceNow.ini file with an example of a Service Now table. You can do it?
Many thanks again and I await your comments.
Greetings,
Javier.
The text was updated successfully, but these errors were encountered: