SCO/SCSM 2012: Create Objects with Activities with Coretech Integration Pack for SCSM 2012 Extension Beta !

Update 19/11/2013: Beta 3 uploaded.

 

The integration from SCO to SCSM is great using the official integration pack published by Microsoft.

but unfortunately it does have one bug, that is quite show-stopping for a lot of automations.

The Problem

Problem appears when using the “Create change request with template” or the “Create incident with template”

The object is created by there is something missing

  1. The Prefix for the work item it self is missing (1234 instead of CR1234). this can be fixed using the method i have described here
  2. the Activities does not have a ID prefix. This cannot be fixed using the built-in activities since it must be changed before committing the work item in the database

image

The Fix

using this integration pack you can create any kind of work item based on a template

The work item will be created using correct prefixes for the IDs both in the work item it self and the activities that it contains.

image

the integration pack contains one activitiy “Create Object from template”

image

It has 2 parameters:

SCSM Server – the FQDN of the server

Template GUID – the guid of the template you want to base your work item on

Published Data:

image

ID – the ID of the work item

SC Object GUID – the GUID of the work item

This activity does not make it possible to change any fields or have other fields published.

You should use the “Update Object” activity to change the newly created object after the creation.

Please notice that this is the first beta.

any kind of comments or suggestions is welcomed.

Download from Microsoft Technet Gallery:

http://gallery.technet.microsoft.com/Integration-Pack-Service-aa228015

By | 2013-11-13T20:04:16+00:00 November 13th, 2013|Automation, Service Manager (SCSM)|12 Comments

About the Author:

Jakob Gottlieb Svendsen

Twitter: @JakobGSvendsen

Jakob Gottlieb Svendsen is a Microsoft Cloud and Data Center Management MVP (http://mvp.microsoft.com/en-us/default.aspx), Working as Global Lead Developer, Senior Consultant and Trainer at CTGlobal, where he is one of the driving forces in keeping CTGlobal a System Center Gold Partner and member of the System Center Alliance.

Since he started at Coretech in 2007, he has focused on Scripting and Development, primarily developing tools, extensions and scripts for the System Center Suite. His main area is Automation (including OMS/Azure Automation, Service Management Automation, PowerShell and Orchestrator). Another area is Windows Azure Pack / Azure Stack, where he does implementation, development, workshops and presentations. He is a world-wide renowned voice in the Automation field.

He is passionately devoted to the community, to which he contributes by being a moderator at TechNet and sharing his knowledge at http://blog.ctglobalservices.com/jgs

  • Co-founder: PowerShell User Group Denmark
  • Speaker at MMS 2016, Minneapolis (www.mmsmoa.com)
  • SCU Europe 2014, 2015, 2016 (www.systemcenteruniverse.ch)
  • Microsoft TechEd North America 2014, Houston
  • NIC 2012,2013,2014,2015, Oslo (www.nic.com)
  • Microsoft CampusDays 2011, 2013, Copenhagen
  • Microsoft TechDays 2015, Sweden (www.techdays.se)
  • Microsoft Partner Event: New in SC2012 SP1
  • User group meetings (PSUG.DK , SCUG.DK/BE/NO, AZMUG + more)
  • Microsoft Certified Trainer.
  • Microsoft Scripting Guys Forum Moderator

Main working areas:

  • Automation (Azure Automation, SMA, SCO)
  • Windows Azure Pack / Azure Stack
  • System CenterVisual Studio Team Services / Team Foundation Server
  • Development:C#.Net, VB.NET, VBScript, PowerShell, Service Manager, OpsMgr, ConfigMgr
  • Orchestrator
  • Windows Azure Pack / Azure Stack

Training:

  • Azure Automation
  • Service Management Automation
  • System Center Orchestrator
  • PowerShell, VBScript, C#.Net, VB.Net
  • Windows Azure Pack / Azure Stack Development Workshops

12 Comments

  1. Travis Wright November 14, 2013 at 8:17 - Reply

    Cool Jakob! Does the activity look up the work item ID prefixes from the SCSM database settings classes or does it always assume ‘CR’, ‘IR’, etc?

    • Jakob Gottlieb Svendsen
      Jakob Gottlieb Svendsen November 14, 2013 at 10:09 - Reply

      hello travis

      thanks!

      yes, It looks up in the database/sdk to find the settings and apply the correct prefix. 🙂

      although it only supports the built-in types as we speak

  2. Gracjan Zawadzki November 14, 2013 at 16:54 - Reply

    Hey there,

    nice Job! Came here again by Change and i am reminded again to follow your site as the Content is usually good 🙂

    But as with all SCSM extensions it would be nice to have in the official SCSM Integration pack.

    Why Microsoft just programmed to create incidents and changes by template is beyond me..

    • Jakob Gottlieb Svendsen
      Jakob Gottlieb Svendsen November 20, 2013 at 0:11 - Reply

      thnx gracjan! .. 🙂

      and yes it is beyond me too. I have uploaded beta 3 now since i found some mistakes 😉

  3. Donald March 7, 2014 at 21:36 - Reply

    When running the RunBook from the Runbook Tester it runs fine, but when running it from the WebSrever or just clicking the run button after checking it in i get this error.

    An object of class ManagementPackObjectTemplate with ID 5f5360a7-6274-2764-dfd1-52048e0f0881 was not found.

    Exception: ObjectNotFoundException
    Target site: TemplatesManagement.GetObjectTemplate

    Stack trace:
    at Microsoft.EnterpriseManagement.TemplatesManagement.GetObjectTemplate(Guid id)
    at Coretech.SCO.IP.SCSM2012.CreateObjectWithTemplate.Execute(IActivityRequest request, IActivityResponse response)

    Again it runs fine with the trster so i know the Template GUID is correct.

    • Jakob Gottlieb Svendsen
      Jakob Gottlieb Svendsen March 9, 2014 at 23:55 - Reply

      Hello!

      thnx for using my stuff 🙂

      I think this might be a problem in the permissions

      If the service account for your orchestrator does not have access to read the template, this exception might be thrown.

      Try to open the designer and then the tester as the service account to test
      then give permissions if needed

      good luck

      Jakob

      • Donald March 10, 2014 at 22:56 - Reply

        Thanks Jakob;

        After going through all the permissions again i found what was missing. For me it was the Runbook service account not having access the the template as you stated. Thank you. Love your IP works great.

  4. Barry Crook August 14, 2014 at 1:25 - Reply

    Hi Jakob,

    Good work, but i’m getting the below:
    Could not load file or assembly ‘Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

    Exception: FileNotFoundException
    Target site: CreateObjectWithTemplate.Execute

    Stack trace:
    at Coretech.SCO.IP.SCSM2012.CreateObjectWithTemplate.Execute(IActivityRequest request, IActivityResponse response)

    Regards

    Barry

    • Jakob Gottlieb Svendsen
      Jakob Gottlieb Svendsen August 14, 2014 at 10:16 - Reply

      Hello!

      Please make sure you have the SCSM console installed on the server running the code.

      Is it installed? 🙂

      – Jakob

  5. Jan September 25, 2014 at 13:09 - Reply

    Hi,

    i tested your IP with our orchestrator 2012 r2 environment. It doesn´t work. Always the same error. “Unknown exception caught”. With the runbooktester it works. i dont no why.
    Have you any ideas want could be wrong?

  6. Jana Baldszun September 14, 2016 at 16:36 - Reply

    Will there be an update for using not build-in work-items?
    I build some work items and when i use your ip the activitys onlie named by number and not with prefix.

    – Jana

Leave A Comment