Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id829288506
Content column
id829288509
Content block
id495629113

On this page

Table of Contents
maxLevel4

There are four possible outcomes, depending on which of the project_version and branch_name properties you specify:

  • If both properties have default values, the latest available version of the model is published (either the Trunk version or the Branch version).
  • If you specify only the version number (the branch_name property has the default value), the specified Trunk version of the model is published.
  • If you specify only the branch name (the project_version property has the default value), the latest version of the specified branch of the model is published.
  • If both properties are specified, the specified version of the specified branch of the model is published
    1. .
     


    Publishing a Cameo Collaborator

    for Teamwork Cloud

    document

    To publish a Cameo Collaborator document from the command - line interface, you need to execute a specific command , outlined below.


    To publish a Cameo Collaborator document from the command - line interface


    1. Open the command-line interface.
    2. Go to the <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher directory containing the executive file for model publishing. The executive file is the corresponding .sh or .bat file depending on your operating system and the version of your modeling tool.

    3. Execute In the command line, type the following command:

      These commands are valid only if the name of the actual executive file matches the name included in the command, e.g., publish.bat. Before executing the command, check the executive file name, and, if needed, change it to match the name in the command.
      • On Windows:

    Content block
    id829288508

    Cameo Collaborator for TWC allows you to publish your models using the command-line interface. This option is useful if you want to publish them periodically, e.g., once a day or during non-business hours to save time.

    Note
    titlePublishing prerequisites

    To be able to publish models to Cameo Collaborator for Teamwork Cloud:

    • The machine you publish from must run an OS with a graphical user interface.
    • The Cameo Collaborator Publisher plugin must be installed in your modeling tool.
    • You have to be logged into Teamwork Cloud.
    • You need to have user permissions to publish models.
    • The model you are trying to publish must be stored in Teamwork Cloud. If you want to publish a local model, first add it to Teamwork Cloud.
    • If you intend to publish a large model, increase the default JVM heap size of the Cameo Collaborator Publisher plugin as follows:
      1. Go to the <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher directory and open

        :
        The

        the publish.

        bat fileon Windows.The publish.sh fileon OS X or Linux

        properties file.

      2. Increase the -Xmx value, e.g., -Xmx4000M. It is recommended to set a larger heap size value than the one defined for your modeling tool.

      3. Save and close the file.

    • Depending on the size of the model you intend to publish, allocate a sufficient amount of memory to your modeling tool:
      • 2 million element model - 24 GB of RAM

      • 1 million element model - 15 GB of RAM

      • 500k element model - 7 GB of RAM

    Info
    titleProject permissions

    When you publish a new document, it inherits Teamwork Cloud project permissions. When you update a document, project permissions are not affected.


    Publishing from the command-line interface consists of these steps:

    1. Configuring publishing properties
    2. Publishing a Cameo Collaborator for Teamwork Cloud document
    3. Publishing from command-line interface
    4. Publishing from command-line interface or scheduling publishing as a background task


    Configuring publishing properties

    Before publishing a project from the command-line interface, specify publishing properties by modifying a properties file. You can modify the file for every model you publish or reuse it for several models if you do not need to change the values of publishing properties.


    To configure the properties for publishing to Cameo Collaborator


    1. In the <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher directory, open the template.properties file.
    2. Read the comments and specify the values of the following properties (or leave the default values if they do not need to be changed):

      Code Block
      #
      # Teamwork CloudTeamworkCloud server properties:
      #
      
      
      # Specify the Teamwork Cloud server user name and password.
      server_server=<localhost>
      username=<userName>
      server_password=<passWord>
      
      
      # Specify the Teamwork Cloud server address.
      # If the connection between the server and your modeling tool is encrypted, type https in front of the server address.
      server_url=<localhost>
      
      
      # Set to true if the Teamwork Cloud server is configured to use SSL certificates.
      #server_use_ssl=false
      
      #server_use_encrypted_password=false
      
      
      # Set to true if you want to update used projects to the newest versions when publishing.
      #require_update_module=false
      
      ##enableSSL=false
      #encryptPassword=false
      
      #
      # Project properties:
      #
      
      # SpecifyProject the project name.
      #
      project=<project>
      
      #
      # If you want to publish a specific branch of the project, specify the branch Project branch name.
      # This property is optional.
      # If this property is not specified project
      # is loaded from trunk.
      # If project_version property is specified, branch_name property will be ignored.
      #branch_name=branch1
      
      #
      # If theProtected project is password-protected, specify the project password.
      #project_password.
      #
      #projectPassword=password
      
      #
      # Document properties:
      #
      
      # Specify theDocument name of the Cameo Collaborator document.
      document_name=MyDocument
      
      # Specify the name of.
      #
      documentName=MyDocument
      
      #
      # Category name or path to the category wherewith you"/" wantas tothe publishcategory the documentseparator.
      #
      category_namecategoryName=myCategory
      
      #
      # SpecifyIn theorder fullto qualifiedset namescope, ofprovide thefull model element containing the model data you want to publishqualified name.
      # For multiple scope elements, separate entries with semicolon (;).
      #
      scope=Model
      
      #
      # Specify the server ID of the model element containing the model data you want to publish.
      # specify either the scope or scope_by_element_server_id propertyIn order to set scope, provide element server id.
      # For multiple scope elements, separate entries with semicolon (;).
      #scope_by_element_server_id#
      # scopeById=<element.server.id>
      
      #
      # SpecifyDocument theelement name of the Document element in the template youwhich intendwill tobe useused for publishing.
      #
      template_nametemplateName=Entire Model
      
      #
      # Specify the document template Document template module is a server project which will be used in theimported to
      # active project and will be committed.
      #
      # For example:
      #  myModule
      #  myModule##myBranch
      #  myModule##myBranch##version
      #
      #template_module#templateModule=<my.module>
      
      #
      # SpecifyComments the comments location:
      #  comments_in_document - all comments created newin commentsdocument will be stored in the document.
      #  comments_in_project_without_import - all newcomments commentscreated will be stored in the project. Existing document comments will not be migrated.
      #  comments_in_project_with_import - all newcomments commentscreated will be stored in the project. Existing document comments will be migrated.
      #
      # NOTE: You need to specify Cameo Collaborator for Teamwork Cloud URL in order to migrate comments to the project.
      #
      # By default comments are saved in the document.
      #
      #comments_location#commentsLocation=comments_in_document
      
      #
      # Set to true in order to enable model editing from the document.
      #enable_editing#
      #enableEditing=true
      
      #
      # Set to true in order to enable commenting.
      #
      enable_commentingenableCommenting=true
      
      #
      # Set to true in order to update the existing document with the same name.
      overwrite_existing_document=true
      .
      #
      updateDocument=true
      
      #
      # Set to true in order to publishmark the projectdocument as an OSLC resource.
      #mark_resource_as_oslc#
      #markResourceAsOSLC=true
    3. Save and close the file.
    Note
    titleSpecifying the project version and branch
    Code Block
    publish.
    bat
    exe 
    -properties
    properties=<modeling_tool_installation_directory>\plugins\com.nomagic.collaborator.publisher\template.properties

     
  • On OS X or Linux

    :

    Code Block
    ./publish
    .sh
     
    -properties template.properties
  • Warning
    titleImportant
    properties=<modeling_tool_installation_directory>/plugins/com.nomagic.collaborator.publisher/template.properties


    After completing the steps above, yo
    ur model is published is published to Cameo Collaborator. If you want to publish the same model frequently, you do not need to do it manually every time. Instead, schedule publishing as a background task to save time.

    Tip
    titleLogging

    When publishing, all information is logged to the log file of your modeling tool. If you want the information to be logged to the command line interface, open the <modeling_tool_intallation_directory>\plugins\com.nomagic.collaborator.publisher\publish.properties file and add -verbose to the APP_ARGS line.


    Scheduling to publish a document

    If you need to publish your models periodically and/or during non-business hours, you can schedule them to be published automatically. The following procedures describe the scheduling process on Windows and Linux operating systems.
     

    To schedule a publishing task on Windows


    1. Open the Task Scheduler from the Start menu of your Windows computer and select the option to create a basic task.
    2. Type the task name, an optional description and click Next.
    3. Select how often you want the task to reoccur and click click Next.
    4. Specify when you want the task to start and click Next.
    5. To schedule the publishing to start automatically, select the Start a program radio button and click Next.

    6. Click the Browse button, go to the <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher directory, and open the the publish.bat fileexe file.

    7. In the Add Arguments (optional) box, type -properties template.properties and  and click Next.



    8. Click Finish.


    To schedule a publishing task on Linux


    1. Connect to the remote server using SSH, or open the terminal directly.
    2. Type the following command to open the crontab file with the default text editor:

      # crontab -e

    3. Using the Cron syntax create a cronjob to run the model publishing task once a day at midnight:

      0 0 * * * <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher/publish.sh -properties template.properties

    4. Save the crontab file.


    After completing the steps described above, your model is published automatically on a regular basis at a specified time.


    Improving publishing performance

    You can improve publishing performance by changing environment options in your modeling tool, as described below.


    To improve publishing performance


    1. In the main menu of your modeling tool, select Options > Environment.
    2. On the left side of the Environment Options dialog, select the Collaboration option group.
    3. On the right side of the dialog, set the Notify About New Project Versions on the Server option to false.
    4. On the right side of the dialog, set the Notify About Newer Project Usages option to Never.
    5. Click OK.


    Now Teamwork Cloud will use fewer connections when publishing, so the publishing performance will improve.

    Changing the highlighted environment options improves publishing performance.
    Content block
    id829293007

    Related pages