$Data
Applies To: System Center Service Manager 2010
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Workflows pass data items from module to module. The format of each data item is an XML fragment. The $Data notation variable represents this data as an XPath expression.
$Data/NameofValue$
Remarks
During discovery of the data that is gathered from a data source, the $Data variable can be used to map data to the properties of the Management Pack element that is being discovered. To map this information, you must use both the $MPElement variable and the $Data variable. The $MPElement variable retrieves the assigned GUID of a property, and the $Data variable provides a value to the property.
Syntax Section | Description |
---|---|
$Data |
Refers to a property within the DataSource element. |
Name of Value |
Path to the data that was retrieved by the DataSource element. |
Example
In the following example, a rule is defined that runs a workflow whenever a new instance of the RePackaging.Request class type is added to the system. The write action uses the $Data variable notation to access the XML formatted output of the preceding data source module. In this case, the write action module is accessing the value of the BaseManagedEntityId
element value.
<Rule ID="WorkflowSubscription_378b1659_ad6c_405b_b301_2a929e56523b" Enabled="true" Target="SystemCenter!Microsoft.SystemCenter.SubscriptionWorkflowTarget" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>System</Category>
<DataSources>
<DataSource ID="DS" TypeID="SystemCenter1!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
<Subscription>
<InstanceSubscription Type="$MPElement[Name='RePackaging.Request']$">
<AddInstance />
</InstanceSubscription>
<PollingIntervalInSeconds>60</PollingIntervalInSeconds>
<BatchSize>100</BatchSize>
</Subscription>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="SystemCenter1!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
<Subscription>
<EnableBatchProcessing>false</EnableBatchProcessing>
<WindowsWorkflowConfiguration>
<AssemblyName>WorkflowPackageRequest</AssemblyName>
<WorkflowTypeName>WorkflowPackageRequest.PackageInitial</WorkflowTypeName>
<WorkflowParameters>
<WorkflowParameter Name="InternalID" Type="guid">$Data/BaseManagedEntityId$</WorkflowParameter>
<WorkflowParameter Name="ClassGUID" Type="guid">$MPElement[Name='RePackaging.Request']$</WorkflowParameter>
</WorkflowParameters>
<RetryExceptions />
<RetryDelaySeconds>60</RetryDelaySeconds>
<MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
</WindowsWorkflowConfiguration>
</Subscription>
</WriteAction>
</WriteActions>
</Rule>