When using the copyService to copy a document including a tag from a source site location to a target site location (in this example using a workflow), the tag tree for the target site´s document library is never refreshing and showing the new tag.
[Steps to reproduce]
1. Create two public sites in Share, one named "Source" and one named "Target"
2. Upload any document to the "Source" document library
3. Give that document a tag "Support"
4. Via the repository view jump to the document library folder of site "Target" and run the "View details" action for this folder
5. From the URL, write down the nodeRef of the document library folder
6. Shutdown the Alfresco instance
7. Create an Eclipse Java project named "CopyServiceTag"
8. Create the package "com.alfresco.support.dkoch" in that project
9. Add the attached Java class CopyDelegate.java (making use of the copyService to copy a document to a target noderef) to this project and package
10. Edit line 32 of this class and replace the noderef value with the value you wrote down in step 5, e.g.:
11. To resolve compiling issues, reference the libraries in the build path of this project as shown in attached screenshot eclipseProject.png. Those libraries you will get in tomcat/webapps/alfresco/WEB-INF/lib:
12. After there are no more compiling errors, export the project as a jar file using Eclipse´s export function. Name the jar copyServiceTag.jar
13. Copy copyServiceTag.jar to tomcat/webapps/alfresco/WEB-INF/lib
14. Copy attached service-context.xml to tomcat/shared/classed/alfresco/extension
15. STartup your Alfresco instance
16. Via Activiti Explorer (http://localhost:8080/alfresco/activiti-admin) deploy the attached process copy.bpmn
17. In Share, browse to the document you created in step 2 in the document library of site "Source"
18. Run the document action "Start Workflow" on that document
19. Select the workflow "Processus de copie"
20. Click on "Start workflow" button
21. Go to the document library of site "Target" and inspect the tag tree
The tag tree is never showing the tag "Support" although the document was copied successfully and the tag is still there. See attached screenshot tagNotUpdated.png
The tag tree is refreshed asynchroniously, but still, the tag "Support" should appear there after a while.
- Reproduced on latest available Alfresco One 4.2.x service pack 4.2.4.