When you work with models for a long period of time, the comments in published documents are valuable for your teams. In order not to lose comments added to Cameo Collaborator for Alfresco documents when migrating to Cameo Collaborator for Teamwork Cloud, also migrate the comments of each document as described below.
To migrate comments from a document in Alfresco to a document in TWC
Add the following property to the the JAVA_ARGS line:
-Dcc.document.migration.enable=true |
Update the script link in the address bar by replacing {documentID?} with the actual ID (UUID) of the document from which you want to migrate comments. The updated link should look like this: http://<host>:<port>/alfresco/s/nm/allComments?documentID=<UUID>.
Document ID is the alphanumeric value in the document link between the document location and a hash symbol (#). For example, if your source document link is http://alfrescodev.lt.nomagic.com:8081/share/page/context/shared/document-details?nodeRef=workspace://SpacesStore/754481ba-574f-49ea-a102-c7ef51c396b6#TREE_VIEW_ID__18_0_4_43201a6_1424251708711_2821_4616NodeView___10_0EAPbeta2_8740266_1126687192609_427276_2_cc_TREE_VIEW_ID__18_0_4_43201a6_1424251708711_2821_4616, the document ID in the link is 754481ba-574f-49ea-a102-c7ef51c396b6. |
From the command line, execute the following curl command:
curl -k --data-binary @<full_path_to_file_with_exported_comments> POST https://<host>:<port>/<web_app_platform_root>/api/collaborator/document/<uuid>/branch/<uuid>/comments/importFromAlfresco -H "NoMagic-Wap-Username: <username>" -H "NoMagic-Wap-Password: <password>" -H "Content-Type: application/json;charset=UTF-8" |
Make sure that you replace the placeholders in the command (between the angle brackets (<>) with the actual data, e.g., user name, password, the path to the .json file with exported comments, etc. See the example of the command below: curl -k --data-binary @/opt/JohnTemp/allComments_off.json POST https://webappmaster.nomagic.com:8080/webapp/api/collaborator/document/5f5e2a2e-7da9-4e8b-a498-7415db2aaca0/branch/648630f9-d95f-468d-8177-03ff933fff73/comments/importFromAlfresco -H "NoMagic-Wap-Username: john" -H "NoMagic-Wap-Password: NoMagic2018" -H "Content-Type: application/json;charset=UTF-8" Learn how to find target document and target branch IDs (UUIDs) which you need to add to the target document link in the command. |
Remove the -Dcc.document.migration.enable=true property from the JAVA_ARGS line.
Save and close the properties file.
After following the steps above, refresh the web page with the target document to see the imported comments.
After migration some graphical comments in a Cameo Collaborator for TWC document may look shifted. This happens because large diagrams are scaled when publishing a model to the Alfresco server. To fix this issue, edit shifted graphical comments and drag the shapes to appropriate positions. |
When importing comments from a document in the Alfresco server to a document in Teamwork Cloud, among other data you need to add the target document and target branch IDs to the curl command that executes the migration. The steps below explain how to find them.
To find target document and branch IDs