Trigger a java backend method when upload in Alfresco folder ends with success

cancel
Showing results for 
Search instead for 
Did you mean: 
marquesfm
Member II

Trigger a java backend method when upload in Alfresco folder ends with success

Jump to solution

Hi, Alfresco community,

I'm new in the Alfresco world and I have a doubt related to the folders upload process.

Exist any way to execute a backend method after a folder upload process is finished?

Some context:

I want to create an auto process to fill all metadata of files inside a specific folder. For example, I have a backend method that is waiting to receive a CSV file with that mapping between the metadata and the values to add, founding the file using that document name field, but I only can start this process after the Alfresco end the upload, because the upload it's done file by file.

 

Any idea?

Thanks.

1 Solution

Accepted Solutions
afaust
Master

Re: Trigger a java backend method when upload in Alfresco folder ends with success

Jump to solution

A "folder" upload is nothing more than a collection of independent, single file uploads which do not have any correlation to on another in the backend, making it impossible to react in any meaningful way to the completion of the "folder" upload and handle some metadata file in a special way. What you'd probably want in such a situation is to use the import action of Alfresco which takes an especially prepared ZIP file containing an XML descriptor of the metadata to be attached to each of the documents / sub-structures (you can create arbitrarily complex structures that way), and which is processed in a transactional manner. Unfortunately, the import action is not exposed by default for anyone to use and is not really documented in any way, so it mostly is used by advanced administrators / developers.

View solution in original post

1 Reply
afaust
Master

Re: Trigger a java backend method when upload in Alfresco folder ends with success

Jump to solution

A "folder" upload is nothing more than a collection of independent, single file uploads which do not have any correlation to on another in the backend, making it impossible to react in any meaningful way to the completion of the "folder" upload and handle some metadata file in a special way. What you'd probably want in such a situation is to use the import action of Alfresco which takes an especially prepared ZIP file containing an XML descriptor of the metadata to be attached to each of the documents / sub-structures (you can create arbitrarily complex structures that way), and which is processed in a transactional manner. Unfortunately, the import action is not exposed by default for anyone to use and is not really documented in any way, so it mostly is used by advanced administrators / developers.