Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  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:

    Code Block
    -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>.

    Tip
    titleWhat 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:

    Code Block
    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"


    Warning
    titleAdd 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:80808443/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.

...