03-07-2017 11:18 PM
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.
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
03-11-2017 01:27 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.