HI Ivan,
That is do-able. My suggestion is to create a managed UI tool for it so you can search instance and delete documents anytime you want. Also, I don't think you should delete all docs associated to an instance because you may delete docs from other tasks that are still active. Best approach is to assign identifying properties to the documents every time you upload.
So in document list or file dropzone, bind a NameValuePair list to 'Upload Properties'
Alright, once done with this step, your documents are now ready to be searched by CMIS query.
This is the hardest part. Once done, you can just simply loop through ECMIDs list and use the 'Delete' operation
That's it. Once this service is tested and works. Simply call it either by a nested service flow or by Ajax call from Coach View and don't forget to provide the required business data.
Hope this helps.
Regards,
Thong Huynh
------------------------------
Thong Huynh
Sydney NSW
------------------------------
Original Message:
Sent: Thu October 08, 2020 01:53 PM
From: Ivan Martinez Villegas
Subject: Delete all files associate with process instance.
Hi all,
Client is asking for a way to delete files associated with process instance. I know that the BPM document List has allow delete option, but we want to automate this. Can we do this with JavaScript?
What we want to do is to clean up the folder of the process before they open a task.
Thanks!
------------------------------
Ivan Martinez Villegas
------------------------------