Share via


DataSource (Rule)

Applies To: System Center Service Manager 2010

Represents an implementation of a data source module type definition.

Schema Hierarchy

ManagementPack
  Monitoring
    Rules
      Rule
        DataSources
          DataSource (Rule)

Syntax

<DataSource ID=”ModuleID” Comment=”Comment” TypeID=”ModuleTypeID”>
Custom Schema Defined Parameters
</DataSource>

Attributes and Elements

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

Attributes

Attribute Description

ID

Required attribute. Represents the identity of the element.

Comment

Optional attribute. Represents commentary by the management pack author.

TypeID

Required attribute. Represents the DataSource module type definition from which this DataSource module inherits its configuration schema.

ID Attribute Values

Value Description

The format for the ID attribute should be UniqueElementID.

The ID string must contain the following characteristics:

  • The length is less than or equal to 256 characters.

  • The ID begins with a letter (a-z) or a number (0-9).

  • The ID contains only letters, numbers, the period character (.), or the underscore (_) character.

  • The ID is unique across all of the elements within the scope of the DataSource module’s containing workflow.

  • The ID is case-sensitive.

Child Elements

The child element of the DataSource module is defined by the Configuration (DataSourceModuleType) schema of its base type as referenced in the TypeID attribute.

Parent Elements

Element Description

DataSources

Contains one or more data source modules.

Remarks

Because a data source module does not take an input stream, it must always be the first module in any workflow. The data source module initiates the workflow, functioning either as a scheduler or as a data provider. The data type of its output data is defined in its OutputType (ConditionDetectionModuleType) element.

A data source module type never alters system state. If you want a module to affect system state, you must instead use or implement a WriteAction (WriteActionModuleType) module.

A data source module’s base type must always be a descendant of a DataSourceModuleType type.

Example

The following XML sample illustrates a rule that grooms a database (CMDB) once a day. This workflow consists of a data source module and a write action module.

<Rule ID="Microsoft.ServiceManager.Grooming.GroomEntities" Enabled="true" Target="Microsoft.ServiceManager.GroomingWorkflowTarget" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
  <Category>Maintenance</Category>
  <DataSources>
    <DataSource ID="DS" TypeID="System!System.Scheduler">
      <Scheduler>
        <SimpleReccuringSchedule>
          <Interval Unit="Days">1</Interval>
          <SyncTime>00:00</SyncTime>
        </SimpleReccuringSchedule>
        <ExcludeDates />
      </Scheduler>
    </DataSource>
  </DataSources>
  <WriteActions>
    <WriteAction ID="WA" TypeID="SCGrooming!Microsoft.SystemCenter.GroomingTrigger">
      <GroomingType>Entity</GroomingType>
      <GroomingStore>CMDB</GroomingStore>
      <GroomingTargetId>$MPElement[Name='WorkItem!System.WorkItem']$</GroomingTargetId>
    </WriteAction>
  </WriteActions>
</Rule>

See Also

Reference

DataSourceModuleType
DataSources