When using Runbook Automation Activities in SCSM workflows, the call to start the relevant runbook is made using the Orchetsrator web service to the management server.
If the call to Orchestrator fails, the runbook activity will fail, and an entry will be added to the log stating ‘Runbook invocation failed because the Runbook contract has changed. See the eventlog for additional information’.
In my experience, at this point most people go straight to their preferred search engine for more information. While doing that may lead to a fix, I highly recommend looking at the event log as advised, as there are many things that can cause this failure, and most of the time the Operations Manager log will give you more detail as to where the issue.
As an example, I did a quick Bing search on this error and found a number of articles discussing issues with special charatcters in the workflow account password. This was nothing like the issue causing this failure for me.
When looking at the logs, as advised, I found a number of Error entries on calling this runbook, and one in particular provided a big hint as to where the issue was….
I could tell this error was directly related to the issue I was experiencing as the activity ID was in the event, and I could see straight away that there was an issue querying the Orchestrator web service. The event displays the query being attempted and a returned HTTP error code of 404, which most will recognise as the code for ‘Not Found’!
So, I tested the link and found that the page could not be found. I then updated the query to remove the guid (http://server:81/Orchestrator2012/Orchestrator.svc/Runbooks) to see if I would get a list of all my runbooks, but although the page loaded, no runbooks were listed. This at least proved the issue was on the Orchestrator side, and not on the SCSM side…. (which is a refreshing change :-))
After simply restarting the Orchestrator services, the query in the event returned the correct runbook, and my edited query for all runbooks returned all runbooks!
I then tested a new request in SCSM and the Runbook Automation Activity run exactly as expected.
So, this was my experience, but as I mentioned at the beginning of this post, there are a whole number of reason why this may occur. To save yourself time, and to not waste effort investigating in the wrong places, check the event log so you are equpped with as much information as possible to help find the cause and resolution!!