Skip to main content
You are here:

How to Clear Pending Tasks in PDM

Tasks can get stuck in SOLIDWORKS PDM for a variety of reasons, e.g., the client is not configured as a task host, SOLIDWORKS does not launch successfully, PDM database cannot suspend or cancel a task, etc. To avoid having these tasks clutter up the PDM Task List, the tasks that are not complete can be removed with access to the SOLIDWORKS PDM Administration tool and the SOLIDWORKS PDM Database server. 

Viewing pending tasks on PDM task list

CAUTION: This process involves direct edits to the Microsoft SQL Databases used by SOLIDWORKS PDM. Incorrect changes to the databases can cause SOLIDWORKS PDM to become inoperable or experience unexpected behavior. Use caution when making changes to Microsoft SQL and always create a backup before making any changes. Also be sure to have your SQL (sa) password available. MLC CAD Systems is also happy to connect and assist with these changes. 

Example Clearing Pending Tasks

The steps below will help clear any form of pending state. For this example, we’ll use a simple but common scenario of a Convert task with the Status displaying ‘Waiting for host’ where the client computer is no longer available to complete the task, so the row needs to be cleared out and the task run on another computer. 

 

Quick Tip: If the client computer is available and the task Status is displaying ‘Waiting for host’, then most likely the computer wasn’t configured as a PDM Task Host, so go ahead and verify the client computer has been configured as a task host and it’s set as a task host in the PDM task ‘Execution Method’ settings. 

 

Each Status in the Task List is assigned a numeric value ranging from 1 to 11. Below is a list of all the possible statuses in the Task List and their associated numeric values. ‘Waiting for host’ has a numeric value of 1. 

 

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 

Step 1: Launch Microsoft SQL Management Studio

On the SOLIDWORKS PDM Database server, launch Microsoft SQL Management Studio and log in. Once logged in, expand Databases and then right-click your PDM vault and select New Query. 

Viewing Microsoft SQL Server Management Studio New Query

Step 2: Run the Query

Copy and paste or type the query text listed below into the new query window. The example used in this guide will assign new numeric value 8 (Cancelled) wherever the current pending TaskStatus is 1 (Waiting for Host). The SQL query can be adjusted to change the status of any pending task. Simply modify the SET TaskStatus or WHERE TaskStatus to the desired numeric value and then run the query. 

 

UPDATE TaskInstances 

SET TaskStatus = 8 

WHERE TaskStatus = 1  

 

Click Execute to run the query in the selected database. In the Messages dialog box, SQL will provide feedback as to how many rows were affected by the change. 

Executing Query to clear pending task

Step 3: Review the Task List

Return to the SOLIDWORKS PDM Task List to review the status. For this example, we can see the previously Waiting for host task has been cancelled successfully. Note, the system does not include a user, so the Status will simply display Cancelled by. This is expected behavior. 

Reviewing task list in PDM

The task can now be run on another computer. 

Technical Support

Get help from our team by Calling us at 800-364-1652 x 2. You can also get assistance by clicking the Technical Support button or the Email Our Experts button below. 

Scroll to Top