Papyrus CDO allows you to share your models with others users. To be able to use this feature you'll need to have a CDO-Server.

Installation

  1. Install the last version of Papyrus CDO Integration ( https://hudson.eclipse.org/papyrus/job/Papyrus-CDO/lastSuccessfulBuild/artifact/repository/ )
  2. Papyrus-CDO proposes 2 features to install:

Configuration

How to configure connection to CDO-Server from Papyrus

  1. Open the CDO Explorer Perspective
  2. Add a new repository from the CDO Repository View by Click on the green plus
  3. a new dialod opens, Select Connect To an existing remove repository then Next,
  4. Edit the fields with these values (here are the values if you are using the Papyrus-CDO-Server in localhost):

Troubleshooting

If the connection fails opening a dialog with a such message : Failed to register channel with peer: Protocol version xx does not match expected version yy. (see the next snaphot). It means the server version is not compatible with your client version. In this case you need to update/background your server or your client according to the message.

How to Add a User

  1. From the CDO Repository view, select your server, then Right-Click-> Manage Security.
  2. The CDO Security Manager editor is now open.
  3. Click on the button in the top right corner to open a Tree Editor with the same information, then expand all contents, select the Users folder, then Right-Click-> Papyrus CDO User Management-> Create User. A dialog opens (after some delay the first time).
  4. In this dialog, you can edit various informations about the new user (some values are already initialized by Papyrus). The required values are the ID and the Password. These informations will allow to your new user to connect him to the server.

Note:

How to disconnect yourself from the CDO Server

  1. Select your repository PapyrusCDOSecuredRepository in the CDO Repository, then Right-Click-> Disconnect.

Create/Import models with CDO-Server

How to create a new Papyrus model on this server

  1. Do a Checkout from your newly created repository
  2. In the project explorer, you now have a new folder called Online Transactional Checkout. In it, find the home folder corresponding to your user id (here, it is Administrator, select it, then Right-Click-> New-> Papyrus model.
  3. Now you can work according to your Papyrus habits

Note: The commit on the CDO server is automatically done by the standard save action (CTRL-S).

How to import Models from the Workspace

You probably already have models in your workspace that you would like to import into a repository. To do this, select one or more models in the Project Explorer and choose the Import into Repository... action in the context menu. Alternatively, just drag and drop one or more model onto a repository.

By default, the wizard maps incoming models to paths in the repository according to their paths in the workspace. This mapping may be customized in the last page.

As a first step, the wizard analyzes the selected models for cross-reference dependencies. It is highly recommended also to import any models that references the initially selected models. Otherwise, they will be updated to reference the models in the repository and it may be difficult to edit them when Papyrus is not connected to the repository.

It is also suggested to import models referenced by the initial selection. However, references from models in a repository to models in the workspace do not present the same kind of problem of availability as the reverse case.

Sharing Models with a Team

One purpose of keeping Papyrus models in a CDO model repository is to share them with a team and enjoy the benefits of real-time collaboration that CDO offers. However, this entails certain consequences that need to be accounted for in the workflow.

Locking Objects

The context menu in both the Model Explorer view and the diagrams has actions for locking and unlocking objects. Locking a model element reserves it for the exclusive use of the editor that has it locked. Other users connected to the same repository cannot edit it. Locking an element in a diagram locks not only the model element, but also the view of it in the diagram.

An object locked by you shows a key decoration. To lock an element, use the Locks/Conflicts → Lock context menu action:

To unlock an object once you have finished editing it and saved the model, use the Locks/Conflicts → Unlock context menu action. Locks are also automatically released when the editor that holds them is closed.

When another user has locked an element, the editor shows a lock decoration:

Note that in this case, the element cannot be edited: the Properties view is disabled and the diagram editor does not show the selection handles.

Handling Conflicts

CDO is a real-time collaborative editing platform. When other users save changes they have made in models that are open in your Papyrus workbench, the repository server pushes those changes into your editors. You see those changes in real time. There is no "synchronize" step as with Git or Subversion source control.

Most changes saved by other users will be in different model elements and diagram views than those in which you have unsaved changes. These do not present a problem. However, the repository may push changes in objects that you *have* edited and have not yet saved. Many of these changes, too, are automatically merged by Papyrus: changes to features of an object that you have not modified and certain changes in multi-valued features can be merged automatically. Other changes leave the objects that you have edited in a state of conflict. This is indicated by a decoration in the diagrams and the Model Explorer view:

Papyrus cannot automatically resolve these conflicts by merging the incoming changes from the repository with the changes made in your editor. They require manual intervention to resolve.

On an object that shows conflict, invoke the Locks/Conflicts → Resolve Conflicts context menu action. In the current release, the only strategy available is to rollback the editor's unsaved changes, leaving only the changes pushed by the server from other users. Future releases will add more options, such as an interactive graphical merge.