Triggering "Run .Net Script" Activity in Orchestrator Runbook

jansi rani krishnan 601 Reputation points

This is with reference to my earlier question thread "SCSM Bi-directional Integration with ServiceNow"

I am working on another Runbook which contains only two activities as below.

  1. Run .Net Script (Receives the updated information from ServiceNow and converts to the suitable format in order to update)
  2. Update Object (to update in the incident form)

Is there a way where "Run .Net Script" activity gets automatically triggered when we receive the request from SNOW?

Using the Runbook GUID, I can give the SNOW team an endpoint URL to establish the E-bonding (Example: http://<servername>:81/Orchestrator2012/Orchestrator.svc/Runbooks(guid'5f8dc20a-8205-47c5-8a34-6d6a0646892e'))

In order to make ServiceNow send me a request, I need to share them a request and response structure from SCSM end.

Presently, I am unaware of how to retrieve a request and response structure from the Runbook.

I totally struck at this point in implementing the integration bi-directional.

Your inputs will greatly help me to proceed forward.


System Center Orchestrator
System Center Orchestrator
A family of System Center products that provide an automation platform for orchestrating and integrating both Microsoft and non-Microsoft IT tools.
205 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 91,921 Reputation points MVP

    Hi @jansi rani krishnan ,

    you have to specify all the input properties in the ´Initialize Data´ activity (IncidentID, Status, AssignedTo, Classification, Source, ......).
    The IncidentID is the IncidentID in SCSM to find the object in SCSM for update.
    These parameters can be used in the HTTP POST request to the Orchestrator WebService.

    The output of the ´Initialize Data´ activity are the properties with the values posted by the HTTP POST request.
    From there you can get the SCSM incident object by using the IncidentID and update the values of the incident object with values of the other properties (Status, Source, ....)

    There is no need to parse any XML structure if SNOW is calling the Orchestrator Web Service by the URL with values of the input parameters of the ´Initialize Data´ activity.

    The second option is to use the SCO Job Runner:
    This is an easier way. The Orchestrator WebService will be called by the SCOJobRunner.exe with parameters to trigger the runbook in Orchestrator.
    SNOW will start the SCOJobRunner.exe with the required parameters (runbook guid and input parameters). The parameters are defined in the ´Initialize Data´ activity liked described above.
    No need to parse any XML structure in the runbook. It's working the same like described above.
    The difference is just the method to call the Orchestrator WebService.
    First option: Call by an HTTP POST request URL of Orchestrator in SNOW
    Second option:: Run the SCOJobrunner.exe with parameters triggered by SNOW


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Andreas Baumgarten

2 additional answers

Sort by: Most helpful
  1. Andreas Baumgarten 91,921 Reputation points MVP

    Hi @jansi rani krishnan ,

    we had this topic already:

    There are links with the different solutions in the thread.

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Andreas Baumgarten

  2. Stefan Horz 3,081 Reputation points


    you can trigger a Runbook and get the Job information using Orchestrator Web Services with REST:


    0 comments No comments