Home > Service Manager, System Center > Related Incident and Problem closure workflow Activities

Related Incident and Problem closure workflow Activities

This library I wrote contains 3 custom workflow activities for closing related Incidents on Problems and Change Requests, or related Problems on Change Requests:

· Problem_CloseRelatedIncidents – Use to close Incidents Related to a Problem

· ChangeRequest_CloseRelatedIncidents – Use to close Incidents Related to a Change Request

· ChangeRequest_CloseRelatedProblems – Use to close Problems related to a Change Request

The activities can be used in a workflow created with the Service Manager Authoring Tool. The behavior of each activity is as described above, with exception of the ChangeRequest_CloseRelatedIncidents activity which is overreaching and will close not only Incidents directly related to the Change Request but also Incidents related to Problems which are related to the Change Request. I probably should have made the overreaching behavior optional, but oh well… it is what it is for now.

Making the Activities available in the Authoring Tool

  1. Copy the library – RelatedIncidentClosure.WorkflowAuthoring.ActivityLibrary.dll – to “C:\Program Files (x86)\Microsoft System Center\Service Manager 2010 Authoring\Workflow Activity Library” on a computer where the Authoring Tool is installed.
  2. Run the Authoring Tool.
  3. Click on View | Activities Toolbox.
  4. In the Activities Toolbox window,
  • If you do not already have a group for custom activities, right-click on the ‘Activities Group’ node (the top most) and select ‘New Group’. Specify a name for the new group.

  • Right-click on your custom activities group and select ‘Choose Activities…’

  • On the ‘Choose Activities for a Group’ popup, click the ‘Add Custom Activities…’ button.

  • On the ‘Select Custom Activity Assembly’ popup, you should see ‘RelatedIncidentClosure.WorkflowAuthoring.ActivityLibrary’. Select it and click Open.

  • Back on the Choose Activities for a Group popup, check the 3 activities in the library and click OK.

  • Back in the Activities Toolbox, the activities will be visible and available for use

Sample use of an Activity

For this example, I’ll create a workflow that is triggered when a Change Requests status changes to Closed.  We will use the  ChangeRequest_CloseRelatedIncidents activity to automatically
close all incidents related to the change request, specifying a resolution

1. Run the Authoring Tool and create a workflow. I am not including details on creating the workflow because there is nothing different so far. You should end up with an empty sequential workflow with no activities.

2. From your custom activities group, drag ChangeRequest_CloseRelatedIncidents to the drop area of the sequential workflow.

3. The red exclamation icon is a validation check indicating that a required value is missing. With the Activity selected, specify the following values in the Details Window (if the Details Window is not visible, select it from the View menu of the Authoring Tool)

a. ChangeRequestId:Click the ellipsis button next to the value field. In the popup window, select ‘Use a class property’ and select the ‘ID (internal)’ property.

b. IncidentResolutionCategoryId: This is an optional value. If specified, the resolution category will be set on the incident when it is closed. This value needs to be the EnumTypeId of the resolution category. For example, the EnumTypeId of “Fixed by Analyst” incident resolution is: C5F6ADA9-A0DF-01D6-7087-6B8500CA6C2B
For a query on how to get the EnumTypeId, see my blog post:
Quick Enum from database query.

4. Compile the workflow by clicking ‘File | Save All’ in the Authoring Tool.

5. Copy the management pack .dll generated by the Authoring Tool and RelatedIncidentClosure.WorkflowAuthoring.ActivityLibrary.dll to “\Program Files\Microsoft System Center\Service Manager 2010” on your Service Manager Server

6. Import the management pack XML and test the workflow.

Download the library

  1. Andrés Cisternas
    October 12, 2011 at 9:46 am

    i need close Incidents Related to a Incident, it’s posible?

    • Kan
      October 12, 2011 at 8:38 pm

      Sorry Andres, I am not actively working with Service Manager at the moment.

  2. June 18, 2012 at 12:07 pm

    This was a great add-on for SCSM 2010 and worked flawless for us. We have just upgraded to SCSM 2012 RTM and it broke our external email service :-(.

    Service Manager exception: An object of class ManagementPack with name System.WorkItem.Incident.Library was not found.

    Such a Shame!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: