locked
Activity Nofications cannot access Parent work item : Affected User Property RRS feed

  • Question

  •   In the activity email notification, I have to pass parent SR "affected User" property.

      User Seedrole='Target' I am able to access work item standard properties but not more details.

      Any ideas how can I achieve that ?

      I've also tried adding twice Seedrole='Target' but does not seems to work:

    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' SeedRole='Target' TypeConstraint='CustomSystem_Library!System.User']$  

    Shahid Roofi

    Thursday, July 18, 2013 8:26 AM

Answers

  •  Hi Marcel, nothing extra is needed for this. SCSM itself can do that. i just found that i was not able to achieve the above only because my syntax was not correct.

     Just require to use seedrole='Target' once and once you are at the Service Request level then simply use /Path to access another property or keep using /Path to any child related element. And can have any number of times /Path repeated and it works.

     Sample Code to access Affect User Display Name from Child Review Activity:

    Affected User: $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='CustomSystem_Library!System.Domain.User']/Property[Type='CustomSystem_Library!System.Domain.User']/DisplayName$

     


    Shahid Roofi

    • Marked as answer by Shahid Roofi Tuesday, September 24, 2013 8:45 PM
    Tuesday, September 24, 2013 8:43 PM
  •   Above can be done, without any Orchestrator runbook involvement. Just longer version of  $Context variable usage is required. Sample already attached.


    Shahid Roofi

    • Marked as answer by Shahid Roofi Tuesday, September 24, 2013 8:45 PM
    Tuesday, September 24, 2013 8:45 PM

All replies

  •    And this is very important requirement. You can image review activity notification sent to manager and manager can provide approval form the mobile email client also (Exchange connector 3.0) and there are no details in email to approve upon.

      Simply does not makes sense.


    Shahid Roofi

    Thursday, July 18, 2013 8:56 AM
  • Hey

    One way to go: you can create a workflow or use an Orchestrator runbook that collects the relevant information and writes them down to the activities (e.g. in the description field). Then use this field in the notification template to send out the information to the implementers and reviewers.

    Cheers
    Marcel


    Marcel Zehner // Blog --> http://marcelzehner.ch // Twitter --> @marcelzehner // Business --> http://www.itnetx.ch

    Thursday, July 18, 2013 11:45 AM
  • Further to Marcel's note, we developed a runbook to insert the Affected User into the Review Activity notification: http://scsmgem.wordpress.com/2013/01/21/solution-sending-logical-notifications-for-review-activities/
    Friday, July 19, 2013 3:33 AM
  •   Orchestrator runbooks should be required to achieve a workflow, data Processing or external interaction/integrations.

      Just to cater to the fact that SCSM is not able to get its own information in the notification seems very disappointing.

      Should be fixed soon by SCSM product team


    Shahid Roofi


    • Edited by Shahid Roofi Friday, July 19, 2013 11:09 AM suggestion to MS
    • Marked as answer by Shahid Roofi Friday, July 19, 2013 11:10 AM
    • Unmarked as answer by Shahid Roofi Tuesday, September 24, 2013 8:45 PM
    Friday, July 19, 2013 11:09 AM
  •  Hi Marcel, nothing extra is needed for this. SCSM itself can do that. i just found that i was not able to achieve the above only because my syntax was not correct.

     Just require to use seedrole='Target' once and once you are at the Service Request level then simply use /Path to access another property or keep using /Path to any child related element. And can have any number of times /Path repeated and it works.

     Sample Code to access Affect User Display Name from Child Review Activity:

    Affected User: $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='CustomSystem_Library!System.Domain.User']/Property[Type='CustomSystem_Library!System.Domain.User']/DisplayName$

     


    Shahid Roofi

    • Marked as answer by Shahid Roofi Tuesday, September 24, 2013 8:45 PM
    Tuesday, September 24, 2013 8:43 PM
  •   Above can be done, without any Orchestrator runbook involvement. Just longer version of  $Context variable usage is required. Sample already attached.


    Shahid Roofi

    • Marked as answer by Shahid Roofi Tuesday, September 24, 2013 8:45 PM
    Tuesday, September 24, 2013 8:45 PM