Opětovné spuštění aktivity žádosti o službu
ServiceManager.ServiceRequest.Library.Rule.ActivityRerun (Rule)
Element properties:
Member Modules:
Source Code:
<Rule ID="ServiceManager.ServiceRequest.Library.Rule.ActivityRerun" Enabled="true" Target="System.WorkItem.ServiceRequest.InternalWorkflowTarget" 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='CoreActivity!System.WorkItem.Activity']$">
<UpdateInstance>
<Criteria>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Pre">$Context/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$</Property>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value>$MPElement[Name="CoreActivity!ActivityStatusEnum.Rerun"]$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Post">$Context/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$</Property>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$MPElement[Name="CoreActivity!ActivityStatusEnum.Rerun"]$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Criteria>
</UpdateInstance>
</InstanceSubscription>
<!--<StartWatermark>1</StartWatermark>-->
<PollingIntervalInSeconds>10</PollingIntervalInSeconds>
<BatchSize>100</BatchSize>
</Subscription>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WindowsWorkflow" TypeID="Subscriptions!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
<Subscription>
<WindowsWorkflowConfiguration>
<AssemblyName>Microsoft.EnterpriseManagement.ServiceManager.Applications.ServiceRequest.Workflows</AssemblyName>
<WorkflowTypeName>Microsoft.EnterpriseManagement.ServiceManager.Applications.ServiceRequest.Workflows.ActivityRerunWorkflow</WorkflowTypeName>
<WorkflowParameters>
<WorkflowParameter Name="InstanceId" Type="guid">$Data/BaseManagedEntityId$</WorkflowParameter>
<!--<WorkflowParameter Name="ProjectionTypeId" Type="guid">$MPElement[Name='System.WorkItem.ServiceRequestProjection']$</WorkflowParameter>-->
</WorkflowParameters>
<RetryExceptions/>
<RetryDelaySeconds>11</RetryDelaySeconds>
<MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
</WindowsWorkflowConfiguration>
</Subscription>
</WriteAction>
</WriteActions>
</Rule>