cancel
Showing results for 
Search instead for 
Did you mean: 

How to check for recently deleted documents?

Kimberley_Masse
Champ on-the-rise
Champ on-the-rise

I have a set up which syncs content from Nuxeo to Drupal. To add content from Nuxeo to Drupal is simple, I query for recently modified Nuxeo documents. However deleting content in Drupal if it is deleted in Nuxeo is a little trickier.

Currently I'm comparing against the document ids in my map table to Drupal. I query Nuxeo for documents in an list of IDs (those from the map table) and if one exists in Drupal but not the Nuxeo results it is deleted. But with over 15000 documents in Nuxeo and the query only being able to handle approx 80 ids at a time (because it is effectively a GET request with the ids in the query string), it takes a long time.

Is it possible to query deleted documents while they are in the trash?

4 REPLIES 4

Pierre-Gildas_M
Confirmed Champ
Confirmed Champ

Hi,

I think you would have better results using an Event handler on Document removed triggering an Automation script with a Blob.PostToURL operation POSTing to a URL on Drupal actually removing the document.

Some references:

Thanks. I'm trying to avoid writing any modules for Nuxeo though, as I have little experience in java. Is there not a query I could run?

The event handler and associated automation chain can be written in an XML contribution without any Java code.

Thanks - I was able to achieve what I wanted using the query `SELECT * FROM Document WHERE ecm