‎15-04-2020 04:24 PM
I want to add the graphql server list from ServiceNow to the hopex server list with a macro or api. Is there an example for this?
‎23-04-2020 05:19 PM
I have two questions. 1) How to transfer information from graph to Rest API with hopex. 2) How can we call and run a macro that I have thrown at you in hopex.
‎23-04-2020 04:59 PM
Hello,
You have to be clear on your goal :
The documentation you reference is for point 1.
I suggest your get in contact with your partner representative to get help on this topic of creating macro.
‎23-04-2020 04:44 PM
Our first goal is to execute this data from Hopex by writing the Graphql Json Data from Servicenow macro in Java. Of course, we take out the java file as a jar and save it in the java / lib folder. If you have a video to do this completely from the beginning, it would be nice or how you can help.
‎23-04-2020 04:37 PM
I did all the operation in the creation of java component in hopex v3 documents on doc.mega.com in order
I ran this command in the document to run the java macro
GetRoot.CurrentEnvironment.GetMacro("MegaPlugin").writeInFile "c:\temp\testfile", "Some text..."
but when i run this command i get the error in the attached picture.
my first aim is to run a macro written in java in hopex.
‎23-04-2020 02:47 PM
Hello, thank you for answering, but your answer is not working. I will write an answer that tells you what I want to do.
‎17-04-2020 09:14 AM
I can't give you example of code just like that. You need to have a pragmatic approach and follow the step :
|
|
|
|
Reading Server deployed in ITPM
query {
serverDeployed {
id
name
comment
beginLifedate
endlifedate
operatingExpenses
}
}
Creating or updating server deployed in ITPM :
mutation createupdate {
createUpdateServerDeployed(id:"sys_id service now" idType:EXTERNAL serverDeployed:{
name:"new server from service now"
comment:"comment comming from service now"
}) {
id
externalId
name
}
}
‎16-04-2020 03:51 PM
You have a sample code to convert JSON from Service Now to a JSON compatible with the GraphQL REST API.
we want to make our own script but need a simple example a video or a code how to do this process
please Mr. oguimard
‎16-04-2020 03:42 PM
I seem to recognize a JSON coming from Service Now ?
You need to convert this JSON from Service Now to a JSON compatible with GraphQL REST API.
This is exactly what is the link I gave you do. It is done using Talend as a mean to do the conversion. Yet, you can develop your own script.
‎16-04-2020 03:38 PM
We want to throw the graphql query result below to the IT Server List in hopex using the macro. To do this, do you have a sample macro code or how can we send this API with code?
{
"result":[
{
"end_date":"10.12.2019 15:30:00","phase":"Executing","number":"PRJ0010010","short_description":"KOPİ (Karşılığı Olmayan Piyasa İşlemleri Projesi)","primary_portfolio":{"display_value":"Piyasa","link":"h target=_blankttp://prpexist.epias.com.tr/api/now/table/pm_portfolio/2bd6f3014c4be3007ee32d4a8f033c..."},"project_manager":{"display_value":"Selcen Toraman","link":"h target=_blankttp://prpexist.epias.com.tr/api/now/table/sys_user/1dff5ab2353b03007ee3d91ba25d953d"},"percent_complete":"63,75","start_date":"17.10.2018 08:00:00"},{"end_date":"01.01.2021 08:30:00","phase":"Executing","number":"PRJ0010011","short_description":"İTEP ( İleri Tarihli Fiziksel Teslimatlı Elektrik Piyasası Projesi )","primary_portfolio":{"display_value":"Piyasa","link":"htt target=_blankp://prpexist.epias.com.tr/api/now/table/pm_portfolio/2bd6f3014c4be3007ee32d4a8f033c..."},"project_manager":{"display_value":"Selcen Toraman","link":"htt target=_blankp://prpexist.epias.com.tr/api/now/table/sys_user/1dff5ab2353b03007ee3d91ba25d953d"},"percent_complete":"17,36","start_date":"11.03.2019 08:30:00"},{"end_date":"25.03.2019 17:00:00","phase":"Delivering","number":"PRJ0010012","short_description":"Oracle 12c upgrade Projesi","primary_portfolio":{"display_value":"BT","link":"htt target=_blankp://prpexist.epias.com.tr/api/now/table/pm_portfolio/9fd47b8d4c0be3007ee32d4a8f033c..."},"project_manager":{"display_value":"Necat Demirağ","link":"htt target=_blankp://prpexist.epias.com.tr/api/now/table/sys_user/24777525143813007ee334f79f07a1b6"},"percent_complete":"100","start_date":"26.11.2018 08:30:00"},{"end_date":"22.03.2019 08:00:00","phase":"Delivering","number":"PRJ0010015","short_description":"Mobil Uygulama Doğal Gaz Modülü","primary_portfolio":{"display_value":"Piyasa","link":"htt target=_blankp://prpexist.epias.com.tr/api/now/table/pm_portfolio/2bd6f3014c4be3007ee32d4a8f033c..."},"project_manager":{"display_value":"Selcen Toraman","link":"htt target=_blankp://prpexist.epias.com.tr/api/now/table/sys_user/1dff5ab2353b03007ee3d91ba25d953d"},"percent_complete":"100","start_date":"27.11.2018 08:00:00"},{"end_date":"03.11.2020 08:00:00","phase":"Executing","number":"PRJ0010019","short_description":"EPYS ( Enerji Piyasası Yönetim Sistemi Projesi )","primary_portfolio":{"display_value":"Piyasa","link":"htt target=_blankp://prpexist.epias.com.tr/api/now/table/pm_portfolio/2bd6f3014c4be3007ee32d4a8f033c..."},"project_manager":{"display_value":"Necat Demirağ","link":"htt target=_blankp://prpexist.epias.com.tr/api/now/table/sys_user/24777525143813007ee334f79f07a1b6"},"percent_complete":"17,78","start_date":"24.07.2018 08:00:00"},{"end_date":"20.05.2019 17:00:00","phase":"Planning","number":"PRJ0010021","short_description":"EPİAŞ Kurumsal Mimari Projesi","primary_portfolio":"","project_manager":{"display_value":"Umut Özfidan","link":"http target=_blank://prpexist.epias.com.tr/api/now/table/sys_user/77aaf917555c73802e63a00265e6f1bd"},"percent_complete":"0","start_date":"20.05.2019 08:00:00"},{"end_date":"10.02.2020 17:00:00","phase":"Delivering","number":"PRJ0010033","short_description":"TEST KS","primary_portfolio":"","project_manager":{"display_value":"Erdem Akman","link":"http target=_blank://prpexist.epias.com.tr/api/now/table/sys_user/e8ff1ab2353b03007ee3d91ba25d958f"},"percent_complete":"100","start_date":"10.02.2020 08:00:00"}]}
‎16-04-2020 03:12 PM
Hello,
i'm not sure I understand your need.
I recommend you to read this information https://community.mega.com/t5/HOPEX-Store/Service-Now-integration/td-p/21383
This is an add-on about integration with Service Now leverging the REST API.
Let me know if this is what you are looking for.