none
Re-assignment workflow - Notification to 2 people

    Question

  • Hi all,

    I have an MP that sends out an e-mail when an incident is re-assigned. At this moment in time, the notification is sent to the new Assigned To User. However, I now have a requirement to send to both the New Assigned to User and the current Affected User.

    I have tried to add the GUID for the affected user as an item as part of the WriteAction paramaters, this did not work, what have I missed.

    I tried to simply add another item in <Item>15e577a3-6bf9-6713-4eac-ba5a5b7c4722</Item> (example)

    See below for original code, with ONLY the Assigned to User being notified.

    <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>ServiceManager.IncidentAssignmentChanges.Notification</ID>
          <Version>7.5.1464.0</Version>
        </Identity>
        <Name>Incident Assignment Changes Notification Workflow</Name>
        <References>
          <Reference Alias="WorkItem">
            <ID>System.WorkItem.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Incident">
            <ID>ServiceManager.IncidentManagement.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="SystemCenter">
            <ID>Microsoft.SystemCenter.Library</ID>
            <Version>7.0.8427.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="CoreIncident">
            <ID>System.WorkItem.Incident.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="SystemCenter1">
            <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="CustomServiceManager_IncidentManagement_Presentation">
            <ID>ServiceManager.IncidentManagement.Presentation</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="EnterpriseManagement">
            <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <Categories>
        <Category ID="IncidentConfigurationMPSolutionCategory" Value="Incident!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack.Solution.IncidentManagement">
          <ManagementPackName>ServiceManager.IncidentAssignmentChanges.Notification</ManagementPackName>
          <ManagementPackVersion>7.5.1464.0</ManagementPackVersion>
        </Category>
        <Category ID="Category.IncidentAssignmentChanges" Target="IncidentAssignmentChanges" Value="Administration!Microsoft.EnterpriseManagement.ServiceManager.Rules.WorkflowSubscriptions" />
      </Categories>
      <Monitoring>
        <Rules>
          <Rule ID="IncidentAssignmentChanges" Enabled="true" Target="SystemCenter!Microsoft.SystemCenter.SubscriptionWorkflowTarget" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
            <Category>Discovery</Category>
            <DataSources>
              <DataSource ID="DS" TypeID="SystemCenter1!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
                <Subscription>
                  <RelationshipSubscription RelType="$MPElement[Name='WorkItem!System.WorkItemAssignedToUser']$" SourceType="$MPElement[Name='CoreIncident!System.WorkItem.Incident']$" TargetType="$MPElement[Name='System!System.Domain.User']$">
                    <AddRelationship />
                  </RelationshipSubscription>
                  <PollingIntervalInSeconds>10</PollingIntervalInSeconds>
                  <BatchSize>100</BatchSize>
                </Subscription>
              </DataSource>
            </DataSources>
            <WriteActions>
              <WriteAction ID="WA" TypeID="SystemCenter1!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
                <Subscription>
                  <EnableBatchProcessing>true</EnableBatchProcessing>
                  <WindowsWorkflowConfiguration>
                    <AssemblyName>Microsoft.EnterpriseManagement.ServiceManager.Incident.Workflows</AssemblyName>
                    <WorkflowTypeName>Microsoft.EnterpriseManagement.ServiceManager.Incident.Workflows.AutomaticIncidentChangeWorkflow</WorkflowTypeName>
                    <WorkflowParameters>
                      <WorkflowArrayParameter Name="InstanceIds" Type="guid">
                        <Item>$Data/BaseManagedEntityId$</Item>
                      </WorkflowArrayParameter>
                      <WorkflowParameter Name="NotificationRulesEnabled" Type="boolean">True</WorkflowParameter>
                      <WorkflowArrayParameter Name="NotificationTemplates" Type="guid">
                        <Item>F1FA861C-BFD0-0DCB-5FEC-D7EC7825ADC8</Item>
                      </WorkflowArrayParameter>
                      <WorkflowArrayParameter Name="UserAliasOrRelationships" Type="string">
                        <Item>15e577a3-6bf9-6713-4eac-ba5a5b7c4722</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="ServiceManager.IncidentAssignmentChanges.Notification">
              <Name>Service Manager Incident Assignment Changes Notification Workflow</Name>
              <Description>Service Manager Incident Assignment Changes Workflow</Description>
            </DisplayString>
            <DisplayString ElementID="IncidentAssignmentChanges">
              <Name>Incident Assignement Notification</Name>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>


    As long as you learn something new every day, the day is not wasted.

    Friday, March 22, 2013 12:56 PM

Answers

  • You were almost there, you need to specifiy the template and relationship as a pair like this (example Guids):

                 <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>


    Rob Ford scsmnz.net
    Cireson www.cireson.com
    For a free SCSM 2012 Auto-Close app click here

    Friday, March 22, 2013 9:42 PM
    Moderator

All replies

  • You were almost there, you need to specifiy the template and relationship as a pair like this (example Guids):

                 <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>


    Rob Ford scsmnz.net
    Cireson www.cireson.com
    For a free SCSM 2012 Auto-Close app click here

    Friday, March 22, 2013 9:42 PM
    Moderator
  • will try it, thank you, at least I was not completely losing my mind.

    Thanks,

    F.


    As long as you learn something new every day, the day is not wasted.

    Saturday, March 23, 2013 8:23 AM