How to read document from Alfresco community edition 5.2?

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

How to read document from Alfresco community edition 5.2?

I am new to alfresco. This may be the basic query but please help me.

My requirement is Upload text document which will be displayed in UI once it is approved by the supervisor. To achieve this we are using three folders

Draft - To upload

Pending - Pending for approval

Approved - Approved document

Reading the content from Approved folder using document id with the REST service as shown below URL.

http://127.0.0.1:8080/alfresco/service/api/node/content/workspace/SpacesStore/1c9c1098-4a2d-46f0-b38...

Steps:

1. Editor will move the document from Draft folder to Pending for approval.

2. Supervisor will check the document in Pending folder, once he accepted through simple workflow, the document will be moved to Approved folder from Pending folder.

3. On the approved folder,we have one rule to copy the document from Approved to Draft folder so that editor can edit the document for second upload.

So here the problem is while copying the document id is getting changed so next time when supervisor approved the document we are not getting the updated content because document id is different for second document.

Please help how to resolve this conflict.

Thanks,

Muqthar

1 Reply
jpotts
Advanced II

Re: How to read document from Alfresco community edition 5.2?

I was following you right up until the last moment. This is what confused me: "so next time when supervisor approved the document we are not getting the updated content because document id is different for second document".

I think what you mean is that whatever program is being used to make the REST call is not able to associate the second upload as being the same document that was previously seen.

When documents are copied they will always get a new node reference. If you need an identifier that stays consistent across copies you should create one and store it on the document in a custom property. You could use the original node reference as a your permanent identifier, but you need to save it in a separate property.

To automatically copy the original node reference into your own property, you might consider using a custom Behavior.