12-11-2018 12:24 PM
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);}
12-11-2018 12:32 PM
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
12-11-2018 12:36 PM
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.
12-11-2018 05:54 PM
Interesting.. I thought it was DDS that'd be doing it (I guess it is, when I do it through the client)..
Still investigating.
12-11-2018 07:28 PM
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.
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.