The management pack is at the heart of every management group. Each management pack describes a set of functionality that Service Manager can operate with. Service Manager was designed to be an extensible platform, and by creating management packs, you extend what Service Manager is capable of doing.
The management pack represents a whole solution and is composed of all the parts of that solution, including the data model, presentation elements, automation workflows, and any language requirements. The management pack can exist in definition form, as an XML file, or as an object model loaded into the SDK objects. Unless that object model or XML file is imported into the management group, the management pack is not live.
Creating Management Packs
Management packs can be structured and defined through code or through XML files. Management packs objects (classes, categories, references, and so on) that are created through code are technically code-based XML counterparts. A management pack object can be saved to or loaded from an XML file. A management pack is not functional until it is committed to the management group. If the management pack did not exist previously, it can be added to the management group by using one of the many import methods on the IManagementPackManagement interface, which is implemented by the management group’s ManagementPacks property.
It is possible to convert the XML into the code-based objects and vice-versa. For example, you can create the majority of the management pack through XML and then load it into the code objects and do any final tweaking or processing before importing. As your management pack grows, it will most likely become easier for you to manage through pure XML. Managing large management packs through code becomes useful when you have to apply logic to how it is created.
Modifying Management Packs
When creating or modifying an existing management pack, the changes that were made to it are not instantly changed in the management group. You must accept the changes and before those changes are made to the management group. If you are working with a management pack reference obtained from the management group directly, you do this by calling the AcceptChanges method. If you have loaded the management pack reference from a bundle or XML file, you must import it into the management group. This causes the original management pack to be replaced by the new one.