cancel
Showing results for 
Search instead for 
Did you mean: 

PurgeDocument does not delete file in disk group

Brian_Beaulieu
Champ on-the-rise
Champ on-the-rise

OnBase 18

I'm finding that calling DeleteDocument(Document) and then PurgeDocument(Document) seems to do what is needed in OnBase but when I check the disk group, I still see the file on the server.

Is there another step needed to delete the files from the filesystem?

Basic example:

var dt = application.Core.DocumentTypeGroups.Find("Blah");var documentQuery = application.Core.CreateDocumentQuery();documentQuery.AddDocumentTypeGroup(dt);var results = documentQuery.ExecuteQueryResults(100);foreach (var item in results.QueryResultItems){  var current_doc = item.Document;    application.Core.Storage.DeleteDocument(current_doc);  application.Core.Storage.PurgeDocument(current_doc);}  
4 REPLIES 4

Brian_Beaulieu
Champ on-the-rise
Champ on-the-rise

I removed the Purge and purged manually in the client and i get an error about files may not have been deleted.. so maybe this is just a permissions issue.

Nothing in diagnostic console either

Daniel_Quill
Elite Collaborator
Elite Collaborator

Brian,

You may need to check the Application Server's Application Pool Identity User. This is the user that will need the access to delete a file from the disk group. If it is not already, try changing the Identity User to a domain account that has access to the disk groups.

Interesting.. I thought it was DDS that'd be doing it (I guess it is, when I do it through the client)..

Still investigating.

Permissions were fine.. there's an open file handle left on the file after it's added through the Unity API.

I did an iisreset, lock was released and a purge in Onbase Client succeeded without throwing an error and deleted all of the files ready to purge from the filesystem.


C:\OBDataTrain\SM\V2\0>psfile


PsFile v1.03 - Lists files and directories opened remotely

Copyright (C) 2001-2016 Mark Russinovich

Sysinternals


Files opened remotely on ECMPROD:


[664] C:\OBDataTrain\SM\V2\0\1224.jpg

  User:  blah

  Locks: 0

  Access: Read


C:\OBDataTrain\SM\V2\0>psfile 664 -c


PsFile v1.03 - Lists files and directories opened remotely

Copyright (C) 2001-2016 Mark Russinovich

Sysinternals


Closed file C:\OBDataTrain\SM\V2\0\1224.jpg on ECMPROD.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.