Service Requests get intermittently closed by the workflow account.
I am noticing that a workflow has changed some service requests from in progress to Completed although there are still pending activities in the Activities area.  Does anyone know how to troubleshoot this?
August 8th, 2012 9:18pm

Are _all_ of the activities in "Pending"?

Does the service request change to "Completed" almost immediately after it changes to "In Progress"? (Check the history tab).

If so, it's because of a workflow race condition..it's rare but it happens. The workaround (for now) is to ensure that every activity in your service request template has it's Status set to "Pending". (I've submitted this bug to Microsoft.)

Free Windows Admin Tool Kit Click here and download it now
August 8th, 2012 9:38pm

yes all the activities are in pending.  The workflow process closes the call so quickly that even the first activity does not get to in Progress.  What is a workflow race condition? Is there a way in the Gui to set a service request activity from a template to Pending?
August 9th, 2012 6:50am

It looks like the Workflow that changes a service request from in progress to completed incorrectly identifies an activity before it gets changed to either pending or in progress.  Since a different workflow changes their status If the activity workflow is too slow the Service request activity workflow will close the call.  This is the only thing that seems logical.
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 9:39pm

What you just described is the race condition. A race condition is a flaw in parallel processing design or implementation where two processes that _should_ be sequential are not sequential. In this case, the service request status can be set before the activity status can be set.

Unfortunately, in the console, there's no way to set a manual, review, or runbooks activity's status to "Pending" because their forms do not expose that field. You'll have to edit the template XML directly for those activities.

August 15th, 2012 1:46pm

So in the template wouldn't you only need to set the first activity to in progress for the race condition to not happen?
Free Windows Admin Tool Kit Click here and download it now
August 15th, 2012 4:46pm

You probably wouldn't want to set it to In Progress (what if you have a workflow that triggers when the first activity changes from "Pending" to "In Progress"? If it's "In Progress" initially, your workflow would never fire). You can just set it to Pending.

And you are correct, you could get away with setting just the first activity to pending..just make sure it's the activity with SequenceId = 0. But, to be consistent, it wouldn't hurt to set all activities to pending (afterall, what if someone re-orders the activities one day, but forgets to set the new first activity to Pending?)

August 15th, 2012 5:06pm

So in the XML I would need to add this line for the activities?

<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">Pending</Property>

Free Windows Admin Tool Kit Click here and download it now
August 15th, 2012 5:18pm

Close, but recall that Status is an enumeration. So the value is actually a Guid. There's two ways to set it..with the Guid directly:

<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">50C667CF-84E5-97F8-F6F8-D8ACD99F181C</Property>

or with an MP reference like this:

<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">$MPElement[Name='CustomSystem_WorkItem_Activity_Library!ActivityStatusEnum.Ready']$</Property>

The $MPElement token automatically references the Guid for that particular mp element..and it's more readable by a human :) (Unless you start memorizing GUIDs for fun..not that I recommend that)
  • Marked as answer by Misha Rudiy Wednesday, August 15, 2012 9:23 PM
August 15th, 2012 5:29pm

Close, but recall that Status is an enumeration. So the value is actually a Guid. There's two ways to set it..with the Guid directly:

<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">50C667CF-84E5-97F8-F6F8-D8ACD99F181C</Property>

or with an MP reference like this:

<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">$MPElement[Name='CustomSystem_WorkItem_Activity_Library!ActivityStatusEnum.Ready']$</Property>

The $MPElement token automatically references the Guid for that particular mp element..and it's more readable by a human :) (Unless you start memorizing GUIDs for fun..not that I recommend that)
  • Marked as answer by Misha Rudiy Wednesday, August 15, 2012 9:23 PM
Free Windows Admin Tool Kit Click here and download it now
August 15th, 2012 5:29pm

Close, but recall that Status is an enumeration. So the value is actually a Guid. There's two ways to set it..with the Guid directly:

<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">50C667CF-84E5-97F8-F6F8-D8ACD99F181C</Property>

or with an MP reference like this:

<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">$MPElement[Name='CustomSystem_WorkItem_Activity_Library!ActivityStatusEnum.Ready']$</Property>

The $MPElement token automatically references the Guid for that particular mp element..and it's more readable by a human :) (Unless you start memorizing GUIDs for fun..not that I recommend that)
  • Marked as answer by Misha Rudiy Wednesday, August 15, 2012 9:23 PM
August 15th, 2012 5:29pm

Close, but recall that Status is an enumeration. So the value is actually a Guid. There's two ways to set it..with the Guid directly:

<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">50C667CF-84E5-97F8-F6F8-D8ACD99F181C</Property>

or with an MP reference like this:

<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">$MPElement[Name='CustomSystem_WorkItem_Activity_Library!ActivityStatusEnum.Ready']$</Property>

The $MPElement token automatically references the Guid for that particular mp element..and it's more readable by a human :) (Unless you start memorizing GUIDs for fun..not that I recommend that)
  • Marked as answer by Misha Rudiy Wednesday, August 15, 2012 9:23 PM
Free Windows Admin Tool Kit Click here and download it now
August 15th, 2012 5:29pm

Thanks Aaron this did the trick for me.  So did you go through and change your Default Manual, Review Parallel etc activities to Pending to take care of this problem for all your activities?
August 15th, 2012 9:25pm

Is the Race condition fixed with SP1 or do I have to continue editing the XML of each MP?

Thanks!


Nevermind- I got my own answer in our test environment that no, it is not fixed at this time.  : )
  • Edited by CShaner Friday, February 22, 2013 9:17 PM new information
Free Windows Admin Tool Kit Click here and download it now
February 22nd, 2013 9:12pm

Is the Race condition fixed with SP1 or do I have to continue editing the XML of each MP?

Thanks!


Nevermind- I got my own answer in our test environment that no, it is not fixed at this time.  : )
  • Edited by CShaner Friday, February 22, 2013 9:17 PM new information
February 22nd, 2013 9:12pm

Is the Race condition fixed with SP1 or do I have to continue editing the XML of each MP?

Thanks!


Nevermind- I got my own answer in our test environment that no, it is not fixed at this time.  : )
  • Edited by CShaner Friday, February 22, 2013 9:17 PM new information
Free Windows Admin Tool Kit Click here and download it now
February 22nd, 2013 9:12pm

Is the Race condition fixed with SP1 or do I have to continue editing the XML of each MP?

Thanks!


Nevermind- I got my own answer in our test environment that no, it is not fixed at this time.  : )
  • Edited by CShaner Friday, February 22, 2013 9:17 PM new information
February 22nd, 2013 9:12pm

Hi

We had the same problem and open a support issue with Microsoft. We ended up with makeing a runbook in orchestrator as a workaround. We got information from Microsoft that they think this bug will be fixed in SP1 cu2.

Regards Jon 

Free Windows Admin Tool Kit Click here and download it now
February 25th, 2013 8:13am

Hey Guys,

I have created a quick utility that will take export files and update the runbook activity template activities to 'in progress' initially -- it is available at http://scorch.codeplex.com/releases/view/103351 and the source code is available at http://scorch.codeplex.com/SourceControl/changeset/view/27750#360720 if anyone is interested. If anyone would like it to work with additional activity types let me know and I can get a new revision out.

March 13th, 2013 4:06pm

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Tuesday, November 18, 2014 3:53 AM
  • Unproposed as answer by Misha Rudiy Tuesday, November 18, 2014 6:12 PM
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2014 3:53am

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Tuesday, November 18, 2014 3:53 AM
  • Unproposed as answer by Misha Rudiy Tuesday, November 18, 2014 6:12 PM
November 18th, 2014 3:53am

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Tuesday, November 18, 2014 3:53 AM
  • Unproposed as answer by Misha Rudiy Tuesday, November 18, 2014 6:12 PM
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2014 3:53am

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Tuesday, November 18, 2014 3:53 AM
  • Unproposed as answer by Misha Rudiy Tuesday, November 18, 2014 6:12 PM
November 18th, 2014 3:53am

It was actually fixed in SCSM 2012 SP1 UR2 as outlined here.  http://blogs.technet.com/b/servicemanager/archive/2013/04/11/update-rollup-2-for-system-center-2012-service-pack-1-service-manager-updates.aspx

Free Windows Admin Tool Kit Click here and download it now
November 18th, 2014 6:11pm

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

July 24th, 2015 2:15am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 2:15am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

July 24th, 2015 6:07am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 6:07am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Friday, July 24, 2015 6:07 AM
  • Unproposed as answer by Misha Rudiy 16 hours 30 minutes ago
July 24th, 2015 6:07am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Friday, July 24, 2015 6:07 AM
  • Unproposed as answer by Misha Rudiy Wednesday, July 29, 2015 2:47 PM
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 6:07am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Friday, July 24, 2015 6:07 AM
  • Unproposed as answer by Misha Rudiy Wednesday, July 29, 2015 2:47 PM
July 24th, 2015 6:07am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Friday, July 24, 2015 6:07 AM
  • Unproposed as answer by Misha Rudiy Wednesday, July 29, 2015 2:47 PM
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 6:07am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

July 24th, 2015 6:08am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 6:08am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Friday, July 24, 2015 6:08 AM
  • Unproposed as answer by Misha Rudiy 16 hours 30 minutes ago
July 24th, 2015 6:08am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Friday, July 24, 2015 6:08 AM
  • Unproposed as answer by Misha Rudiy Wednesday, July 29, 2015 2:47 PM
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 6:08am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Friday, July 24, 2015 6:08 AM
  • Unproposed as answer by Misha Rudiy Wednesday, July 29, 2015 2:47 PM
July 24th, 2015 6:08am

it is fixed for SCSM 2012 R2 in UR4.

Service Manager 2012 R2  UR4 has fix for this issue of Race Condition.

  • Proposed as answer by RBANSAL [MSFT] Friday, July 24, 2015 6:08 AM
  • Unproposed as answer by Misha Rudiy Wednesday, July 29, 2015 2:47 PM
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 6:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics