Share via


Rule

Applies To: System Center Service Manager 2010

Defines a workflow within a management pack.

Schema Hierarchy

ManagementPack
  Monitoring
    Rules
      Rule

Syntax

<Rule ID=”RuleID” Comment=”Comment” Enabled=”True/False” Target=”TargetClassID” ConfirmDelivery=”True/False” Remotable=”True/False”><DataSources>…</DataSources>
   <ConditionDetection>…</ConditionDetection>
   <WriteActions>…</WriteActions>
</Rule>

Attributes and Elements

The following sections describe attributes, child elements, and the parent element of the Rule element.

Attributes

Attribute Description

ID

Required attribute. Represents the identity of the element. To learn how to identify your element in a management pack, see Element Identity and Namespace Conventions.

Comment

Optional attribute. Represents commentary by the management pack author.

Enabled

Required attribute. Defines whether or not this workflow is by default enabled or disabled.

Target

Required attribute. The ID of the targeted class type.

ConfirmDelivery

Optional attribute. Defines whether or not the module following the data source module will notify the data source that it has received the data. The default value is false.

Remotable

Optional attribute. Defines whether or not this workflow will run for agentless monitoring. Default value is true.

Enabled Attribute Values

Value Description

True

The workflow is enabled and will run when its target class has been instantiated within the system.

False

The workflow is disabled and will not run even when its target class has been discovered.

Target Attribute Values

Value Description

The ID of the targeted ClassType element.

A rule is always targeted at a particular class type and runs against every instance of that class type.

Child Elements

Element Description

DataSources

Required element. Contains one or more data source modules.

ConditionDetection (Rule)

Optional element. Represents an implementation of a condition detection module type definition.

WriteActions

Required element. Contains one or more write action modules.

Parent Elements

Element Description

Rules

Contains rule definitions targeted at a specific class or relationship type.

Remarks

Rules are workflows that must conform to the following requirements:

The ConfirmDelivery attribute should be set to true only when you find that the workflow is failing to pass data from the data source to the next module in the workflow. This would happen when the amount of data surpasses a predefined system threshold. When it surpasses this threshold, data items will be dropped for performance reasons. However, when ConfirmDelivery is set to true, the data will not be dropped but the next module in the workflow will acknowledge delivery of the data item to the data source module before it receives its next piece of data.

Example

The following XML sample demonstrates a rule that runs a Windows Foundation Workflow.

<Rule ID="Microsoft.SystemCenter.MonitoringHostKeepAlive" Enabled="true" Target="Microsoft.SystemCenter.MonitoringHostKeepAlive.Workflows.WorkflowTarget" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
  <Category>System</Category>
  <DataSources>
    <DataSource ID="DS" TypeID="System!System.Scheduler">
      <Scheduler>
        <SimpleReccuringSchedule>
          <Interval Unit="Minutes">120</Interval>
        </SimpleReccuringSchedule>
        <ExcludeDates />
      </Scheduler>
    </DataSource>
  </DataSources>
  <WriteActions>
    <WriteAction ID="WindowsWorkflow" TypeID="Subscriptions!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
      <Subscription>
        <WindowsWorkflowConfiguration>
          <AssemblyName>Microsoft.EnterpriseManagement.SystemCenter.MonitoringHostKeepAlive.Workflows</AssemblyName>
          <WorkflowTypeName>Microsoft.EnterpriseManagement.SystemCenter.MonitoringHostKeepAlive.Workflows.MonitoringHostKeepAliveWorkflow</WorkflowTypeName>
          <WorkflowParameters>
            <WorkflowParameter Name="TimeoutInMinutes" Type="int">110</WorkflowParameter>
          </WorkflowParameters>
          <RetryExceptions></RetryExceptions>
          <RetryDelaySeconds>11</RetryDelaySeconds>
          <MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
        </WindowsWorkflowConfiguration>
      </Subscription>
    </WriteAction>
  </WriteActions>
</Rule>

See Also

Reference

Rules