You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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


  1. Go to <modeling tool installation directory>\bin and open the properties file (e.g., magicdraw.properties).
  2. Add the following property to the the JAVA_ARGS line:

    -Dcc.document.migration.enable=true
  3. Save and close the properties file
  4. Publish the document, the comments of which you want to migrate, to Cameo Collaborator for TWC.
  5. Open a web browser and go to http://<host>:<port>/alfresco/.
  6. Select Alfresco WebScripts Home (admin only) and log in using the administrator user credentials when you are asked to.
  7. Select Browse 'Cameo Collaborator' Web Scripts.
  8. Click the link right below the Returns all document comments script title.
  9. 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>.

    What is document ID?

    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.

  10. Open a web page using the updated script link.
  11. Save all the content of the web page to a plain text file with the .json extension.
  12. 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"

    Add actual values

    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.

  13. Wait for the response "Success" which means that the import is complete. (If migration fails, you get an error message.)
  14. Go to <modeling tool installation directory>\bin and open the properties file (e.g., magicdraw.properties).
  15. Remove the -Dcc.document.migration.enable=true property from the JAVA_ARGS line.

  16. Save and close the properties file.


After following the steps above, refresh the web page with the target document to see the imported comments.

Migrating graphical 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. 


How to find target document and branch IDs

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


  1. In a web browser, open a network monitor in developer tools and go to the document to which you want to import comments.
  2. Select the "comments" HTTP request and find Request URL in request headers.
  3. Find target document and target branch IDs in the Request URL.