Just the rambling of a tech geek and cloud engineer

Service Requests – Re-assignment notification

So, in an effort to get my business ready for Service Requests as we use mainly Incidents and we are beginning our journey into Service Requests and differentiating between Service Requests (day to day operations) and Incidents (something is broken), I needed to reproduce a workflow to notify the “AssignedToUser” when a new Service Request is assigned to him or her. I already had a downloaded Management Pack for Incident Re-assignment notifications which was modified for my purposes, so this was a good place to start. I found these management packs as a nice start as well. I have since modified these to create a Service Request Re-Assignment Management Pack, as with all my searching, I could not find ANYTHING!!!!

So using the idea from the this site, I ran the SQL command from the blog.


SELECT TOP 1000 [ObjectTemplateId]
,[ManagementPackId]
,[ObjectTemplateName]
,[Accessibility]
,[ObjectTemplateTypeId]
,[ObjectTemplateSubelementXML]
,[TimeAdded]
,[LastModified]
FROM [ServiceManager].[dbo].[ObjectTemplate]

I got some very strange results, as the MP XML I used, needs a GUID for the Template. So, another challenge, no worries. I took all the data from the SQL query and pasted it into Excel. So now, I have noticed that tracking down a GUID for a Template in a Custom MP is not the easiest. I ended up looking at the “Property Field” and was able to determine the Template I needed from the information in the “property field” due to the “Subject” line in my e-mail template. So I copied the GUID. Imported the MP and voila!!! it works like a charm.

If you would like this Management Pack, it is located here as a .docx file. XML code below.

<?xml version="1.0" encoding="utf-8"?>
<ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/Transform</a>">
<Manifest>
<Identity>
<ID>Custom.ServiceRequestAssignmentChanges.Notification</ID>
<Version>7.0.6555.0</Version>
</Identity>
<Name>Service Request Assignment Changes Notification Workflow</Name>
<References>
<Reference Alias="WorkItem">
<ID>System.WorkItem.Library</ID>
<Version>7.0.6555.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="ServiceRequest">
<ID>ServiceManager.ServiceRequest.Library</ID>
<Version>7.0.6555.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="CoreChange">
<ID>System.WorkItem.ServiceRequest.Library</ID>
<Version>7.0.6555.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="SystemCenter">
<ID>Microsoft.SystemCenter.Subscriptions</ID>
<Version>7.0.6555.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="EnterpriseManagement1">
<ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Administration</ID>
<Version>7.0.6555.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="EnterpriseManagement">
<ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
<Version>7.0.6555.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="System">
<ID>System.Library</ID>
<Version>7.0.6555.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
</References>
</Manifest>
<Categories>
<Category ID="Category.Custom.ServiceRequestAssignmentChanges.Notification.ManagementPack" Value="EnterpriseManagement!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">
<ManagementPackName>Custom.ServiceRequestAssignmentChanges.Notification</ManagementPackName>
<ManagementPackVersion>7.0.6555.0</ManagementPackVersion>
</Category>
<Category ID="Category.ServiceRequestAssignmentChanges" Target="ServiceRequestAssignmentChanges" Value="EnterpriseManagement1!Microsoft.EnterpriseManagement.ServiceManager.Rules.WorkflowSubscriptions" />
</Categories>
<Monitoring>
<Rules>
<Rule ID="ServiceRequestAssignmentChanges" Enabled="true" Target="ServiceRequest!System.WorkItem.ServiceRequest.WorkflowTarget" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>System</Category>
<DataSources>
<DataSource ID="DS" TypeID="SystemCenter!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
<Subscription>
<RelationshipSubscription RelType="$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$" SourceType="$MPElement[Name='CoreChange!System.WorkItem.ServiceRequest']$" TargetType="$MPElement[Name='System!System.Domain.User']$">
<AddRelationship />
</RelationshipSubscription>
<PollingIntervalInSeconds>30</PollingIntervalInSeconds>
<BatchSize>100</BatchSize>
</Subscription>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="SystemCenter!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
<Subscription>
<EnableBatchProcessing>false</EnableBatchProcessing>
<WindowsWorkflowConfiguration>
<AssemblyName>Microsoft.EnterpriseManagement.WorkflowFoundation</AssemblyName>
<WorkflowTypeName>Microsoft.EnterpriseManagement.WorkflowFoundation.ConfigurationWorkflow</WorkflowTypeName>
<WorkflowParameters>
<WorkflowParameter Name="InstanceId" Type="guid">$Data/BaseManagedEntityId$
</WorkflowParameter>
<WorkflowArrayParameter Name="NotificationTemplateIdList" Type="guid">
<Item>82E39128-77DF-905B-C782-5FCEDFD2F990</Item>
</WorkflowArrayParameter>
<Item>$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$</Item>
</WorkflowParameters>
<RetryExceptions />
<RetryDelaySeconds>60</RetryDelaySeconds>
<MaximumRunningTimeSeconds>1500</MaximumRunningTimeSeconds>
</WindowsWorkflowConfiguration>
</Subscription>
</WriteAction>
</WriteActions>
</Rule>
</Rules>
</Monitoring>
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="Custom.ServiceRequestAssignmentChanges.Notification">
<Name>Custom Service Manager Service Request Assignment Changes Notification Workflow</Name>
<Description>Service Manager Service Request Assignment Changes Workflow</Description>
</DisplayString>
<DisplayString ElementID="ServiceRequestAssignmentChanges">
<Name>Service Request Assignment Notification</Name>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</ManagementPack>

Hope this helps someone else as well,

Follow me.

facebook-small322252222twitter-small322252222

MCC11_Logo_Horizontal_2-color_thumb_

6 responses to “Service Requests – Re-assignment notification”

  1. How do I “learn” System Center Service Manager 2012? | Fletcher's space Avatar
    How do I “learn” System Center Service Manager 2012? | Fletcher's space

    […] assigned to User with Incidents and Changes, this is great. I have also modified this to work with Service Requests and I have uploaded it to Technet […]

  2. pozycjonowaniestronwww.tychy.pl Avatar
    pozycjonowaniestronwww.tychy.pl

    hey there and thank you for your information – I’ve definitely picked up anything new from right here. I did however expertise some technical issues using this website, as I experienced to reload the website many times previous to I could get it to load correctly. I had been wondering if your web host is OK? Not that I’m complaining, but slow loading instances
    times will often affect your placement in google and can damage your high-quality score if advertising
    and marketing with Adwords. Anyway I’m adding this RSS to my email and can look out for much more of your respective exciting content. Make sure you update this again soon.

  3. How do I “learn” System Center Service Manager 2012? « System Center Guy ZA

    […] assigned to User with Incidents and Changes, this is great. I have also modified this to work with Service Requests and I have uploaded it to Technet […]

    1. jndtech Avatar
      jndtech

      Thank you! Thank you! Thank you! This post made my day…. worked seamless and beautifully.
      Thanks for sharing bro!

      1. fletcherkelly Avatar
        fletcherkelly

        Glad it helped

  4. Armando Ramirez Avatar
    Armando Ramirez

    Thank you for your post.

    After some analysis it works for SCSM 2012 R2, I only need to change the lines

    OLD

    82E39128-77DF-905B-C782-5FCEDFD2F990
    NEW

    90071690-0903-CBA7-5ECE-D6EF62AA9ED8

    How?

    1. Create the new notification template
    2. Run the query to find the last template created (it’s order by date) and find the “ObjectTemplateId” number.

    SELECT TOP 1000 [ObjectTemplateId]
    ,[ManagementPackId]
    ,[ObjectTemplateName]
    ,[Accessibility]
    ,[ObjectTemplateTypeId]
    ,[ObjectTemplateSubelementXML]
    ,[TimeAdded]
    ,[LastModified]
    FROM [ServiceManager].[dbo].[ObjectTemplate]
    order by TimeAdded desc

    3. Substitute the “90071690-0903-CBA7-5ECE-D6EF62AA9ED8” for your “ObjectTemplateId” number. Look , I change “NotificationTemplateIdList” for “NotificationTemplates” too.
    4. Import the MP “y listo todo de lujo”

    Gracias por compartir.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.