Document Retention
PostPosted:Sun Aug 22, 2010 4:42 am
Hello,
I'm planing to implement retention policy (implemented as a workflow process). So here is my plan :
- User must choose a date.
- Perform a query to find all Document that's older than those date
- Delete all document that match those criteria
So far, I have no problem with deleting or moving Document to other place, but I have difficulty in searching the Document. Is there any sample code on using AdvancedSearch in openKM ?. Here is snipet of my planned code (action handler for the retention policy) :
I'm planing to implement retention policy (implemented as a workflow process). So here is my plan :
- User must choose a date.
- Perform a query to find all Document that's older than those date
- Delete all document that match those criteria
So far, I have no problem with deleting or moving Document to other place, but I have difficulty in searching the Document. Is there any sample code on using AdvancedSearch in openKM ?. Here is snipet of my planned code (action handler for the retention policy) :
Code: Select all
DirectDocumentModule MyDocument = null;
AdvancedSearchQuery FoundDocs = null;
FoundDocs = new AdvancedSearchQuery();
MyDocument = new DirectDocumentModule();
...
...
...
...
/*Repeat an delete all Document that match the Search key */
...
...
MyDocument.delete(...., .....);
...
...
...