cancel
Showing results for 
Search instead for 
Did you mean: 

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

marquesfm
Champ in-the-making
Champ in-the-making

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 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

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 answer in original post

1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator

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.

Welcome to the new Hyland Connect. Get started or submit feedback.