Collaborative Modeling Best Practices for Distributed Teams Ben Constable Chief Operations Officer Sparx Systems ISO/TC 211: 31st Plenary Meeting, Canberra, 2010 www.sparxsystems.com © Sparx Systems Pty Ltd 2010 Overview Collaborative Modeling Concepts Team Deployment Version Control Modeling Workflows for Distributed Teams Managing Cross-Package Dependencies Merging Changes from Incomplete Models Applying Version Control Future Work Q&A www.sparxsystems.com Team based modeling – the challenges Widely distributed teams Shared development of standards Big models and wide scope Change control, merging work, revisions etc www.sparxsystems.com Sample Real-World Global Model Deployment www.sparxsystems.com Multi-site Models – How? Ideal Scenario: Single, Shared (Master) Repository Site 1 Site 3 Site 2 Site n Assumes good connectivity between each site www.sparxsystems.com Multi-site Models – How? Alternative Scenario: Local Replicas Site 1 Site 3 Site 2 Site n Allows broad replication even across slow links www.sparxsystems.com Version Control: What the user sees Packages Checked-in (Locked) Packages Checked-out (Editable) www.sparxsystems.com Version Control: Behind the scenes interfaces Data Exchange Format: XMI (file based) Subv ersion Repositor y Data Exchange Format: SQL Subv ersion Client Enterprise Architect TFS Repository TFS Client Model Repository CV S Repository SCC Repositor y CV S Client SCC Client www.sparxsystems.com Version Control: Multiple Users, Local Models Versions in Enterprise Architect models Package-Based Versions: Packages serialized as XMI (XML Metadata Interchange) file 1 Package Version = 1 XMI file Enterprise Architect allows version comparisons: Compare utility operates on Baseline vs Current State Current State: The ‘live’ Package in the model repository Baseline (snapshot): XMI-based version of the same package Baseline may take one of these physical forms: ‘Model Baseline’ (Snapshot stored in the model) XMI exported file (Snapshot exists on disk) Version controlled Package (Snapshot in VC Repository) www.sparxsystems.com Overview Collaborative Modeling Concepts Team Deployment Version Control Modeling Workflows for Distributed Teams Managing Cross-Package Dependencies Merging Changes from Incomplete Models Applying Version Control Future Work Q&A www.sparxsystems.com Managing Cross-Package Dependencies Examples of Cross-Package Dependencies: UML Connector between Elements in different Packages (eg Inheritance) Classifier referenced from an external package (eg. Attribute type) Move Elements between packages Model contains all related packages. Avoids info loss during XMI export/import Managing Cross-Package Dependencies Sharing Packages Across Multiple Projects: www.sparxsystems.com Model Merge When it’s needed: Concurrent work on a single package needs synchronization Offline work needs to be ‘uploaded’ Selective roll-back of changes Selective inclusion of changes (‘Phase based’ development) Occurs at the package level Between versions of a package 1-way merge of Model Baseline to live Package Baseline may exist in another model, file (eg. version control) Requires same starting Package Think version, not ad-hoc model merge www.sparxsystems.com Managing Cross-Package Dependencies Consider some possible synchronization scenarios: Merging changes made in a complete model (only one external editor supplies) Merging changes made in an incomplete model (out of date with respect to ‘Master’) How Version Control could streamline the above processes in larger scale www.sparxsystems.com Merging Changes from Complete Models Example Workflow: 1. 2. 3. 4. 5. ‘Editor1’ is assigned to Package 1 (P1) Editor1 adds a new element No other updates occur to P1 by other editors Changes to P1 submitted to Model Manager via Baseline Model Manager reviews and merges into Model Master Demonstration: Baseline Merge Complete Changes www.sparxsystems.com Merging Changes from incomplete models Example Scenario 1. 2. 3. 4. Editor1 makes further updates Meanwhile, Editor2 submits other changes to P1 for merge Editor1 now submits changes to P1 Model Manager must preserve Editor2’s changes while incorporating Editor1’s new updates (resolve conflicts) Demonstration: Selectively merge changes from Editor1’s Baseline www.sparxsystems.com Applying Version Control Benefits Allows all editors to work with complete models Distribution of model information automated Conflicts avoided by version control locks Enables check-out of all cross-dependant packages Demonstration: Version Controlled Packages www.sparxsystems.com Future Work: Package Dependency Checks Automated Dependency Checking: Ensure classifiers available in model prior to check-in Report on missing classifiers Allow automatic “add from baseline” Enterprise Architect 9 www.sparxsystems.com Future Work: Model Registry Facilitate systems-of-systems modeling A central store for multiple information models Cross-domain, reusable models published by SDO’s Inter-model dependencies, automatically retrieved Implementation: Solid Ground, hosted by CSIRO More Info: https://wiki.csiro.au/confluence/display/solidground/Model+Registry+Tools www.sparxsystems.com Best Practices Summary Edit complete models, where possible Use Baseline Merge to selectively include changes, otherwise Assign ‘Model Manager’ to coordinate efforts Apply Version Control for wide distribution and ‘auto-update’ Editors use ‘Get All Latest’ to retrieve complete, up-to-date model Check out all cross-dependent packages, commit atomically More Info: http://www.sparxsystems.com/WhitePapers/Version_Control.pdf www.sparxsystems.com Overview Collaborative Modeling Concepts Team Deployment Version Control Modeling Workflows for Distributed Teams Managing Cross-Package Dependencies Merging Changes from Incomplete Models Applying Version Control Future Work Q&A www.sparxsystems.com thank you for your attention!