locked
Workflows, Notifications and Inherited Classes RRS feed

  • Question

  • This one is an extension of my question from this thread.

    In summary, I've inherited a new class (New Employee Onboarding Service Request) from the Service Request class and added some new fields related to new account creation (first name, last name, etc). (I inherited because I don't want these fields to show up for the default Service Request class).

    I've added a review activity and runbook automation activity to the new employee service request and published it as a request offering through the portal.

    My question is related to the review activity.  I'd like the reviewer(s) to receive an email notification when the review activity is status "In Progress" that will let them approve or reject the request (using a specific email notification for this particular service request).

    I've gone through this link but as I understand it this will send out an email for ANY review activity regardless of the type of service request, change request, etc there is a review activity for.  However, I only want an email sent out for the specific review activity associated with my inherited service request class.

    If I try to create a notification in the Activity Event Workflow Configuration for a Review Activity I can't select that notification template. Is this because you can't create workflows for activities that are associated with inherited classes? Is it only possible with the default classes?  Any way around this?  Or am I just missing something obvious?

    Thanks


    • Edited by JayScovill Wednesday, May 9, 2012 6:30 PM
    Wednesday, May 9, 2012 6:27 PM

Answers

  • You're trying to perform an operation on a subset of class instances..this requires some way to identify that subset. (In other words, let's say there are 100 review activities in the CMDB..but you only want to send out notification X for 25 of those review activities..you need a way to explicitely identify/tag/categorize those 25 review activities in order to distinguish them from the other 75 review activities)

    You can do that by inheriting a new review activity class and using it _only_ for your New Employee service request (which follows your current model for inheriting new classes). If you went with this option, you would pick your inherited review activity class when configuring a workflow. BUT, it would be best if your notification template also targetted the inherited review activity class.

    Another possible option is that you could simply put a value in the notes field of the review activity and have your workflow criteria trigger only when the notes field has that particular value. (For instance, in your service request template, you could put "New Employee" in the review activity's notes field. Next you would configure a workflow for notification X to run when a review activity goes in progress _and_ the notes field is "New Employee")

    Both of these options are simply a way to isolate a subset of review activities.

    Regarding your last question. is your notification template targetted at the "Review Activity" class?

    • Marked as answer by JayScovill Thursday, May 10, 2012 2:33 PM
    Wednesday, May 9, 2012 7:33 PM

All replies

  • You're trying to perform an operation on a subset of class instances..this requires some way to identify that subset. (In other words, let's say there are 100 review activities in the CMDB..but you only want to send out notification X for 25 of those review activities..you need a way to explicitely identify/tag/categorize those 25 review activities in order to distinguish them from the other 75 review activities)

    You can do that by inheriting a new review activity class and using it _only_ for your New Employee service request (which follows your current model for inheriting new classes). If you went with this option, you would pick your inherited review activity class when configuring a workflow. BUT, it would be best if your notification template also targetted the inherited review activity class.

    Another possible option is that you could simply put a value in the notes field of the review activity and have your workflow criteria trigger only when the notes field has that particular value. (For instance, in your service request template, you could put "New Employee" in the review activity's notes field. Next you would configure a workflow for notification X to run when a review activity goes in progress _and_ the notes field is "New Employee")

    Both of these options are simply a way to isolate a subset of review activities.

    Regarding your last question. is your notification template targetted at the "Review Activity" class?

    • Marked as answer by JayScovill Thursday, May 10, 2012 2:33 PM
    Wednesday, May 9, 2012 7:33 PM
  • Yes, I did change the notification template to target the Review Activity class which let me select it in the workflow.  And it all works. It just doesn't give me the selectivity of only sending out the notifications for the specific service request/review activity combo. 

    I like your second suggestion! It's simple and I'm lazy :)  It never occurred to me to try that but it makes sense.  Let me give it a shot.

    Thanks again!

    Wednesday, May 9, 2012 7:39 PM
  • My pleasure :)

    The notes field isn't exposed on the Review Activity form,  so you might want to use the description or even the title. (I once used the notes field just so I could be sure no one would inadvertently modify it, but you'd have to set the value directly in the template in the template's management pack itself)


    Wednesday, May 9, 2012 8:02 PM
  • Actually, thinking a little more about this, it would be nice if i could include the fields I've added to the New Employee Service Request form in the review notification so the reviewer could see them without having to either go through the console or hit the portal.

    But to expose those tokens to the notification template I would probably have to use your first option, assuming it's at all possible?

    Wednesday, May 9, 2012 8:18 PM