Hi Adrian,
So the general idea is that we are locking as few elements as possible while guarantying that there will never be a conflict between two users editing the model.
The rules are the following:
-
- If you have the lock on an element, this means that others cannot change its properties/attributes. For simple properties like name, others cannot change it while you have the lock. For properties that are lists (references…), this means that others cannot change the list (ie add/remove elements from the list) but they can still modify existing elements in this list.
For example, when a Function is locked, others cannot change its name, or add/remove Ports or add or remove sub-Functions. They may still modify the properties from its previously existing ports or sub-Functions though.
-
- So, when using Team for Capella, when you start to edit a simple property (name…), you will take the lock of the element.
For example: if you edit the name of a Function, you take the lock on this Function.
-
- Then, when you start to add or delete an element for the list, then it takes the lock on the container of this list.
For example, if you add a Port to a Function, or if you add a sub-Function to a Function, then the Function gets locked.
-
- A locked element is rendered as locked in all opened representations and in all views.
For example, if you have the lock on a Function, others will see it as locked in all opened diagrams/tables as well as in the Project Explorer tree view. That does not mean that the diagram itself is locked, only the Function is.
- For Diagrams: if you have an open diagram, and if you start modifying the graphical aspect of it, then you take the lock on this diagram. This means that others cannot change the graphical aspect of this diagram.
For example, if you refresh an open diagram, or re/arrange elements on this diagram, or resize a function in this diagram, then you take the lock on this diagram.
Another example: if you change the name of a Function in a diagram you have opened, then you take the lock on this diagram, because changing the name of a Function will change the graphical aspect of your diagram. If you change the summary property of a function, this won’t take the lock on the diagram. Going back to the Function name change: once you have the lock on a diagram, others may still open this diagram, they may still do changes on objects in this diagram but no changes that will change the graphical aspect of the diagram. For example, they won’t be able to rename other functions from this diagram because the diagram is locked. Nevertheless, they may still change the name of other functions that appears in this diagram from other diagrams or from the project explorer view for example.
-
When a user edit a model element or a diagram, then locks are taken automatically according to the previous rules, and other users are automatically and instantly notified of these locks
-
When a user saves its changes, locks are automatically released and other users are automatically and instantly notified of these lock release
Now, from there it is obvious that I have not described all the rules, and one can be imaginative (what about explicit locks, what about tables, what happens if a user leaves/is disconnected, etc…) and there are other functions related to locking/unlocking, but in the end the following principle is “we are locking as few elements as possible while guarantying that there will never be a conflict between two users editing the model” to ensure a smooth collaboration between users.
I hope this should be answering you questions.
Stephane Lacrampe
Obeo Canada