Creating Workspaces (aka “wunderbars”) in System Center Service Manager

Creating Workspaces (aka “wunderbars”) in System Center Service Manager

  • Comments 5
  • Likes

I get this question at least once a month…  How do I create my own workspace?  Usually this kind of question comes from partners that want to add some functionality to Service Manager and really want to elevate the presence of that solution by creating a dedicated workspace for it.

 

Around here we call these buttons in the lower left of the console “wunderbars”, but the official name for them is “workspaces”.  Don’t ask me where the name “wunderbar” came from.  If you are going to TechEd EMEA in Berlin in a couple of weeks you can practice your German by calling them “vunderbars”. :)  Since wunderbar is more fun to say that workspace we’ll stick with wunderbar for this blog post.

 

OK, let’s get down to it.  It’s really pretty easy.  The only thing you really have to understand is that the entire console navigation pane is broken down into a hierarchy of folders and views.  The wunderbars are just special folders!  Imagine that there is an invisible root folder.  Each folder that is a child of that folder is treated by the console framework as a wunderbar.

 

 NOTES: The wunderbar icon sizes are 16x16 (collapsed) and 24x24 (expanded).  The 16x16 (in tree) and 64x64 (view pane header) for views/folders.

7. Next, we define the display strings in the Language Pack section. Please see Localizing Management Pack Content for more information on localizing management pack content.

image

8. Lastly, we define the Image Resources. The FileName points to a file name which is in the same folder as your management pack XML file.

image

 

9. Now that you have created the management pack XML file and the images, you need to create a management pack bundle. Read Introducing Management Pack Bundles for more information. I normally copy the New-MPBundle.ps1 script into the same folder as my XML file and image resources and then run it like this:

 

clip_image002

 

10. Next I need to import the .mpb file using either the PowerShell cmdlet Import-SCSMManagementPack or the Import Management Pack wizard in the console.

 

clip_image004

 

11. After I’ve done that, I can restart the console and then see my new workspace in the console!

 

clip_image006

So – here is what you need to do…

 

1.       Create a 16x16 pixel .png file with the icon you want to show when the wunderbar is “collapsed”.  For this example I just created a really plain green box icon.

 

2.       Create a 24x24 pixel .png file with the icon you want to show when the wunderbar is full size.

 

3.       Create a new management pack .xml file and reference the System.Library and Microsoft.EnterpriseManagement.ServiceManager.UI.Console management packs.

<ManagementPack SchemaVersion="1.1">

    <Manifest>

        <Identity>

            <ID>Microsoft.Demo.NewWorkspace</ID>

            <Version>1.0.0.0</Version>

        </Identity>

        <Name>Microsoft Demo For New Workspace</Name>

        <References>

           <Reference Alias="System">

            <ID>System.Library</ID>

            <Version>7.0.5229.0</Version>

            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>

           </Reference>

           <Reference Alias="Console">

<ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>

            <Version>7.0.5229.0</Version>

            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>

           </Reference>

        </References>

    </Manifest>

4.   Next, you need to add a couple of Category elements to categorize the Image Resources (which come at the end of the MP) into 16x16 icons and 24x24 icons.

 

    <Categories>

<Category

ID="Category.NewWorkspaceImage24x24" Target="Image.NewWorkspace.24x24" Value="System!System.Internal.ManagementPack.Images.u24x24Icon" />

<Category

ID="Category.NewWorkspaceImage16x16" Target="Image.NewWorkspace.16x16" Value="System!System.Internal.ManagementPack.Images.u16x16Icon" />

</Categories>

This simply tells the console framework what size each icon is so that the appropriate size icon can be used in the appropriate context.  Make sure your icons are essentially identical except for their size.

 

5.       Next we will declare the folders themselves.

….Sorry, I need to switch to using images here because there is some bug on the blog site here that won’t let me upload more than a certain amount of text….  You can get this management pack from the attachments to this post if you want to copy the text.

image
The first folder that is declared is the “wunderbar”.  It’s parent is the magic root folder of the whole console.  The other folder is a child of the wunderbar and represents the root node of the navigation tree within the new workspace.

 

6.       Next, we’ll add image references for the folders.  Two for the wunderbar – 16x16 and 24x24 and just one for the root folder in new workspace – 16x16 only.  These ImageReferences create the relationship between the Folders created above and the Image resources created at the end.

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Attachment: NewWorkspace.zip
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Very interesting, but... what about new folder in "Work Items" and deriving tasks as for other existing folders?

  • @Vladimir -

    If you want to create a new folder as a child of the Work Item workspace Work Items root folder then you can just right click and create a new folder.

    If you want to create a second top root folder (peer of Work Items) in the Work Items workspace then you just need to create a new <Folder> element and set the ParentFolder attribute equal to the ID of the WorkItems folder.  To get a list of Folder IDs and their management packs you can look in the ServiceManager database by running this query:

    select * from Folder

    You can use the ManagementPackId field to look up the Management Pack in the ManagementPack table.  

    Keep in mind that in this case you will need to create an MP reference to whatever MP the parent folder is in and then set the value of the ParentFolder attribute by specifying the MP reference alias + "!" + Folder ID like this:

    SomeManamgentPackReferecenAlias!SomeFolderID

    Hope that helps!

  • 2 Travis Wright

    Thanks for your answer.

    But I still interested in creating the same tasks as for folder "Incident Management". When we target the folder, task pane presents us three tasks (by default):

    - "Create folder";

    - "Create View";

    - "Create Incident".

    I created my own folder "Request" in the "Work Items" folder. Then resolved question with creating two tasks: - "Create folder"; - "Create View". And it's work.

    But I can't understand how to create task "Create Request"  FOR MY FOLDER "Request", not for subfolders and views in it.(like "Create Incident" for folder "Incident Management")

    Also I have a "Reaquest" class in my Management Pack yet.

    Can you help?

  • @Vladimir#2 -

    Your ConsoleTask Target attribute needs to point to the ID attribute of the Folder element.  For example:

    <Folder ID="MyFolderID" ..../>

    <ConsoleTask ID="MyTask" Target="MyFolderID">

           <Assembly>SMConsole!SdkDataAccessAssembly</Assembly>

           <Handler>Microsoft.EnterpriseManagement.UI.SdkDataAccess.ConsoleTaskHandler</Handler>

           <Parameters>

             <Argument Name="Assembly">Microsoft.EnterpriseManagement.ServiceManager.Application.Common</Argument>

             <Argument Name="Type">Microsoft.EnterpriseManagement.GenericForm.NewInstanceTask</Argument>

             <Argument>MyClassTypeIDOrTypeProjectionID</Argument>

             <!-- You *might* need this but I dont think so -->

             <!--<Argument Name="CustomCreateTask">MyClassID</Argument>-->

           </Parameters>

         </ConsoleTask>

    </ConsoleTask>

    Plese note that using this assembly directly is not really a supported extensibility and may break in the future.

    Also - please note I havent tested this out, but it should work.

    I know the targeting part works, so worst case you can write your own task handler.

    Also - keep in mind that you should be get a "free" Create X console task for each view in your folder.  If your view is showing objects of X class, there will be a right click menu option on the view to 'Create X'.

  • Hey ..

    Travis I want to ask how to get "Create View" task under the folder created in the new wunderbar ?!

    Thank you,

    Regards!