UML & SysML modelling languages

Expertise and blog articles on UML, SysML, and Enterprise Architect modelling tool

version francaiseTwitterVideos UMLChannel SparxSystems EA YouTubeLinkedIn
Tuesday, 23 December 2014 23:20

User defined search on Enterprise Architect project baselines

Written by
Rate this item
(1 Vote)

sparxsystems enterprise architect

Enterprise Architect includes the package baseline feature that lets you create snapshots / backups of your model within the project (data is stored in the project's database). Once the baseline feature is used, it can be cumbersome to find the packages that have baselines. Such information can be required e.g. to delete baselines that are no longer relevant in order to free some space, or to find the most recent backup from a model's parent package.

This article provides a user defined search, FindPackageBaselines, that lets you search through all existing baselines within the project, and display the associated package in the Project Browser.

05/2018 update: a built-in search module is available from EA 13 (common searches > find baselines). Below is the SQL query used by Sparx Systems:

SELECT 
t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name, t_document.[Version] AS Baseline_Version, t_document.Notes AS Baseline_Note, t_document.DocDate AS Baseline_Date, t_object.Object_Type AS [Type],t_object.Stereotype, t_object.Author, t_object.CreatedDate, t_object.ModifiedDate
FROM 
t_object, t_document
WHERE
t_object.ea_guid = t_document.ElementID and t_document.DocType='Baseline'

Find Package Baselines Enterprise Archirect user defined search

I created the following search module, named FindPackageBaselines (SQL Editor type), with the following content:

SELECT o.ea_guid AS CLASSGUID, o.Object_Type AS CLASSTYPE, d.DocName, d.Notes, d.Version
FROM t_document d left join t_object o on d.ElementID = o.ea_guid
WHERE d.docType = 'Baseline' AND and DocName LIKE '#WC#<Search Term>#WC#'

To create this search module within your Enterprise Architect client:

  • open the search module (Ctrl-F or use the menu Edit > Find in Project)
  • click on Builder followed by New
  • enter the name FindPackageBaselines and select SQL Editor as the type
  • copy/paste the above content (SQL query)
  • save the search module

This user defined search looks for the existing project's baselines. If a search criteria is provided via the "Search Term" field, the search will restrict results on the packages which name includes the provided term.

Below is an example with the search criteria "component": only baselines of the "Component Model" package are displayed in the results.

FindPackageBaselines-search-enterprise-architect-sparx

When the search term is empty, all existing baselines are displayed.

Notes: project root's baselines are displayed with a different icon, as illustrated above with "Model".