Hi Devs,I want to use to services in my rich text part, in this on the click of the link and the csv document will be downloaded in the system as an export file,Simultaneoulsy I want to start the process on that click only to delete that csv document that is created internally by appian, so that my app does not pile up with time in the futureAttaching the snip for your reference:
Discussion posts and replies are publicly visible
This CSV is genereted by the interface code itself, data source is viewI created the PM, for implementing the cleanupBut i am not able to find a service to clean the contents of that folderI know to set a auto timer, but not able to get the right service to delete the created csv files in the application at the backend
Unknown said:But i am not able to find a service to clean the contents of that folder
You merely need the "delete document" smart service in a process model...
That is what I was trying to suggest above:
Mike Schmitt said:Alternatively you could build a whole separate process model which runs nightly, gets all documents in the folder, and deletes documents older than X days for example.
To clarify, in the first node you'd use a rule to grab all documents from the folder (since it looks as if they're all stored in the same folder). Then loop over all the documents and return only documents older than your chosen threshold, to be stored in a PV array. Then loop over the "delete document" smart service for each of those document IDs.