Concurrency Control

Preparing for Concurrency Control

The Concurrency Control functionality is only available in case you have a project with a connection to a Subversion repository and your model is shared with this connection. To work with a shared project you either have to check out an existing project from the repository or share a local project with the repository.

Subversion Connection

You need an Subversion (SVN) repository added to your workspace to work in concurrency mode. To add an existing Subversion repository to your workspace:

  1. Select Windows > Open Perspective > Other > SVN Repository Exploring.
  2. Click the Add SVN Repository icon.
  3. In the upcoming dialog enter the URL of your repository location.
  4. Select Finish.

For detailed information on adding an SVN connection, please refer to the Subclipse - Subversion Eclipse Plugin documentation (Workbench User Guide > Getting started > Team SVN tutorial > Creating a new Repository Location).

Sharing a Project

In case you want to use a local project for concurrency mode, you have to share this project with an SVN repository. To share a project:

  1. Right-click your project in the Package Explorer.
  2. Select Team > Share Project.


    Figure:

  3. Select SVN as repository plug-in.

  4. Click Next.
  5. Create a new repository location or use an existing repository location.
  6. In the latter case browse to the existing location.

For detailed information on sharing a project, please refer to the Subclipse - Subversion Eclipse Plugin documentation (Workbench User Guide > Getting started > Team SVN tutorial > Connect an Existing Project with SVN).

Checking out existing Projects

To check out an existing project:

  1. Switch to the SVN Repositories perspective.
  2. Go to the location of your project.
  3. Select the project and choose Checkout.

For detailed information on checking out existing projects from the repository, please refer to the Subclipse - Subversion Eclipse Plugin documentation (Workbench User Guide > Getting started > Team SVN tutorial > Checkout).

Checking out Models from the Repository

In case a new model has been checked in by another user, you can check out this model and its lock files from the repository. Synchronizing your project with the repository indicates if new models have been added. For detailed information on synchronizing with a repository, please refer to the Subclipse - Subversion Eclipse Plugin documentation (Reference > Team Menu > Team Synchronizing Perspective ).

Note
Please make sure that you use the latest version of a model element for concurrency control, otherwise it might lead to inconsistencies.

Adding Concurrency Control to Process Models

To add concurrency control to a model, right-click the model in the Outline view and select Add Concurrency Management. With this action a commit to the repository is invoked automatically.

Adding Concurrency Control
Figure: Add Concurrency Control.

If the model is in version management mode, the necessary lock files are created and the model state is switched to concurrency mode. In case the model is in local file mode, the model file is checked into the subversion repository.

In case a model has been shared before and changes are performed in local mode, it is not possible to share this model again. You have to check out a clean copy of the model from the repository and repeat the changes. An according warning message is opening to inform you about these necessary steps:

Sharing Warning Message
Figure: Warning Message for already Shared Model.

Setting Concurrency Preferences

You can set the following preferences for handling the Concurrency Management Control:

To set these preferences, open the Preferences dialog:

  1. Select Window > Preferences.
  2. Expand the Process Manager entry in the left pane and select Concurrency Management Preferences.
  3. Now you can set your preferences.

Concurrency Preferences
Figure: Concurrency Management Preferences.

Disconnecting From Concurrency Control

To exit the Concurrency Management Mode, right-click the model in the Outline view and select Disconnect From Concurrency Management:

Disconnect From Cocurrency Control
Figure: Disconnect From Concurrency Control.

The following steps are performed automatically during a disconnect to ensure that the disconnect is not called by several users simultaneously or one after another:

Lock Files

For all separately lockable model elements, lock files are created in a model specific directory inside the same project. All lock files are added and committed to the version control system, when the Concurrency Management Mode is switched on. To be able to track changes, lock files are modified and committed upon changes of these model elements. A number that will be incremented on each commit of a changes of an element is stored in the according lock files.

Lock File Naming

The names of lock files look are composed as follows:

<project_root>/.MODEL_<GUID>/<element_type>/<element_type>__<element_uuid>.lck

Whereby:

Upgrading Models

Upgrading a model requires a lock on all model elements as obtained by the Lock All for Editing option. Please refer to section Locking all Lockable Elements of chapter Locking and Unlocking Elements for information on this option. For a model upgrade, the lock on all model elements is obtained implicitly.