Linking Framework Workflows

Microsoft.SystemCenter.ServiceManager.LfxWorkflows.Monitor (UnitMonitor)

Linking Framework Workflow Monitor

Knowledge Base article:

Summary

Usually Linking Workflow failures can happen due to one of the following reasons. The active alerts view will have an alert associated with this failure. Alert knowledge will indicate the specific cause of the failure.

Causes

1. Linking Framework Workflow Never Run : This warning indicates that the connector has not run since it was created.The Connector may be disabled, the Health Service may not be spawning workflows, or the connector may be misconfigured.

2. Linking Framework Workflow Finished with Errors : The linking framework connector experienced an error with the synchronization.Various causes are possible, the exact cause depends on the source.

2. Linking Framework Workflow Unknown Status : The linking framework connector is in an unknown status.The workflow status was not updated by the workflow.

Resolutions

If Linking Framework Workflow Never Run,

If Linking Framework Workflow Finished with Errors,

If Linking Framework Workflow Unknown Status,

Element properties:

TargetMicrosoft.SystemCenter.ServiceManager.SmManagementServer
Parent MonitorMicrosoft.ServiceManager.Workflows.AvailabilityHealthRollup
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateFalse
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.ServiceManager.Workflows.OLEDB.Monitoring.DBProbeMonitorType
RemotableTrue
AccessibilityPublic
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.ServiceManager.LfxWorkflows.Monitor" Accessibility="Public" Enabled="true" Target="SM!Microsoft.SystemCenter.ServiceManager.SmManagementServer" ParentMonitorID="Microsoft.ServiceManager.Workflows.AvailabilityHealthRollup" Remotable="true" Priority="Normal" TypeID="Microsoft.SystemCenter.ServiceManager.Workflows.OLEDB.Monitoring.DBProbeMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<OperationalStates>
<OperationalState ID="ComponentUnhealthy" MonitorTypeStateID="State1" HealthState="Warning"/>
<OperationalState ID="ComponentHealthy" MonitorTypeStateID="State2" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>60</IntervalSeconds>
<SyncTime/>
<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>
declare @TableName sysname;
declare @StatusColumn sysname;
declare @StartTimeColumn sysname;
declare @Query varchar(max);
select @TableName = MT.ManagedTypeTableName,
@StatusColumn = MTP1.ColumnName,@StartTimeColumn = MTP2.ColumnName from ManagedType MT
inner join ManagedTypeProperty MTP1
on MT.ManagedTypeId = MTP1.ManagedTypeId
inner join ManagedTypeProperty MTP2
on MT.ManagedTypeId = MTP2.ManagedTypeId
where MT.TypeName = N'Microsoft.SystemCenter.LinkingFramework.SyncStatus'
and MTP1.ManagedTypePropertyName = N'Status'
and MTP2.ManagedTypePropertyName = N'LastRunStartTime'
SET @Query = N'select CONVERT(varchar,COUNT(*))' +
' from dbo.EnumType Etype join ' + @TableName +
' SyncStatus on Etype.EnumTypeId = SyncStatus.' + @StatusColumn +
' join dbo.Relationship Rel on Rel.TargetEntityId = SyncStatus.BaseManagedEntityId join dbo.BaseManagedEntity BME '+
'on BME.BaseManagedEntityId = Rel.SourceEntityId ' +
' WHERE (' + @StatusColumn + ' like ''%FinishedwithError%'') OR ' +
'(' + @StatusColumn + ' like ''%Unknown%'') OR ' +
'(' + @StatusColumn + ' like ''%NeverRun%'' AND ' +
'('+ ' DATEDIFF(MINUTE,' + @StartTimeColumn + ', GETUTCDATE()) &gt;= 5))'
EXEC(@Query)

</Query>
<State1Filter>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Columns/Column[1]</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</State1Filter>
<State2Filter>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Columns/Column[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</State2Filter>
</Configuration>
</UnitMonitor>