Sonde OLEDB pour l'analyse des flux de travail WF
Microsoft.SystemCenter.ServiceManager.Monitoring.OledbProbe.WWFWorkflows (DataSourceModuleType)
Ce module de source de données se connecte à la base de données de Service Manager. Il est utilisé dans l'analyse des flux de travail WF.
Element properties:
Member Modules:
Overrideable Parameters:
Source Code:
<DataSourceModuleType ID="Microsoft.SystemCenter.ServiceManager.Monitoring.OledbProbe.WWFWorkflows" Accessibility="Internal" RunAs="SM!Microsoft.SystemCenter.ServiceManager.DatabaseWriteActionAccount">
<Configuration>
<xsd:element name="IntervalSeconds" type="xsd:integer"/>
<xsd:element name="SyncTime" type="xsd:string"/>
<xsd:element name="ConnectionString" type="xsd:string"/>
<xsd:element name="Query" type="xsd:string"/>
<xsd:element name="GetValue" type="xsd:boolean"/>
<xsd:element name="IncludeOriginalItem" type="xsd:boolean"/>
<xsd:element name="OneRowPerItem" type="xsd:boolean"/>
<!--<xsd:element name="QueryTimeout" type="xsd:integer"/>-->
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="SyncTime" Selector="$Config/SyncTime$" ParameterType="string"/>
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<DataSource ID="Scheduler" TypeID="System!System.SimpleScheduler">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
</DataSource>
<ProbeAction ID="SQLProbe" TypeID="System!System.OleDbProbe">
<ConnectionString>Provider=SQLOLEDB;Server=$Target/Property[Type='SM!Microsoft.SystemCenter.ServiceManager.SmManagementServer']/SmDbHostName$;Database=$Target/Property[Type='SM!Microsoft.SystemCenter.ServiceManager.SmManagementServer']/SMDbName$;Integrated Security=SSPI</ConnectionString>
<Query>
SELECT CONVERT(nvarchar(4000),DisplayStringView.DisplayName),
JobStatusView.Status,
JobStatusView.SubmittedBy,
ISNULL([JobStatusView].[ErrorMessage],'') AS [ErrorMessage],
[WindowsWorkflowTaskJobStatus].[BaseManagedEntityId],
[WindowsWorkflowTaskJobStatus].[RuleId],
ISNULL([WindowsWorkflowTaskJobStatus].[ErrorMessage],'') AS [TaskSubmissionErrorMessage]
FROM dbo.WindowsWorkflowTaskJobStatus
LEFT OUTER JOIN dbo.Rules
ON dbo.WindowsWorkflowTaskJobStatus.RuleId = dbo.Rules.RuleId
LEFT OUTER JOIN dbo.JobStatusView
ON dbo.[JobStatusView].[BatchId] = dbo.[WindowsWorkflowTaskJobStatus].[BatchId]
LEFT OUTER JOIN dbo.MySubscriptions
ON dbo.[WindowsWorkflowTaskJobStatus].[RuleId] = dbo.[MySubscriptions].[RuleEntityId]
JOIN dbo.DisplayStringView ON dbo.DisplayStringView.MPElementId = dbo.Rules.RuleId AND DisplayStringView.LanguageCode ='ENU'
WHERE
(
( (dbo.WindowsWorkflowTaskJobStatus.LastModified > DATEADD(second,-($Config/IntervalSeconds$),GETUTCDATE())) AND
dbo.[WindowsWorkflowTaskJobStatus].[Processed] IS NULL
AND
(
(dbo.[WindowsWorkflowTaskJobStatus].[ErrorMessage] IS NOT NULL)
OR (dbo.[JobStatusView].Status = 3)
OR ((dbo.[JobStatusView].Status = 0 OR dbo.[JobStatusView].Status = 1) AND (DATEDIFF(MINUTE, dbo.[JobStatusView].TimeScheduled, GETUTCDATE()) >= 25))
OR (dbo.[JobStatusView].Status = 2)
)
)
)
</Query>
<GetValue>$Config/GetValue$</GetValue>
<IncludeOriginalItem>$Config/IncludeOriginalItem$</IncludeOriginalItem>
<OneRowPerItem>$Config/OneRowPerItem$</OneRowPerItem>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="SQLProbe">
<Node ID="Scheduler"/>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.OleDbData</OutputType>
</DataSourceModuleType>