cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Document ID

clundquist
Champ in-the-making
Champ in-the-making
We need to load Alfresco with our existing documents, and store the Alfresco document id with our existing DB so that we can have a way from our external system to retrieve the documents. Can this be done? What methods in the API would be used to upload a document and return an ID of the document stored in Alfresco?
5 REPLIES 5

jpfi
Champ in-the-making
Champ in-the-making
Hi,
you could use the Alfresco Web Service (SOAP) or the Web Script API (RESTful Services) for this purpose.
What you'd like to to seems to be very simple. So, just write a short upload webscript (http://wiki.alfresco.com/wiki/Web_Scripts_Examples#File_Upload) and return the NodeRef Property of your created Alfresco Node Object.
Cheers,
Jan

clundquist
Champ in-the-making
Champ in-the-making
Will that script not work with the community version? Also, when a new version of a document is generated through Alfresco, would I need to then update the document ID (or node) in my external application/DB or is the node tied to the latest version?

jpfi
Champ in-the-making
Champ in-the-making
Hi,
the script will work in community & Enterprise version. Perhaps the example isn't up to date…
The nodeRef will stay the same, it always points to the current version.

Cheers, Jan

marianh
Champ in-the-making
Champ in-the-making
I need Alfresco to generate unique ID for each document.
That ID must have this syntax: OU-SN/ACTUAL_YEAR, where OU is organization unit where a uploading user belongs, SN - is serial number (sequence) of document within OU and ACTUAL_YEAR is obvious. LDAP authentication is assumed.

Can someone provide step-by-step guide to achieve it?

unknown-user
Champ on-the-rise
Champ on-the-rise
Create a custom meta data property and create a new rule to populate the values.
You may need a cover sheet to get the organization unit and SN value or you can create a unique folder for each organization with the OU name used as your folder name.
if you put all of your information on a coversheet then you could simply read the values and populate your custom meta data fields with the information.
Coversheet would be the easiest way to pass in values such as OU and SN. You will need a new rule to process the information the way you want.
You will need to read the data from the coversheet via barcode docprocessing or OCR.

I need Alfresco to generate unique ID for each document.
That ID must have this syntax: OU-SN/ACTUAL_YEAR, where OU is organization unit where a uploading user belongs, SN - is serial number (sequence) of document within OU and ACTUAL_YEAR is obvious. LDAP authentication is assumed.

Can someone provide step-by-step guide to achieve it?