10-08-2020 04:50 AM
I try to trigger an automation script when a child is added or deleted from a folderish custom document. I have a simple automation script with a console.log message to test the trigger.
I've created an event handler with _ document.modified_ event in Nuxeo Studio. In event handler activation, I've selected the local type of my custom folderish document.
In Web Ui, when i add a new document on this folderish document, the automation script is triggered (i see my console.log message in the server.log file) but when i delete a document in the same folderish document, there is no trigger.
I've also tried the Event Children order changed with no results.
Do you have any suggestion to handle this trigger ?
Thanks in advance for your help.
Seb
10-11-2020 07:29 AM
Hello,
In this case, it's more suitable to add an event handler on the children document rather than the container: In your event handler condition, just add a filter checking the parent document type, and it's OK.
For the events you would have to listen, you should have Document deleted
, Document trashed
, Document Created
, Document imported
. If you want to track if a children is modified, you have to listen to the Before document modification
event (make sure you're not saving anything in the corresponding automation chain). If you listen to the Document modified
, there's some chances you're running into infinite loops.
Regards
10-13-2020 04:40 AM
10-13-2020 05:14 AM
10-13-2020 07:57 AM
Thanks for the ticket ! I keep in mind the custom event importation, but as far as possible i wish to set my project with a "standard" configuration.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.