Workflow mail notification for “Assigned To” field (Change, Incident, ServiceRequest)

February 19, 2013 Posted by Alexander Axberg

/There are several blog posts out there about how to create a MP with a workflow that sends an E-Mail to the “Assigned To” -user when that field gets updated, but most of them have only been for Incidents or only for Service Requests.

I have gathered these workflows for Incident, Change Requests and Service Requests down to one MP, so the mail workflow will trigger the same way for all Three processes.

Before you import the MP, make sure you update the template-GUID to your own mailtemplate, the GUID is located Three times in the MP so you can have different templates for each process.

<WorkflowArrayParameter Name=”NotificationTemplates” Type=”guid”>
<Item>3f0094ec-c521-264f-f027-6c1222774342</Item>
</WorkflowArrayParameter>

 

To lookup the GUID for your templates, run the ServiceManager powershell console, and run the command: Get-SCObjecttemplate -DisplayName “Your mailtemplates name” | fl

The GUID is the attribute called: ID

 

Download MP: AssignedTo.Notification.xml

 

Update Feb 26:

Found an error in the Workflow parameters for Change and Service Request, so the MP is now updated.

8 Responses to Workflow mail notification for “Assigned To” field (Change, Incident, ServiceRequest)

  1. Paul C says:

    Hi Alex, just tried the above MP (after changing the GUID for my mail templates) and I got the following error:

    The management pack import failed.
    Errors (8):
    Could not load management pack [ID=Microsoft.EnterpriseManagement.ServiceManager.UI.Administration, KeyToken=31bf3856ad364e35, Version=7.5.2905.0]. The management pack was not found in the store.
    : Version mismatch. The management pack ([Microsoft.EnterpriseManagement.ServiceManager.UI.Administration, 31bf3856ad364e35, 7.5.1561.0]) requested from the database was version 7.5.2905.0 but the actual version available is 7.5.1561.0.

    Any ideas? Thanks, Paul

    • Paul C says:

      Hi Alex, ignore the above. I updated the version numbers to suit my SCSM environment and the MP worked fine. Thanks, Paul

    • Hi Paul,
      Nice to hear you fixed it. :)
      The MP was written for SCSM 2012 SP1, and you seem to have the RTM version.
      Updating the version numbers should do the trick, just as you wrote.

      regards
      Alex

  2. Dennis says:

    Hi Alex,

    I’ve import the management pack, but i don’t see new workflows / notification subscriptions. What’s the next step after importing the MP?

    Cheers,
    Dennis

    • Hi Dennis,

      These custom relation-based workflows won’t appear under Notifications / Workflows in the GUI, so any modifications need to be done directly in XML.
      However, you can still see status about them under the Administration-wunderbar \ Workflow \ Status

      regards
      Alex

  3. Domz says:

    Hi Alex,

    Thanks for the wonderful solution, I’m currently facing one problem after successfully importing the MP the workflows aren’t triggering on assignment/reassignment. can you please help figure this out.

    Cheers,
    Ali

    • Alexander Axberg says:

      Hi Ali,

      Which of your Work Items are not triggered? (Change, Incident, Activities or Service Requests)
      Is it empty when look in the Workflow status lists?

      regards
      Alex

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>