Adjust Incident Priority and Resolutin Time Rule Update

Incident_Adjust_PriorityAndResolutionTime_Custom_Rule.Update (Rule)

Element properties:

TargetSystem.WorkItem.Incident.WorkflowTarget
CategorySystem
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule Default
WA WriteAction Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction Default

Source Code:

<Rule ID="Incident_Adjust_PriorityAndResolutionTime_Custom_Rule.Update" Enabled="true" Target="System.WorkItem.Incident.WorkflowTarget" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>System</Category>
<DataSources>
<DataSource ID="DS" TypeID="Subscriptions!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
<Subscription>
<InstanceSubscription Type="$MPElement[Name='CoreIncident!System.WorkItem.Incident']$">
<UpdateInstance>
<Criteria>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Pre">$Context/Property[Type='WorkItem!System.WorkItem.TroubleTicket']/Impact$</Property>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Property State="Post">$Context/Property[Type='WorkItem!System.WorkItem.TroubleTicket']/Impact$</Property>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Pre">$Context/Property[Type='WorkItem!System.WorkItem.TroubleTicket']/Urgency$</Property>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Property State="Post">$Context/Property[Type='WorkItem!System.WorkItem.TroubleTicket']/Urgency$</Property>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</Criteria>
</UpdateInstance>
</InstanceSubscription>
<PollingIntervalInSeconds>100</PollingIntervalInSeconds>
<BatchSize>100</BatchSize>
</Subscription>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="Subscriptions!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
<Subscription>
<EnableBatchProcessing>true</EnableBatchProcessing>
<WindowsWorkflowConfiguration>
<AssemblyName>Microsoft.EnterpriseManagement.ServiceManager.Incident.Workflows, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</AssemblyName>
<WorkflowTypeName>Microsoft.EnterpriseManagement.ServiceManager.Incident.Workflows.AdjustPriorityAndResolutionTimeWorkflow</WorkflowTypeName>
<WorkflowParameters>
<WorkflowArrayParameter Name="InstanceIds" Type="guid">
<Item>$Data/BaseManagedEntityId$</Item>
</WorkflowArrayParameter>
</WorkflowParameters>
<RetryExceptions/>
<RetryDelaySeconds>11</RetryDelaySeconds>
<MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
</WindowsWorkflowConfiguration>
</Subscription>
</WriteAction>
</WriteActions>
</Rule>