Risolvi eventi imprevisti figlio (evento imprevisto padre risolto)
ServiceManager.IncidentManagement.ParentIncidentResolved.UpdateRule (Rule)
Risolvi eventi imprevisti figlio quando viene risolto l'evento imprevisto padre
Element properties:
Member Modules:
Source Code:
<Rule ID="ServiceManager.IncidentManagement.ParentIncidentResolved.UpdateRule" 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>
<And>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Pre">$Context/Property[Type='CoreIncident!System.WorkItem.Incident']/Status$</Property>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value>$MPElement[Name="CoreIncident!IncidentStatusEnum.Closed"]$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Pre">$Context/Property[Type='CoreIncident!System.WorkItem.Incident']/Status$</Property>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value>$MPElement[Name="CoreIncident!IncidentStatusEnum.Resolved"]$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Post">$Context/Property[Type='CoreIncident!System.WorkItem.Incident']/Status$</Property>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$MPElement[Name="CoreIncident!IncidentStatusEnum.Closed"]$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Post">$Context/Property[Type='CoreIncident!System.WorkItem.Incident']/Status$</Property>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$MPElement[Name="CoreIncident!IncidentStatusEnum.Resolved"]$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</And>
</Expression>
</Criteria>
</UpdateInstance>
</InstanceSubscription>
<!--<StartWatermark>1</StartWatermark>-->
<PollingIntervalInSeconds>100</PollingIntervalInSeconds>
<BatchSize>50</BatchSize>
</Subscription>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WindowsWorkflow" 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.ResolveChildIncidentsWorkflow</WorkflowTypeName>
<WorkflowParameters>
<WorkflowArrayParameter Name="InstanceIds" Type="guid">
<Item>$Data/BaseManagedEntityId$</Item>
</WorkflowArrayParameter>
</WorkflowParameters>
<RetryExceptions>
<RetryException>Microsoft.EnterpriseManagement.Common.DiscoveryDataModificationCollisionException, Microsoft.EnterpriseManagement.Core, Version="7.0.5000.0", Culture=neutral, PublicKeyToken=31bf3856ad364e35</RetryException>
</RetryExceptions>
<RetryDelaySeconds>11</RetryDelaySeconds>
<MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
</WindowsWorkflowConfiguration>
</Subscription>
</WriteAction>
</WriteActions>
</Rule>