- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2016 02:47 AM
Can anyone guide me on how to call and pass parameters to jar files placed on mid server via business rule onSubmit of incident
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2016 10:17 PM
Hi all,
I was able to successfully able to call the custom jar deployed on mid-server via business rule.
var id=current.sys_id;
var desc= current.description;
var _ecc = new GlideRecord("ecc_queue");
_ecc.initialize();
_ecc.agent = "mid.server.server"; //put your MIDserver name here
_ecc.queue = "output"; //Hard coded value
_ecc.topic = "Command"; //Hard coded value
_ecc.source = "Run command"; //put any string value
_ecc.name="PowerShell name"; // put your PowerShell or command shell here
_ecc.payload='<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="name" value=" Your Command here'"/></parameters>'; //Hard coded value
_ecc.insert();
Regards
Jai Kishan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2016 04:16 AM
Hi Jal,
There is some relevant info here:
What steps have you already carried out? Have you already deployed the jar file on the MID Server?
Best Regards
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2016 04:26 AM
Hi Tony,
Yes I have deployed the jar onto my mid server, I am able to execute the call file from ECC queue (Step followed as given in the video).
Now I am looking to execute the jar through workflow or through business rule on incident table.
Regards
Jai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2016 10:17 PM
Hi all,
I was able to successfully able to call the custom jar deployed on mid-server via business rule.
var id=current.sys_id;
var desc= current.description;
var _ecc = new GlideRecord("ecc_queue");
_ecc.initialize();
_ecc.agent = "mid.server.server"; //put your MIDserver name here
_ecc.queue = "output"; //Hard coded value
_ecc.topic = "Command"; //Hard coded value
_ecc.source = "Run command"; //put any string value
_ecc.name="PowerShell name"; // put your PowerShell or command shell here
_ecc.payload='<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="name" value=" Your Command here'"/></parameters>'; //Hard coded value
_ecc.insert();
Regards
Jai Kishan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2020 01:15 AM
Hi jkishan,
I have execute the below command in java using the jar file
java -jar vosp-api-wrappers-java-20.3.6.1.jar -vid xxxxxx -vkey xxxxxx -action getappbuilds -outputfilepath c:\javawrappers\getappbuilds.xml
it's loading the data in the specified output file.
Now i want to run the same command so i need to pass the -vid,-vkey and -action.how to do it,could you suggest me.
Thanks,
Pavani.