Postal Task for Orchestrator Runbook
I works great with the task in scsm console. But i want to create a task on the portal that runs the same command line as the task in scsm. Is that possible?
Best Answer
-
Geoff_Ross Cireson Consultant O.G.Hi Tom,
It's not possible to trigger a windows application from the portal due to modern brower security. There's a coupe of options though.
You can trigger the runbook via the Orchestrator web service with some JavaScript that runs when you click the task. This is possible but very fiddley.
Easier is to replicate the functionality of that runbook directly in the JavaScript using the provided portal APIs to interact with Service Manager. I'm not certain on SR to CR but we definitely have examples of other conversion tasks in the downloads section that could be adapted.
Geoff
6
Answers
It's not possible to trigger a windows application from the portal due to modern brower security. There's a coupe of options though.
You can trigger the runbook via the Orchestrator web service with some JavaScript that runs when you click the task. This is possible but very fiddley.
Easier is to replicate the functionality of that runbook directly in the JavaScript using the provided portal APIs to interact with Service Manager. I'm not certain on SR to CR but we definitely have examples of other conversion tasks in the downloads section that could be adapted.
Geoff
https://ciresondevops.codeplex.com/releases/view/618275
To launch a Orchestrator runbook directly, you can use the webservice also, but the feedback is limited and takes time to finish compared to above task.
How to trigger a runbook using webservice
Morten_Meisler said: Ended up using the first link above as a base and changed it to work for SR to CR. Works great! And it is much faster than using a runbook. Changing it was not hard, even with my very basic javascript skills.
Now i am working on changing the dialog so the analyst can choose type of change ( Normal, Emergency, pre-approved). And based on the answer the function uses the id of the right template. now it uses a kendo.ui.ExtYesNoDialog.show. I guess its here i need to use another dialog to add buttons for each change type. but i have had no luck yet.
Any help would be great
Attached is and example of how I invoke orchestrator runbooks from the custom task in the portal. it works fine for IE however in chrome it fails doe to cross domain calls not supported same way.
However it allows you to invoke the runbook via a post to the runbook server
Someone with a better understanding of CORS may be able to make it work in Chrome.