Clear Stuck Tasks in SOLIDWORKS PDM

Article by Kaden Sumsion on Dec 07, 2022

Occasionally, tasks being run in SOLIDWORKS PDM can get stuck and fail to progress. In this tutorial, we walk through how to cancel these stuck tasks from the Task List. To do so, we'll need access to the SOLIDWORKS PDM Administration tool and the SQL database server. 

In the screenshot below we can see that the Task Convert is currently in the Task List. Let’s go through the process of canceling this task as if it were stuck. 

Stuck Task in SOLIDWORKS PDM

First, we need to understand that each Status in the Task List has a Numeric Value linked to it ranging from 1 to 11. 

Below is a list of all the possible statuses in the Task List and their Numeric Values: 

1 = Waiting for Host

2 = Starting Up

3 = In Process

4 = Retrying

5 = Suspended

6 = Cancelling

7 = OK

8 = Cancelled

9 = Failed

10 = Suspending

11 = Resuming

In the screenshot below, the task Convert has the status Waiting for host.  We know from our list that Waiting for host has a Numeric Value of 1. 

 SOLIDWORKS PDM Task Manager Waiting for Host Status

Knowing this information, we now need to open the SQL Server Management Studio.  

Once opened, we need to expand DATABASES. Right-click on the vault and select NEW QUERY. 

We can now type this command in the SQL Query page.  

UPDATE TaskInstances

SET TaskStatus = 8

WHERE TaskStatus = 1 

Once we do this, Execute the query. In the Messages box, we can see how many rows were affected.

How to Clear a Stuck Task in SOLIDWORKS PDM

If we return to the Task List, we can see that the Task has been canceled. 

Canceled Task in SOLIDWORKS PDM

We can also modify the commands we put into the SQL query to change the status of the task. Simply change the values in the command to the numeric value of the statuses we want to change and change to. 

I hope this quick tip helps you to clear any stuck tasks in SOLIDWORKS PDM. If you have any questions or are struggling to make this work, do not hesitate to contact our Tech Support team. 

More SOLIDWORKS PDM Tutorials

SOLIDWORKS PDM Email Notification Troubleshooting

Ultimate Guide to SOLIDWORKS PDM Permissions

Using SOLIDWORKS Task Scheduler to Create or Modify Custom Properties

Benefits of SOLIDWORKS PDM Task List

Greyed Out Vault View in SOLIDWORKS PDM: Quick Tip

VIEW ALL SOLIDWORKS PDM TUTORIALS

 

About Kaden Sumsion

Kaden is a SOLIDWORKS Technical Support Engineer at GoEngineer.

View all posts by Kaden Sumsion