Error using Stop Runbook Job activity (Orchestrator IP)


I am getting the following error when using the Stop Runbook Job activity from the Orchestrator IP:

An error occurred while processing this request.

Exception: DataServiceQueryException
Target site: DataServiceRequest.Execute

Stack trace:
at System.Data.Services.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
at System.Data.Services.Client.DataServiceQuery1.Execute()
at System.Data.Services.Client.DataServiceQuery1.GetEnumerator()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source)
at System.Data.Services.Client.DataServiceQueryProvider.ReturnSingleton[TElement](Expression expression)
at System.Data.Services.Client.DataServiceQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable1 source)
at OrchestratorInterop.SCOrch.stopRunbookJob(OrchestratorContext sco, Guid JobId) in c:\Projects\TFS\scorch\Orchestrator\Interop\SCOrch.cs:line 542
at OrchestratorIP.Activities.StopRunbook.Execute(IActivityRequest request, IActivityResponse response) in c:\Projects\TFS\scorch\Orchestrator\OrchestratorIP\Activities\StopRunbook.cs:line 42

I have verified that the job ID being passed into it has a Status of running by looking at the jobs in the Orchestration Console and matching the GUID to what I see there.

This failure and error message occurs when the runbook is started from the Runbook Designer and the Runbook Tester and the Orchestration Console

Other activities in the IP work properly with the same configuration settings.

Does anyone know how to fix this?



ittb19 wrote May 5, 2014 at 5:19 PM

Did anyone ever figure out a fix for this? I have the same problem with the Stop Runbook activity.

randorfer wrote May 5, 2014 at 5:51 PM


I haven't had a chance to look at this yet but it sounds reproducible. I will look into it next week while I am at TechEd!


lswords wrote Jun 19, 2014 at 11:14 PM

I've also reproduced this error in two other environments. It's the same error whether you use a valid job ID or not.


jhorton wrote Jun 19, 2014 at 11:14 PM

I get the exact same error. If anyone has come up with a solution I would love to know it. The rest of this IP works great. It is just the one stop policy piece.

jhorton wrote Jun 19, 2014 at 11:55 PM

Answered my own question... I was using the "Runbook ID" from the other tasks to try and kill the runbook instead of getting the actual job ID. I use the following query now to get the proper ID to stop. Obviously I pass in the <<selected id for the runbook>> that I am looking for to stop.

FROM [Orchestrator].[Microsoft.SystemCenter.Orchestrator.Runtime].[Jobs]
WHERE [RunbookId] = <<selected id for the runbook>>
AND [Status] = 'Running'