• Details On Periodic Deleting and Purging of Folders in OpenKM

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #50605  by PSHREYASHOLLA
 
Hi,

We are using OpenKM Java SDK APIs and we are supporting both OpenKM Professional and Community version with our application.

Can you direct me how we can periodically delete and purge specific folders and its contents from both professional and Community versions?

Thanks And Regards,
Shreyas Holla P.
 #50619  by jllort
 
In professional edition exist a configuration parameters what takes control on it ( ask for support in our customer website ). In community edition does not exist this parameters and should take control with a contrab task or in case of SDK https://docs.openkm.com/kcenter/view/sd ... purgeTrash ( this method purge the trash of the user, not all the trashes )
 #50633  by PSHREYASHOLLA
 
Thanks for the response.

For professional I have raised a ticket and they have pointed me here https://docs.openkm.com/kcenter/view/ok ... eters.html.

So now for Community edition,
Correct me if I am wrong here, I understand

1) Delete will move all documents to trash,
2) Purge will remove the documents from repository permanently.

In this case our ask is,

1) How to delete all the contents of a specific folder periodically,
2) How to purge these folders later periodically
 #50665  by jllort
 
To delete the contents into a folders, should first getChildren and then delete each node.
You have 3 getChildren based in node type:
https://docs.openkm.com/kcenter/view/ok ... etChildren
https://docs.openkm.com/kcenter/view/ok ... etChildren
https://docs.openkm.com/kcenter/view/ok ... etChildren

You have 3 delete based in node type:
https://docs.openkm.com/kcenter/view/ok ... tml#delete
etc...

You have 3 purge based in node type:
https://docs.openkm.com/kcenter/view/ok ... html#purge
etc..

About how to create a crontab task read https://docs.openkm.com/kcenter/view/ok ... b-job.html , I suggest using JAVA class either scripting.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.