locked
Notifying the Affected User When the Analyst Has Updated the Service Request RRS feed

  • Question

  • Hello

    We use SCSM 2012. I need a subscription to notify notifying the Affected user when the analyst has updated the action log in Service Request. I used Travis's article in SCSM blog to create MP.

    I made the following:

    <?xml version="1.0" encoding="utf-8"?>
    <ManagementPack ContentReadable="true" SchemaVersion="2.0" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>Infopulse.ServiceRequest.AddAnalystComment.Subscription</ID>
          <Version>1.0.0.1</Version>
        </Identity>
        <Name>Infopulse Service Request Action Log Updated by Analyst Subscription</Name>
        <References>
          <Reference Alias="Console">
            <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="NotificationsLibrary">
            <ID>System.Notifications.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="WorkItem">
            <ID>System.WorkItem.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="System">
            <ID>System.Library</ID>
            <Version>7.5.8501.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Subscriptions">
            <ID>Microsoft.SystemCenter.Subscriptions</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Administration">
            <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Administration</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="ServiceRequest">
            <ID>ServiceManager.ServiceRequest.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <Categories>
        <Category ID="Category.ActionLogAddRelationshipSubscriptions.ManagementPack" Value="Console!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">
          <ManagementPackName>Infopulse.ServiceRequest.AddAnalystComment.Subscription</ManagementPackName>
          <ManagementPackVersion>7.0.5826.0</ManagementPackVersion>
        </Category>
        <Category ID="Category.ServiceRequestActionLogAddRelationshipSubscriptionRule" Target="ServiceRequestActionLogAddRelationshipSubscriptionRule" Value="Administration!Microsoft.EnterpriseManagement.ServiceManager.Rules.WorkflowSubscriptions" />
      </Categories>
      <Monitoring>
        <Rules>
          <Rule ID="ServiceRequestActionLogAddRelationshipSubscriptionRule" Enabled="true" Target="ServiceRequest!System.WorkItem.ServiceRequest.WorkflowTarget" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
            <Category>System</Category>
            <DataSources>
              <DataSource ID="DS" TypeID="Subscriptions!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
                <Subscription>
                  <RelationshipSubscription RelType="$MPElement[Name='WorkItem!System.WorkItem.TroubleTicketHasAnalystComment']$" SourceType="$MPElement[Name='WorkItem!System.WorkItem.TroubleTicket']$" TargetType="$MPElement[Name='WorkItem!System.WorkItem.TroubleTicket.AnalystCommentLog']$">
                    <AddRelationship />
                  </RelationshipSubscription>
                  <PollingIntervalInSeconds>30</PollingIntervalInSeconds>
                  <BatchSize>100</BatchSize>
                </Subscription>
              </DataSource>
            </DataSources>
            <WriteActions>
              <WriteAction ID="WA" TypeID="Subscriptions!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>9D2D7D31-6196-8C0C-77D6-0343CE1E6C0A</Item>
                      </WorkflowArrayParameter>
                      <WorkflowArrayParameter Name="UserAliasOrRelationships" Type="string">
                        <Item>$MPElement[Name='WorkItem!System.WorkItemAffectedUser']$</Item>
                      </WorkflowArrayParameter>
                    </WorkflowParameters>
                    <RetryExceptions />
                    <RetryDelaySeconds>60</RetryDelaySeconds>
                    <MaximumRunningTimeSeconds>1500</MaximumRunningTimeSeconds>
                  </WindowsWorkflowConfiguration>
                </Subscription>
              </WriteAction>
            </WriteActions>
          </Rule>
        </Rules>
      </Monitoring>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="Infopulse.ServiceRequest.AddAnalystComment.Subscription">
              <Name>Infopulse Service Request Action Log Updated by Analyst Subscription</Name>
            </DisplayString>
            <DisplayString ElementID="ServiceRequestActionLogAddRelationshipSubscriptionRule">
              <Name>Service Request Action log entry added to action log</Name>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>

    I removed second template object description in MP. It was imported successfully but it does not send notifications. What is wrong in it?

    Thank you


    • Edited by Dmytro S Tuesday, November 13, 2012 6:26 AM
    Tuesday, November 13, 2012 6:25 AM

All replies

  • Hi there,

    I created a subscription which gets triggered when an analyst has updated an incident. My analysts click on "set first response or comment" and type in a comment. Subscription gets triggered and affected user gets an email with the comment from analyst.

    is that what you are after?

    Wednesday, November 14, 2012 6:54 AM
  • Such subscription for Incidents  is described very good and is not a problem in any way. I asked for Service Requests.
    Wednesday, November 14, 2012 10:20 AM
  • You can try this technic http://scsm2012.blogspot.ru/2012/07/notify-assigned-to-user-when-end-user.html

    SCSMSolutions
    email: freemanru (at) gmail (dot) com

    Friday, November 16, 2012 12:43 PM