Skip to main content

Troubleshoot blocked workflows

A workflow is blocked and is failing to complete.

H
Written by Harry Ledger
Updated over 2 months ago

The table below details some potential reasons why your workflow is blocked.

Reason

Description

The workflow you are running is required to process a large amount of data

For example: Sending a policy document or entering a bulk absence for a large number of employees. In these situations, it is advisable to give the workflow a chance to process the information and complete in due course.

Note: If you are running a workflow that is required to send a large number of emails:-
If the service was set to run every 15 minutes, the notification service would process a batch of emails, then in another 15 minutes, the next batch of emails would be processed.

If you are running a workflow that processes a large number of emails, it may require the emails to be processed in multiple batches, which can take additional time to run and complete.

Blocked workflows could also be a result of SQL server performance

For example: If a SQL Server is housing multiple databases or does not meet minimum hardware specifications for SelectHR, it can put a strain on the SQL Server which will have a detrimental effect on server performance.

This in turn, can cause a workflow to be blocked as the SQL Server is taking longer to process the information relevant to the workflow.

The workflow cannot progress past a "delay" stage because the Notification Service is not running

A delay stage prevents the workflow from progressing for an amount of time.

Often these are used when a workflow has lots of data to process, and this needs to be done prior to showing the next stage to a user.

The notification service is required to count the time for the delay stage - without it, the delay is permanent.

Resolve this by ensuring the Notification Service is running.


Blocked workflow email notifications

This is sent when a running workflow has encountered a problem. Information about the workflow is usually included within the email notification.

Using this information, it is sometimes possible to go into the Workflow Configuration and find the workflow the notification is referring to.

To identify the problematic workflow instance, follow these steps.

  1. In the Admin Tool, in the Workflow section, click Workflow Configuration.

  2. Scroll through the list of workflows until found the likely candidate.

  3. Double-click on the suspected workflow.

  4. This will bring up the Workflow Properties.

  5. Expand the Running Workflows.

    • If there are none showing then it will not be this suspected workflow, repeat from step 2.

  6. A list of possible running workflows can be displayed:

    • The Date is the date when the workflow was submitted.

    • The Initiator is the person who started the workflow.

    • Depending how much information the notification gives these two pieces of information can be of assistance. Especially if there is a date, because the date should be before the date on the notification.

  7. Double-click on any of the suspected workflow to bring up its' Workflow Instance Properties.

  8. Scrolling through the Stages near the bottom looking for the Messaging stages and opening them to see who they have gone to can help determine if this is the running workflow which is causing the blockage.

  9. If it is determined that the running workflow is the cause, then using the Terminate under the Running Workflows will stop the workflow and any notifications associated with it.

    • It will also remove any Task List entry caused by any assignment.

    • If it is an Absence Type request, then it will leave an entry in the Absence data table, so it might need to be deleted from the specific person's Absence History.


Use data exports to identify blocked workflows

You can run a data export on the SelectSystem database to assist in identifying and resolving blocked workflows.

Function

SQL Code

Ascertain the Instance Stage using the Instance ID within the email sent to HR. You should replace the Instance ID Criteria with the Instance ID in the Email.

SELECT
Workflow.[Instance Stages].[Instance Stage Number],
Workflow.[Instance Stages].[Instance Number],
Workflow.[Instance Stages].[Context ID],
Workflow.Instances.[Instance ID],
Workflow.Instances.Description,
Workflow.Instances.Created,
Workflow.[Instance Stages].Created,
Workflow.Instances.Message,
Workflow.Definitions.Name
FROM Workflow.[Instance Stages]
INNER JOIN Workflow.[Instance Stage Users]
ON Workflow.[Instance Stages].[Instance Stage Number] = Workflow.[Instance Stage Users].[Instance Stage Number]
INNER JOIN Workflow.Instances
ON Workflow.Instances.[Instance Number] = Workflow.[Instance Stages].[Instance Number]
INNER JOIN Workflow.Definitions
ON Workflow.Instances.[Workflow Number] = Workflow.Definitions.[Workflow Number]
WHERE Workflow.Instances.[Instance ID] = '5ebb037d-b877-4db4-9e6f-ecbdb38bf0e8'

Identify all Workflows that are currently running where there is a Task Stage that has no active User assigned, essentially blocking the Workflow from being possible to complete.

SELECT
Workflow.[Instance Stages].[Instance Stage Number],
Workflow.[Instance Stages].[Instance Number],
Workflow.[Instance Stages].[Context ID],
Workflow.Instances.[Instance ID],
Workflow.Instances.Description,
Workflow.Instances.Created,
Workflow.[Instance Stages].Created,
Workflow.Instances.Message,
Workflow.Definitions.Name,
Security.Users.[User Name],
Workflow.[Instance Stage Users].Completed,
Workflow.[Instance Stage Users].[User Number],
Workflow.Instances.Completed,
Workflow.[Instance Stages].Completed
FROM Workflow.[Instance Stages]
INNER JOIN Workflow.[Instance Stage Users]
ON Workflow.[Instance Stages].[Instance Stage Number] = Workflow.[Instance Stage Users].[Instance Stage Number]
INNER JOIN Workflow.Instances
ON Workflow.Instances.[Instance Number] = Workflow.[Instance Stages].[Instance Number]
INNER JOIN Workflow.Definitions
ON Workflow.Instances.[Workflow Number] = Workflow.Definitions.[Workflow Number]
LEFT JOIN Security.Users
ON Workflow.[Instance Stage Users].[User Number] = Security.Users.[User Number]
WHERE Security.Users.[User Name] IS NULL
AND Workflow.[Instance Stage Users].Completed IS NULL
AND Workflow.[Instance Stage Users].[User Number] IS NOT NULL
AND Workflow.Instances.Completed IS NULL
AND Workflow.[Instance Stages].Completed IS NULL


Assign the blocked task to a user to complete

Once you have identified the problematic workflow(s), you should follow the guidance on assigning the task to a user to complete .

Did this answer your question?