‘Invalid Enumeration Mapping’ when importing Service Offerings and Requests

Hello Again!

Here’s another little interesting Service Manager 2012 issue I came across recently when working with a customer.

The customer had two separate environments – one for development and a production environment.  We had spent quite some time building a number of Service Offerings and Service Requests, and were ready to deploy these changes to the production environment.  For information, the Service Offerings were associated with a number of Service Offering Categories, which were created in a custom unsealed management pack.

I exported the Management Packs containing the configuration, and attempted to import them into the production environment.  However this was not successful, and resulted in the following error:

The management pack import failed.
Errors (1):
Failed to process extensions for management pack: {0}
: Failed to process extensions for management pack: ManagementPack.<mp id>

Invalid enumeration mapping

 

Now, I had a search around on the internet, and came across a blog article regarding this issue.  The advice was to change the Service Offering Category of each Service Offering back to the default ‘General’ category.  I did this, and indeed this worked.  However, this is less than ideal, as this requires rework in the production environment each time configuration is migrated from development to production.

 

Now this did seem a little strange since the Service Offering Category is merely a list item, so why did it work for the default ‘General’ list item, and not a custom one?  The solution to this particular issue was quite simple – the Management Pack containing the custom Service Offering Category needed to be sealed.  The ‘General’ list item located in the System.ServiceCatalog.Library Management Pack which is sealed.  My custom list items were stored in the same Management Pack as the rest of my Service Catalog configuration, which was not sealed.

So, I created a new Management Pack with the additional list items for the custom Service Offering Categories and sealed this Management Pack.  For reference, the XML is below:

 

<ManagementPack ContentReadable=”true” SchemaVersion=”2.0″ OriginalSchemaVersion=”1.1″ xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”>
<Manifest>
<Identity>
<ID>Service.Offering.Category.List.Item.Extension</ID>
<Version>1.0.0.1</Version>
</Identity>
<Name>Service Offering Category List Item Extension</Name>
<References>
<Reference Alias=”System.ServiceCatalog.Library”>
<ID>System.ServiceCatalog.Library</ID>
<Version>7.5.2905.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
</References>
</Manifest>
<TypeDefinitions>
<EntityTypes>
<EnumerationTypes>
<EnumerationValue ID=”System.ServiceOffering.CategoryEnum.Issues.Enum” Accessibility=”Public” Parent=”System.ServiceCatalog.Library!System.ServiceOffering.CategoryEnum” Ordinal=”1″ />
<EnumerationValue ID=”System.ServiceOffering.CategoryEnum.Requests.Enum” Accessibility=”Public” Parent=”System.ServiceCatalog.Library!System.ServiceOffering.CategoryEnum” Ordinal=”2″ />
</EnumerationTypes>
</EntityTypes>
</TypeDefinitions>
<LanguagePacks>
<LanguagePack ID=”ENU” IsDefault=”true”>
<DisplayStrings>
<DisplayString ElementID=”System.ServiceOffering.CategoryEnum.Issues.Enum”>
<Name>Issues</Name>
</DisplayString>
<DisplayString ElementID=”System.ServiceOffering.CategoryEnum.Requests.Enum”>
<Name>Requests</Name>
</DisplayString>
<DisplayString ElementID=”Service.Offering.Category.List.Item.Extension”>
<Name>Service Offering Category List Item Extension</Name>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</ManagementPack>

I then sealed this Management Pack, imported it into the development environment and modified my Service Offerings to reference the newly created Service Offering Category list items.  I also deleted the old redundant list items.  I then imported the sealed Management Pack into the production environment, exported my additional configuration Management Packs from development and imported them into production.  This time, everything worked as expected, and my Request Offerings were successfully migrated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

search previous next tag category expand menu location phone mail time cart zoom edit close