blob: bc3721c99af001441381424c426bda2b2e53383a [file] [log] [blame]
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=
#Add in your Eclipse update site, this CDO interim job : '''https://download.eclipse.org/modeling/emf/cdo/drops/I20190208-0100'''
#Install the last version of Papyrus CDO Integration ('''https://hudson.eclipse.org/papyrus/job/Papyrus-CDO/lastSuccessfulBuild/artifact/repository/''')
#Restart Eclipse
=Configuration=
===How to configure connection to CDO-Server from Papyrus===
#Open the '''CDO Explorer''' Perspective
#Add a new repository from the '''CDO Repository''' View by '''Click''' on the green plus
#:[[File:images/CDO_NewRepository_0.png|frame|none|]]
#a new dialod opens, Select '''Connect To an existing remove repository''' then '''Next''',
#:[[File:images/CDO_NewRepository_1.png|frame|none|]]
#Edit the fields with these values (here are the values if you are using the Papyrus-CDO-Server in localhost):
#*''Host'': localhost
#*''Port'': 2036
#*''Repository name'': PapyrusCDOSecuredRepository
#*''User name'': Administrator
#*''Password'': 0000
#*:[[File:images/CDO_NewRepository_2.png|frame|none|]]
==How to Add a User==
#From the '''CDO Repository''' view, select your server, then '''Right-Click'''->'''Manage Security'''.
#:[[File:images/CDO_Manage_Security.png|frame|none|]]
#The '''CDO Security Manager''' editor is now open.
#:[[File:images/CDO_Manage_Security_Editor.png|frame|none|]]
#'''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).
#:[[File:images/CDO_Papyrus_User_Creation1.png|frame|none|]]
#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.
#:[[File:images/CDO_Papyrus_User_Creation2.png|frame|none|]]
''Note'':
*The user is not yet able to change its own password.
*The user can only edit elements in its own folder.
*The user can't work on the same model with his colleagues. To do that, the CDO Server administrator must create a new folder and give the access to the users wanting work together.
==How to disconnect yourself from the CDO Server==
#Select your repository '''PapyrusCDOSecuredRepository''' in the '''CDO Repository''', then '''Right-Click'''->'''Disconnect'''.
#:[[File:images/CDO_Server_Disconnect.png|frame|none|]]
=Create/Import models with CDO-Server=
===How to create a new Papyrus model on this server===
#Do a Checkout from your newly created repository
#*:[[File:images/CDO_Checkout.png|frame|none|]]
#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'''.
#*:[[File:images/CDO_CreateANewPapyrusModel.png|frame|none|]]
#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.
[[File:images/CDO_ImportModels.png|frame|none|]]
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:
[[File:images/CDO_Team_locked.png|frame|none|]]
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:
[[File:images/CDO_Team_remotely_locked.png|frame|none|]]
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:
[[File:images/CDO_Team_conflict.png|frame|none|]]
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.