Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<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>Custom.KeepClosedIncidentClosed</ID>
<Version>1.0.0.0</Version>
</Identity>
<Name>Custom Keep Closed Incident Closed</Name>
<References>
<Reference Alias="EnterpriseManagement">
<ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
<Version>7.5.2905.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="CustomSystem_Notifications_Library">
<ID>System.Notifications.Library</ID>
<Version>7.5.2905.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="CustomSystem_WorkItem_Library">
<ID>System.WorkItem.Library</ID>
<Version>7.5.2905.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="IncidentManagement">
<ID>ServiceManager.IncidentManagement.Library</ID>
<Version>7.5.2905.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="CustomSystem_WorkItem_Incident_Library">
<ID>System.WorkItem.Incident.Library</ID>
<Version>7.5.2905.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="SystemCenter">
<ID>Microsoft.SystemCenter.Subscriptions</ID>
<Version>7.5.2905.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="EnterpriseManagement1">
<ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Administration</ID>
<Version>7.5.2905.125</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="CustomMicrosoft_Windows_Library">
<ID>Microsoft.Windows.Library</ID>
<Version>7.5.8501.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="CustomSystem_Library">
<ID>System.Library</ID>
<Version>7.5.8501.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="CustomSystem_SupportingItem_Library">
<ID>System.SupportingItem.Library</ID>
<Version>7.5.2905.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
</References>
</Manifest>
<Categories>
<Category ID="Category.dce22be394f34da1aac1553bf69c3bc7" Value="EnterpriseManagement!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">
<ManagementPackName>Custom.KeepClosedIncidentClosed</ManagementPackName>
<ManagementPackVersion>1.0.0.0</ManagementPackVersion>
</Category>
<Category ID="ServiceManager.Console.NotificationManagement.NotificationTemplates.Enumeration3ea9db5a_9a26_421a_a22a_49b52d56ff54.Category" Target="Template_16647d2bf6c14165b6e977ae6d362245" Value="EnterpriseManagement1!ServiceManager.Console.NotificationManagement.NotificationTemplates.Enumeration" />
<Category ID="Category.30452e6b71b04ff0b2af1995e96497c7" Target="WorkflowSubscription_de143923_7981_4f8b_ade8_0e86e7e6f9f6" Value="EnterpriseManagement1!Microsoft.EnterpriseManagement.ServiceManager.Rules.WorkflowSubscriptions" />
</Categories>
<Monitoring>
<Rules>
<Rule ID="WorkflowSubscription_de143923_7981_4f8b_ade8_0e86e7e6f9f6" Enabled="true" Target="IncidentManagement!System.WorkItem.Incident.Wizard.AutomaticChangeIncident" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>System</Category>
<DataSources>
<DataSource ID="DS" TypeID="SystemCenter!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
<Subscription>
<InstanceSubscription Type="a604b942-4c7b-2fb2-28dc-61dc6f465c68">
<UpdateInstance>
<Criteria>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Pre">$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Status$</Property>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>{bd0ae7c4-3315-2eb3-7933-82dfc482dbaf}</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Status$</Property>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value>{bd0ae7c4-3315-2eb3-7933-82dfc482dbaf}</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Criteria>
</UpdateInstance>
</InstanceSubscription>
<PollingIntervalInSeconds>100</PollingIntervalInSeconds>
<BatchSize>50</BatchSize>
</Subscription>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="SystemCenter!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
<Subscription>
<VisibleWorkflowStatusUi>true</VisibleWorkflowStatusUi>
<EnableBatchProcessing>true</EnableBatchProcessing>
<WindowsWorkflowConfiguration>
<AssemblyName>Microsoft.EnterpriseManagement.ServiceManager.Incident.Workflows</AssemblyName>
<WorkflowTypeName>Microsoft.EnterpriseManagement.ServiceManager.Incident.Workflows.AutomaticIncidentChangeWorkflow</WorkflowTypeName>
<WorkflowParameters>
<WorkflowArrayParameter Name="InstanceIds" Type="guid">
<Item>$Data/BaseManagedEntityId$</Item>
</WorkflowArrayParameter>
<WorkflowParameter Name="InstanceTemplate" Type="guid">fdb1a2a9-cb6d-e863-4efb-23694663053e</WorkflowParameter>
<WorkflowParameter Name="NotificationRulesEnabled" Type="boolean">True</WorkflowParameter>
<WorkflowArrayParameter Name="NotificationTemplates" Type="guid">
<Item>8f91d0da-37a2-c51f-7068-3855c3a0b652</Item>
</WorkflowArrayParameter>
<WorkflowArrayParameter Name="UserAliasOrRelationships" Type="string">
<Item>dff9be66-38b0-b6d6-6144-a412a3ebd4ce</Item>
</WorkflowArrayParameter>
</WorkflowParameters>
<RetryExceptions />
<RetryDelaySeconds>60</RetryDelaySeconds>
<MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
</WindowsWorkflowConfiguration>
</Subscription>
</WriteAction>
</WriteActions>
</Rule>
</Rules>
</Monitoring>
<Templates>
<ObjectTemplate ID="Template_16647d2bf6c14165b6e977ae6d362245" TypeID="CustomSystem_Notifications_Library!System.Notification.Template.SMTP">
<Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Subject$">&lt;1033&gt;$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$ - Closed&lt;/1033&gt;</Property>
<Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/Priority$">2</Property>
<Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template.SMTP']/IsBodyHtml$">True</Property>
<Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Content$">&lt;1033&gt;&amp;lt;H2&amp;gt;This Incident has allready been closed.&amp;lt;/H2&amp;gt;
Please open a New Incident trough the Self Service Portal or create a New E-mail for your New Incident.&lt;/1033&gt;</Property>
<Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Encoding$">utf-8</Property>
<Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/SeedClass$">System.WorkItem.Incident$a604b942-4c7b-2fb2-28dc-61dc6f465c68</Property>
<Property Path="$Context/Property[Type='CustomSystem_Notifications_Library!System.Notification.Template']/Protocol$">SMTP</Property>
</ObjectTemplate>
<ObjectTemplate ID="Template.7d3e860374bb421da5cdf50c647714f9" TypeID="IncidentManagement!System.WorkItem.Incident.ProjectionType">
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Status$">$MPElement[Name='CustomSystem_WorkItem_Incident_Library!IncidentStatusEnum.Closed']$</Property>
</ObjectTemplate>
</Templates>
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="Custom.KeepClosedIncidentClosed">
<Name>Custom Keep Closed Incident Closed</Name>
</DisplayString>
<DisplayString ElementID="Template_16647d2bf6c14165b6e977ae6d362245">
<Name>Instruct End User to Open a New Incident</Name>
</DisplayString>
<DisplayString ElementID="WorkflowSubscription_de143923_7981_4f8b_ade8_0e86e7e6f9f6">
<Name>Inform End User to Open a New Incident</Name>
</DisplayString>
<DisplayString ElementID="Template.7d3e860374bb421da5cdf50c647714f9">
<Name>Close Incident</Name>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</ManagementPack>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment