Notify affected user on action log update

Jawab Notify affected user on action log update

  • 09 Mei 2012 17:52
     
     
    Is there a way to email the affected user when the action log is updated? right now it emails the analyst who has the incident assigned, but i can't get it to email the affected user. Im on SCSM 2010 CU3 with exchange connector 2.0

Semua Balasan

  • 09 Mei 2012 18:49
    Moderator
     
     

    Please see this:
    http://social.technet.microsoft.com/Forums/en-US/systemcenterservicemanager/thread/239eb652-4489-4e02-a050-4a62f2ac4cfd

    You can rework this, send a notification to a the affected user instead of the assigned to user and change the relationship to "System.WorkItem.TroubleTicketHasActionLog".


    Rob Ford scsmnz.net

  • 09 Mei 2012 19:42
     
     

    i think this might be a little above my head, basically what i did was import this management pack ;

    http://blog.scsmfaq.ch/2011/08/06/notifying-analysts-when-action-log-was-updated

    and it is updating analysts on action log updates, would it be possible to modify that one to update the end user? i tried adding it manually to the workflow, however it didnt work.

  • 10 Mei 2012 0:59
    Moderator
     
     Jawab Memiliki Kode

    Not tested, change this line:

    <Item>$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$</Item>

    To:

    <Item>$MPElement[Name='WorkItem!System.WorkItemAffectedUser']$</Item>


    Rob Ford scsmnz.net

  • 11 Mei 2012 12:43
     
     
    this works great, thanks Rob, do you know of a way it can notify both the analyst and the affected user? can i just duplicate that entire section?
  • 12 Mei 2012 21:18
    Moderator
     
      Memiliki Kode

    probably something like:

    <WorkflowArrayParameter Name="NotificationTemplates" Type="guid">
      <Item>50dc32c2-6517-e9ea-dd99-0455383cab17</Item>
      <Item>50dc32c2-6517-e9ea-dd99-0455383cab17</Item>
    </WorkflowArrayParameter>
    <WorkflowArrayParameter Name="UserAliasOrRelationships" Type="string">
      <Item>dff9be66-38b0-b6d6-6144-a412a3ebd4ce</Item>
      <Item>15e577a3-6bf9-6713-4eac-ba5a5b7c4722</Item>
    </WorkflowArrayParameter>
    Where the first 2 guids are the template guids and the 2nd 2 guids are the relationship guids for affected user and assigned to user. This is how the GUI creates a workflow with multiple notification targets. If you create a similar test one and export it, you can see it.

    Rob Ford scsmnz.net


  • 23 Mei 2012 16:53
     
     

    Rod,

    Please help!

    We are trying to notify the affected user by e-mail when an incident is change from one affected user to another.

    We used the following to setup:

    http://blogs.technet.com/b/servicemanager/archive/2009/12/15/custom-notification-workflow-on-incident-assignement-or-re-assignment.aspx

    We changed the following:

    FROM:

    <RelationshipSubscription RelType="$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$"

    TO:

    <RelationshipSubscription RelType="$MPElement[Name='WorkItem!System.WorkItemAffectedUser']$"

    FROM:

    <WorkflowArrayParameter Name="UserAliasOrRelationships" Type="string">

                        <Item>15e577a3-6bf9-6713-4eac-ba5a5b7c4722</Item>

    TO:

    <WorkflowArrayParameter Name="UserAliasOrRelationships" Type="string">

                        <Item>dff9be66-38b0-b6d6-6144-a412a3ebd4ce</Item>

    The changes is not working.

    Thank you so much!

  • 23 Mei 2012 23:06
    Moderator
     
     

    Those two changes look good.

    Did you change the NotificationTemplates block to specify one your own template guids?


    Rob Ford scsmnz.net

  • 24 Mei 2012 15:17
     
     

    Rod,

    Thank you so much for getting back to us. Attached is a test notification template, but we don't know which one is the correct guids.  Also does the test notification template has to be in the same management pack as the assignment or re-assignment management pack?

    Please let us know.

    Thanks

    <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>ManagementPack.4f53a1757b094ee0b944a9d71b36e733</ID>

          <Version>7.0.6555.0</Version>

        </Identity>

        <Name>TestEmailTemplate</Name>

        <References>

          <Reference Alias="EnterpriseManagement">

            <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>

            <Version>7.0.6555.0</Version>

            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>

          </Reference>

          <Reference Alias="CustomSystem_Notifications_Library">

            <ID>System.Notifications.Library</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>

        </References>

      </Manifest>

      <Categories>

        <Category ID="Category.67a381a2bb074c68b8da9a16ff303b88" Value="EnterpriseManagement!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">

          <ManagementPackName>ManagementPack.4f53a1757b094ee0b944a9d71b36e733</ManagementPackName>

          <ManagementPackVersion>7.0.6555.0</ManagementPackVersion>

        </Category>

        <Category ID="ServiceManager.Console.NotificationManagement.NotificationTemplates.Enumeration830aeb63_c833_47a8_a67b_0c2b0086e1f8.Category" Target="Template_6aab5f504f1847fcab30580411f4b93c" Value="EnterpriseManagement1!ServiceManager.Console.NotificationManagement.NotificationTemplates.Enumeration" />

      </Categories>

      <Templates>

        <ObjectTemplate ID="Template_6aab5f504f1847fcab30580411f4b93c" TypeID="CustomSystem_Notifications_Library!System.Notification.Template.SMTP">

          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Subject$">&lt;1033&gt;Test only&lt;/1033&gt;</Property>

          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Priority$">2</Property>

          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/IsBodyHtml$">True</Property>

          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Content$">&lt;1033&gt;Email to Affected User&lt;/1033&gt;</Property>

          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Encoding$">utf-8</Property>

          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/SeedClass$">System.WorkItem.Incident$a604b942-4c7b-2fb2-28dc-61dc6f465c68</Property>

          <Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Protocol$">SMTP</Property>

        </ObjectTemplate>

      </Templates>

      <LanguagePacks>

        <LanguagePack ID="ENU" IsDefault="true">

          <DisplayStrings>

            <DisplayString ElementID="ManagementPack.4f53a1757b094ee0b944a9d71b36e733">

              <Name>TestEmailTemplate</Name>

            </DisplayString>

            <DisplayString ElementID="Template_6aab5f504f1847fcab30580411f4b93c">

              <Name>Test-Email Template</Name>

            </DisplayString>

          </DisplayStrings>

        </LanguagePack>

      </LanguagePacks>

    </ManagementPack>

  • 24 Mei 2012 16:09
     
     

    Rod,

    We finally got it to work.  We used the select statement to obtain the guids:

    select Objecttemplateid from ObjectTemplate

    where ObjectTemplateName='Template_6aab5f504f1847fcab30580411f4b93c'

    Thank you a million Rod!