Our System Center Memo

SCSM View All Reviewer Comments

When we have a workflow with multiple levels of Review Activities, it might be important to pass the comments of all the Reviewers to the Implementer for them to make informed decisions when doing the work. It is however, difficult to navigate through all RA just to do that, in order to make life easier, here’s what we can do.

  1. You’re going to need multiple Runbooks, the first one would be something like this. What this does is it will monitor the RA, and whenever it goes into Completed status, it will parse the reviewer comments into the SR of the RA. I created a custom string field in SR for this.
  2. Take note on the Update SR activity, it needs to be something like this or else the earlier comments will always be overwritten by the later comments.
  3. Now create another Runbook that monitors MA. When a MA goes to In Progress status, this Runbook will grab all the comments from the SR and parse it into the MA, you can put it in the description field if you want to.

Now whenever a MA becomes Active, it will be updated with all the Reviewer Comments. You can use this for RA as well and parse all previous Reviewer Comments to the later RA so that the next Reviewer can know the decisions made earlier as well, and by whom.


July 17, 2014 Posted by | System Center Orchestrator (SCO), System Center Service Manager (SCSM) | Leave a comment

SCSM Adding Dynamic Activities

Sometimes we want to dynamically add activities depending on what the user selects in a Service Request. If you’ve tried using SCSM’s template to do this you’ll realize that the activities added will be in a mess and it won’t work. You’re going to need to rely on SCO for this.

I’m posting this under the assumption that you know a little bit about SCO, if not, let me know and I’ll guide you separately. If there’s enough volume I’ll write a comprehensive guide.

In this guide, I will be using a PowerShell script NOT WRITTEN by myself, I’m not sure where it originated from, so credits to whoever wrote it.

  1. First build a SCO Runbook, it may look something like this. You’ll need to parse the SR ID and the SC Object Guid of the Service Request into the Initialize Data activity.
  2. Under Details, paste the script below.

    $Session = New-PSSession -ComputerName ‘Your SCSM MS Name
    $SeqNo = Invoke-Command -Session $Session -scriptblock{

    Import-Module SMLets
    # Define Service Request
    # Get Service Request Class
    $SRclass = Get-SCSMClass -Name System.WorkItem.ServiceRequest$ 
    # Get object relationship 
    $SRMAObjectRelClass = Get-SCSMRelationshipClass System.WorkItemContainsActivity
    # Get SR Object
    $SRobject = Get-SCSMObject -Class $SRclass -Filter "ID -eq $SR"
    $Activityobjects =  @(Get-SCSMRelatedObject -SMObject $SRobject -Relationship $SRMAObjectRelClass )
    $Seq = $Activityobjects.count
    Remove-PSSession $Session
    Remove-Module SMlets -Force

  3. Under Published Data, add the following.
  4. Add the Create Related Object activity into the Runbook and set it following the screenshot below. For ID, if you leave the it at {0}, it will use the latest available ID number, which is what you want. But make sure you add the prefix such as MA or RA behind or you’ll end up with a ticket number without a prefix.
  5. Using this method you can now dynamically add a MA or RA, and it will be added according to the sequence you want, instead of it randomly being arranged on your workflow.

July 17, 2014 Posted by | System Center Orchestrator (SCO), System Center Service Manager (SCSM) | Leave a comment

SCSM Head of Department / Division Approval

SCSM allows us to dynamically get the Line Manager of an Affected User, but how about if we want SCSM to dynamically get the Head of Department or Division? A Crude way will be to use update AD to put in the HOD in the Manager field, a better way would be to use SCO.

I’m making this guide under the assumption that you know some SCO, if not, inform me and I’ll make help you separately. If there’s enough volume I’ll make a detailed step by step guide.


  1. Now the Department is something that SCSM already import from AD. That’s a field we can use. Depending on the User’s Department, we can determine the HOD. Your workflow will need to be something like this.


  2. The important thing here is the Find HOD step, which reads from a XML. Here’s how the XML should look like, pretty simple. It simply means if the Department of the User is IT Services, it will return with a Query Result of jyeoh. Create your own list, and save the file as .xml.

    This works with all languages, I even tried it with Thai, just make sure you save the file as Unicode. This XML file is cased sensitive, take note of that. If your file is properly coded, you will be able to view it via Internet Explorer. If it displays blank, there’s something wrong with your code.


  3. <DepartmentCode>
      <Department Code="IT Services"         HOD="jyeoh"         Type="string" />
      <Department Code="IT Security"         HOD="btey"         Type="string" />

  4. Back to the Find HOD activity, your XPath Query will be something like this.


  5. Now to the Get HOD activity, set the settings according to the screenshot.


  6. Your Return Activity should now have the SC Object GUID of the HOD, which you can now use to create or update the necessary RA activities.

Following this idea, you can create many other types of dynamic workflows. Let me know if this is of interest and I may provide more details.

July 17, 2014 Posted by | System Center Orchestrator (SCO), System Center Service Manager (SCSM) | Leave a comment