Social

lørdag den 20. april 2013

Creating your own Integration Pack for Orchestrator

In [SCOrch] Installing Orchestrator Integration Toolkit I showed how to get around installing the necessary tools for creating your own Integration packs.
I will now show how to create an activity that will raise an error. [SCOrch] Error handling runbooks in SC Orchestrator - Part 1 showed that there is a need for doing exactly that as I will examplify in part 2 (comming soon).

First we start the Orchestrator Command-Line Activity Wizard. Click Next and enter a name for the .NET assembly the wizard will eventually create. The name is used as a namespace identifier for the assembly. The assembly file will by default be saved to the Documents Library.

Click Next, then Add. Name the Command Raise Error and the Mode Run Windows PowerShell. Optionally provide a description.



In the Arguments tab click Add and enter Message. Click OK.



Again under the Arguments tab click Insert and select $(Message). Edit the Command Line to Throw $(Message). Click OK.


We now have a command (activity) that will "fail" everytime. We can even provide a message that will be displayed in the Orchestrator log. Click next and let it brew. When done click Build Integration Pack. The Orchestrator Integration Pack Wizard will start and the assembly we just created is already added. Click Next and enter the details. Category name is what is displayed in Orchestrator, and Product name is displayed in the SC 2012 Orchestrator Deployment Manager, but other than that you can enter pretty much what you like.

Click Next. If you like you can provide an icon for the Raise Error activity. Select it and click edit, then modify and select an icon of your liking. Click Next and then Next again. Enter a name for the Integration Pack (it doesn't add .oip itself, so help it out). Click Next and let it brew once again, then Finish. The file is saved to the Documents Library.

Next install the IP using the Deployment Manager (I might show how in a later installment - it's really easy!).

Links

tags: Orchestrator, Integration Pack

fredag den 19. april 2013

Installing Orchestrator Integration Toolkit

Finding the right MS-products to get started on a project is not always as easy as it should be. If one wishes to make their own IPs (Integration Packs) they need the Orchestrator Integration Toolkit. This does however require the WiX Toolset, and most of you will hit a page providing version 3.7, while you actually need 3.5 (atleast I couldn't get it to work with 3.7). Downloads below:

tags: Orchestrator, Integration Pack, Toolkit, WiX, System Center

torsdag den 18. april 2013

Error handling runbooks in SC Orchestrator - Part 1

I have not been able to find a whole lot of easy accesible information (ie. blogposts) on how to do error handling for runbooks in SC Orchestrator. After having conversed with Jakob from Coretech (http://www.coretech.dk/) and attending one of their seminars I got alot wiser on an approach to this (which I found very sensible). I hope this post can help others get started on this necessary aspect of developing runbooks.

A simple approach can be found in the following, and a good place to get started. What we want to do is simply get the Service Request with a specific ID. If none is found we wish to log the event.



Get SR will return sucess even if no objects was found with the given GUID. The link criteria  logic is a double negative, for which I apologize. These are normally not easy to comprehend.
If no objects are found we log an event.

Let's try and run it. In my experience the Runbook Tester will not log events, and just clicking run will not work for some reason (if someone knows please tell me in the comments). Instead create yet another runbook as below.


An event in your log should appear after running this runbook, and look something like this:


That was easy! But what if the Get SR activity failed? And as you may have noticed, the runbook completed with success although we defined no Service Request found as a failure. In part 2 (posted soon) I will address these issues.

onsdag den 10. april 2013

Attaching a file to a Work Item using Orchestrator

As I found Microsoft's documentation for Upload Attachment somewhat lacking, so I will share my experience. This tutorial will help you attach a file to a given Work Item such as a Service Request or an Incident.
The final product will look something like this:
Add a parameter to Initialize Data that will contain the given Work Items ID, in this case a Service Request.
Get SR (Get Object) is as expected. Select whatever Work Item class you wish to attach a file to.
Get File Status from the File Management integration pack is also very straightforward. Select the file one wish to attach. If this is a variable value, one could add the filename (possibly one a network shared drive) as a parameter to Initialize Data.
As opposed to Microsoft's step 3.9 in the linked documentation, I would much rather give the attachment a unique identifier, and for this purpose I shall use Powershell. Script is as follows:
For your copy-paste leisure: $guid = [guid]::NewGuid(), and in the Published Data tab do as follows:
which will make the newly created guid available on the databus (and used in the following activity).
Next we will use the Create Related Object activity which looks like:
And the rest of the fields:
At this point the given Work Item would have an attachment. The final step is to put content into the attachment using Upload Attachment:
Note that the Object Guid is Target Object Guid from the previous activity (easy detail to miss in the documentation).

Søg i denne blog