17 Replies Latest reply on Jan 2, 2014 12:38 PM by Brian Dalton

    Can't Delete a Workflow..

    Brian Dalton

      I have a workflow that I used for testing/goofing around and I'd like to delete it.  It says there are files in it so I can't delete it.


      I searched for files that are, or have ever been in that workflow, and the search came up empty.

      I destroyed everything that was deleted previously.


      Still it says there are files in the workflow...


      I checked the tables with SSMS and found records that certain files are (or were) in that workflow.


      I looked for those files in the vault, and found no trace of them...



        • Re: Can't Delete a Workflow..
          Harith Ismail

          Hi Brian,


          Try this,


          In EPDM window explorer > Tools > Report Generator > and follow this steps (see attached word doc).


          As the name says.. it will generate a list of every files that has gone through a work flow. You need to search and destroy all the files before thew orkflow can be deleted.


          Hope this helps.. cheers



          • Re: Can't Delete a Workflow..
            Jeff Gherardi

            The files may be in your Deleted Items (PDM Recycle Bin).  To access your deleted items, right-click on your Vault View and select properties.  There is a tab on the right for Deleted Items.  Be sure to check the box for 'Include Items from Sub-Folders.


            It's not enough just to delete the files that had at one point existed in the workflow state, you need to destroy them.

            • Re: Can't Delete a Workflow..
              James Pepper



              You once asked a question that really helped me, and I think the answer you got then is the answer now. I hope so.


              Tor Iveroth said:



              it is likely that the files that are preventing the folder from destroying are left over records (orphaned records) from that failed add operation. So when the delete tries to process the folder it finds file records in the database that does not have proper permissions.  


              Try this:

              1. Browse into the problematic folder.

              2. Add a new file to the folder, a txt file for example.  If there are "orphaned" records in the folder, adding a new file would trigger a clean up of those.

              3. SHIFT-DELETE the txt file.

              4. Now try to destroy/delete the folder.

                • Re: Can't Delete a Workflow..
                  Brian Dalton

                  My problem is different this time, James.  It's not a folder I'm trying to delete, it's a workflow.  As near as I can tell, the folder that contained the files that went into this workflow has already been destroyed, as have the files themselves, yet the workflow still can't be deleted because the system states that it contains files.

                    • Re: Can't Delete a Workflow..
                      Steve Ostrovsky

                      When you say you've search for files in the workflow, we're assuming you searched on each of the workflow states with "Include files that have been..." checked.


                      Workflow Delete.jpg


                      Moving past that, here's what happened to one of my customers last time we couldn't delete a workflow:


                      There were 3 files for their workflow that were not deleted and destroyed.  We were able to destroy two of them but the third displayed a lack of permissions issue even though we had admin user and permissions to delete in all states in the workflow and the folder permissions were correct.


                      Examination of the database showed that there were other states in this workflow that were no longer enabled.  We re-enabled these states which allowed us to set the admin user to have permissions to delete from these states. It was a previous version of this one file that was in one of these states. Once the permissions were set, the file deleted and then we deleted the workflow and the category for it via the admin tool.


                      Real nasty bugger that required going into the SQL database. If you can't find a way to delete if, I'd call your VAR and get them on it. They'll get in touch with SolidWorks support who have some very good people (they helped me with this particular one cause I don't play in the database).

                  • Re: Can't Delete a Workflow..
                    Mauro Gioino

                    Hi Brian,


                    I have the same problem but I can't destroy the files.


                    Can you help me with the solution, please?



                    Best regards.

                      • Re: Can't Delete a Workflow..
                        Brian Dalton

                        I recommend that you contact your VAR... that's how I solved the problem.  There were some errant records in the database that were gumming up the works.  My VAR sent me some queries that I ran (with SW permission and using SW provided instructions) which were able to identify and remove the offending records.


                        Don't try to do this stuff by yourself.  Get your VAR involved and correct the situation under strict guidance from them and SW.  That way you can avoid making a worse mess and also violating the terms of your support subscription.