Workflow Monitor
Usually Windows 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. If this monitor has been red since the management pack was imported and there are no alerts in the alerts view, it is possible that there were workflows failures existing in the system even before the management pack was imported. To turn this monitor green, please ignore all old workflow failures from the Service Manager console.
1. WF Workflow Failed : Workflow failures indicate that the workflow has run into a problem which caused it to stop working. A failed workflow usually implies that the issue is known.Workflows can fail for a multitude of reasons, such as the workflow account not having the needed level of permissions to complete an activity, resources not being available, connectivity issues, etc…
2. WF Workflow Submission Failed : This workflow did not get submitted to be run by the monitoring host.
3. WF Workflow Exception : The workflow status is showing as “Successful” but has had an exception. It should be confirmed that the expected result was obtained, and if not, the action that was performed to start the workflow, may need to be repeated. Software error in the Workflow Code will cause it to fail and throw an exception.
4. WF Workflow Time Out : If a workflow does not complete an activity within 25 minutes, it will time out. The workflow may be stuck in either the started or scheduled phase, and will appear in the “Need Attention” tab which can be found in the Service Manager console, in the administration/workflows/status view for that particular type of workflow. There are a multitude of causes for workflow time outs, such as running when a service is restarted, a long queue, or APIs that are taking a long time to return.
If WF Workflow Failed,
Failed WF workflows will show up in the Service Manager console under the “Need Attention” tab of the Administration/workflows/status view for the particular type of workflow.
Open the log by pressing “View log” to gain information about why the workflow failed.
Attempt to correct the issue and press “Retry” to have the workflow rerun.
If the issue persists, try restarting the Health Service on the Service Manager management server.
If the issue is resolved manually, press the “Ignore” button to remove the workflows from the “Need Attention” view.
If WF Workflow Submission Failed,
Restart the Health Service on the Service Manager management server.
If WF Workflow Exception,
Perform the manual steps to recreate the conditions which started the workflow if the workflow completed as “Successful” but did not complete the intended task.
The workflow will be present in the Workflow Status View in the Administration Pane of the Service Manager console.
If WF Workflow Time Out,
Timed out WF workflows will show up in the Service Manager console under “Need Attention” tab of the Administration/workflows/status view for the particular type of workflow. Retry the workflows to attempt to run it again, or press ignore if the issue was manually fixed.
If the workflows are stuck in a state where they are not running, restart the Health Service on the management server to try and restart all the queued workflows again.
Target | Microsoft.SystemCenter.ServiceManager.SmManagementServer |
Parent Monitor | Microsoft.ServiceManager.Workflows.AvailabilityHealthRollup |
Category | AvailabilityHealth |
Enabled | True |
Alert Generate | False |
Alert Auto Resolve | True |
Monitor Type | Microsoft.SystemCenter.ServiceManager.Workflows.OLEDB.Monitoring.DBProbeMonitorType |
Remotable | True |
Accessibility | Public |
RunAs | Default |
<UnitMonitor ID="Microsoft.SystemCenter.ServiceManager.WWFWorkflows.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>
SELECT CONVERT(nvarchar,COUNT(*))
FROM dbo.WindowsWorkflowTaskJobStatus
LEFT OUTER JOIN dbo.JobStatusView
ON dbo.[JobStatusView].[BatchId] = dbo.[WindowsWorkflowTaskJobStatus].[BatchId]
LEFT OUTER JOIN dbo.MySubscriptions
ON dbo.[WindowsWorkflowTaskJobStatus].[RuleId] = dbo.[MySubscriptions].[RuleEntityId]
WHERE ((
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)
OR( dbo.[JobStatusView].Status is NULL)
)
))
</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>