I have been developing a lot of automation in Service Manager / Orchestrator lately and wanted a way to easily update the Request Action Log so portal users can see the status of the runbook in Orchestrator. Here is the result of this runbook:

image

 

Here are the steps I used to create this runbook:

  • Open the Orchestrator Runbook Designer
  • Create a new runbook
  • Drag the Runbook Control\Initialize Data activity into the runbook
    • Add ServiceRequestGUID | String
    • Add LogEntry | String
    • Add LogTitle | String

image

  • Drag the System\Run .NET Script activity into the runbook
  • Rename it to Create GUID and link Initialize Data to it
    • Select PowerShell for Language Type
    • Enter the following for script: $GUID = [guid]::NewGuid()
    • Under Published Data, Add GUID | String | GUID

image

image

  • Drag the Utilities\Format Date/Time activity into the runbook
  • Link Create GUID to Format Date/Time
  • Format appropriately for the right time zone

image

  • Drag the SC 2012 Service Manager\Create Object activity into the runbook
  • Rename it to Update Activity Log and link Format Date/Time to it
  • Select the appropriate Connection
  • Source Class: Service Request
  • Target Class: Trouble Ticket Action Log
  • Relationship Type: Work Item Has Action Log
  • Source Object Guid: {ServiceRequestGUID from “Initialize Data”}
  • Fields
    • Action type: Task Run
    • Entered by: Orchestrator
    • Entered date: {Format Result from “Format Date/Time”}
    • ID: {GUID from “Create GUID”}
    • Description: {LogEntry from “Initialize Data”}
    • Title: {LogTitle from “Initialize Data”}

image

 

image

 

You pass in the title, text, and GUID of the service request you want to update. I get the GUID of the SR using the Get Object activity and pass it into the runbook. Here is an example of a runbook that uses the Update Activity Log runbook:

image