locked
Assignment/re-assignment notifications for service request does not work RRS feed

  • Question

  • Hello

    I have SCSM 2012. Have a task to implement notifications when service request is reassigned tted o another person. It's easy by default for incidents but for request was used this guide. Template ID is ObjectTemplate.c345335e4fcb4f6d8d6f2c8f13cf5025.

    Problem is in absence of notifications. Are their any mistakes in MP or I forgot smth? I corrected MP, and just imported it. Should I do anything else to turn it on?

     Here is the MP after correction:

    <?xml version="1.0" encoding="utf-8"?>
    <ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>Infopulse.Request.Reassignment.Notifications</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.Infopulse.Request.Reassignment.Notifications.ManagementPack" Value="EnterpriseManagement!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">
          <ManagementPackName>Infopulse.Request.Reassignment.Notifications</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>ObjectTemplate.c345335e4fcb4f6d8d6f2c8f13cf5025</Item>
                      </WorkflowArrayParameter>
                      <WorkflowArrayParameter Name="UserAliasOrRelationships" Type="string">
                        <Item>$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$</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.Request.Reassignment.Notifications">
              <Name>Infopulse.Request.Reassignment.Notifications</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>

    Could you help with this?




    • Edited by Dmytro S Monday, August 13, 2012 6:55 PM
    Monday, August 13, 2012 1:58 PM

Answers

  • <WorkflowArrayParameter Name="NotificationTemplateIdList" Type="guid">
    <Item>ObjectTemplate.c345335e4fcb4f6d8d6f2c8f13cf5025</Item>
    </WorkflowArrayParameter>
    

    But ObjectTemplate.c345335e4fcb4f6d8d6f2c8f13cf5025 is not a guid type. You must change it to Id of the template or to:

    $MPElement[Name='ObjectTemplate.c345335e4fcb4f6d8d6f2c8f13cf5025']$

    if template are in same management pack.


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

    • Marked as answer by Dmytro S Tuesday, August 14, 2012 8:29 AM
    Monday, August 13, 2012 11:13 PM

All replies

  • Service request class was extended, could this be the reason of problems ?
    • Edited by Dmytro S Monday, August 13, 2012 6:55 PM
    Monday, August 13, 2012 6:26 PM
  • <WorkflowArrayParameter Name="NotificationTemplateIdList" Type="guid">
    <Item>ObjectTemplate.c345335e4fcb4f6d8d6f2c8f13cf5025</Item>
    </WorkflowArrayParameter>
    

    But ObjectTemplate.c345335e4fcb4f6d8d6f2c8f13cf5025 is not a guid type. You must change it to Id of the template or to:

    $MPElement[Name='ObjectTemplate.c345335e4fcb4f6d8d6f2c8f13cf5025']$

    if template are in same management pack.


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

    • Marked as answer by Dmytro S Tuesday, August 14, 2012 8:29 AM
    Monday, August 13, 2012 11:13 PM