Displaying items by tag: enterprise architect 14

Using Stereotyped Relationships to Define Quicklink rules

by Phillip Chudley, Principal Consultant at Dunstan Thomas Consulting

 

Background

One of my favourite features of Enterprise Architect (EA) is the ability to define your own meta-models using MDG technology, and over the many years I have used Enterprise Architect, I have developed many such MDGs and have shared my experiences in their development at numerous EA User Group meetings.

However there has always been a “sting in the tail” with developing an MDG in the respect of defining Quicklink rules. These were (and can still be) defined using a spreadsheet where each row defined a connector between two elements for a specific diagram. Not only was this tedious, but also prone to error and not that intuitive.

With the arrival of EA version 14 and in particularEnterprise Architect version 14.1 a new method of defining Quicklink rules was introduced. This new method uses Meta-relationship, Stereotyped relationship and metaconstraint.

In this article I will explain through a simple example MDG how to use Stereotyped relationships to define Quicklink rules.

Example Meta-model

For this example a simple three element meta-model will be used and this is illustrated below together with the relationships that are defined between these three elements:

MDG Quicklink Definitions

Plan of Attack

To experiment with the new features of MDGs, the following steps were used:

  1. Create a locally hosted model repository for the MDG model.
  2. Using the MDG Builder structure, model the profile, (including any Tagged Values and Shapescripts), model the custom toolbox(es) and model custom diagram(s) connecting them with the appropriate toolboxes.
  3. Generate the MDG.
  4. Test the MDG.
  5. Using a separate diagram model the view specifications.
  6. Regenerate the MDG.
  7. Test the view specifications.
  8. Using a separate diagram model Quicklink definitions using Meta-relationships / Stereotyped relationships.
  9. Regenerate the MDG.
  10. Test the Quicklink definitions.

Steps 1) through 4) are pretty much standard for the development of an MDG and hence will not be described in detail, however some important inclusions and “gotchas” will be described.

The complete EA Model and the MDG XML file are available for download.

The MDG Profile Model

The diagram below illustrates the profile model for the elements and relationships defined in the meta-model shown previously:

MDG Quicklink Definitions

Notes

The following should be noted:

  1. The attribute named _HideUmlLinks of type Boolean and default value of True is necessary so as to prevent all the UML Quicklinks from the metaclass (in this case Class) being listed with your defined Quicklink definitions. This will have no effect until such Quicklink definitions have been included in the profile model. This attribute is added manually to the metaclass.
  2. The attributes named _MeaningForwards and _MeaningBackwoods for the metaclasses Association, Generalization and Composition are used to provide names for the Quicklink definitions. That is the names that will appear in the Quicklink menu. _MeaningForwards is the Quicklink name for Source to Target, whereas _MeaningBackwards is the Quicklink name for Target to Source. These values, along with the attributes named _linestyle and _direction can be defined using the Profile Helpers.
  3. Tagged Values named DateIndentified (type Date) and CauseDetails (type Memo) have been defined and added to the stereotypes Problem and Cause.
  4. All three elements have a basic Shapescript (shown in the table below in case you would like to create the MDG from scratch), and have Toolbox / Project Browser icons defined. These icons are optional, but are included in the MDG XML file available for download, however if you use the EA model, then you will have to exclude the icons in the stereotyped elements and toolbox prior to generating the MDG.

    MDG Quicklink Definitions
  5. EA version 14.0 moved many of the familiar right-click menu options to the Ribbons, and generating profiles for packages and diagrams is no exception. To generate a profile from a package or diagram:
    • For a Profile Package:
      • Select the Package containing the profile in the Project Browser.
      • Select Publish → Publish Package as UML Profile from the Technologies section of the SPECIALIZE ribbon.
    • For a Diagram that models a custom diagram, or custom toolbox:
      • Open the diagram containing the model of the custom diagram or custom toolbox.
      • Select Publish → Publish Diagram as UML Profile from the Technologies section of the SPECIALIZE ribbon.
      • When the dialog opens, there is no value in the Version text field. Due to an issue in EA 14.1, this must have a value (I usually set this to the same value as the version used when generating the MDG). Failure to enter a value for the version, will result in the XML files for the diagram profiles to be missing from the MDG generation dialogs.

The following diagrams illustrate the models for a single custom toolbox and a custom diagram provided for reference for the MDG example used in this article.

Example; Custom Toolbox

MDG Quicklink Definitions

Example; Custom Diagram

MDG Quicklink Definitions

The attributes in the Diagam_Custom metaclass are:

  • Show Qualifiers & Visibility Indicators – False
  • Show Tagged Values Compartment – True
  • Hide Attributes Compartment – True
  • Hide Operations Compartment – True
  • Hide Connector Stereotype Labels – True
NOTE: Due to the simple Shapescript used for the elements within the profile, the attributes for the compartment visibility will have no effect.

Using Stereotyped relationships to Define Quicklink Rules

In Enterprise Architect version 14, two new items were added to the development of MDGs, these are:

  • Meta-relationship – used to define a Quicklink rule between stereotyped elements defined in an MDG using UML Connectors.
  • Stereotyped relationship - used to define a Quicklink rule between stereotyped elements defined in an MDG using Stereotyped Connectors defined in the MDG

In my experiments with these new items, I discovered that Meta-relationships worked when used to defined Quicklink rules between different MDG stereotypes, but did not appear to work when used to define Quicklink rules between the same MDG stereotype (that is a self-relationship). Hence the reason why in this example I have defined MDG stereotypes for Composition and Generalization and used Stereotyped relationships exclusively to defined Quicklink rules.

Defining the Quicklink Rules

Using a new Profile diagram with the same package as where the MDG Profile is defined, simply:

    • Re-use the MDG Stereotype element (or elements) for which a relationships is required.
    • Using the Metamodel section of the Profile Toolbox create a relationship for each valid connection between these MDG Stereotyped elements, including any self-relationships.
    • Set a tagged value named stereotype to the name of the MDG stereotyped relationship that is valid in this context.

The diagram for the Meta-model used in this diagram is as shown below:

MDG Quicklink Definitions

The profile package is then saved as a UML Profile and the MDG re-generated. Upon testing, and using the Quicklink the result is as shown in the example below:

MDG Quicklink Definitions

If, when using the Quicklink an attempt is made to create a connection between any two elements that do not have a Stereotyped-relationship defined (as between Cause and Solution), no connector will be allowed.

NOTE: The rules defined using Stereotyped-relationships only apply when using the Quicklinker, these rules can be broken by using any relationships visible in the toolbox.

Therefore, to fully enforce relationship rules, define all relationships using Stereotyped-relationships and do not provide any relationships in the diagram toolbox.

Conclusion

Does using Stereotyped-relationships ease the pain of Quicklink defintions? In my opinion, most definitely yes!

Accompanying this tutorial, is a zip file containing:

  • The model used to define the example used in this tutorial. This is an .eapx file.
  • The MDG XML file as generated from the model.

I hope this example is useful to all those of you who develop MDGs for Enterprise Architect and I welcome your feedback.

My next article will explore the other new features for MDGs, namely:

  • View Specifications
  • Metaconstraints

Follow me on Twitter @SparxEAGuru

Published in Tutorials

Building Smart Cities on Standards

 
Sparx Systems Supports Development of the Building Information Model (BIM)
 
BIM promises significant benefits to the building and construction industry and heralds the rise of Smart Cities. It is industry disruption and innovation writ large.
 
BIM captures the full integrated lifecycle of the built environment, with the people and the services it delivers. Future built spaces will be digital, tracking how and the extent to which buildings and other infrastructure are used, while improving asset performance, optimising operation and reducing cost.
 
“Data and communication flow between BIM and GIS systems is fundamental to the successful convergence of the two domains, which will require a mechanism to link them. To this effect, the conceptual mapping standard B2GM is currently being standardised by ISO TC/211 as ISO 19166”, said Knut Jetlund, a standardisation expert and Chair of the Harmonised Model Management Group (HMMG). 
 
At its 26th Plenary Meeting held at Copenhagen in May 2008, the ISO/TC 211 Technical Committee decided to maintain its geospatial reference models using Sparx Systems Enterprise Architect – an industry leading visual modeling platform. More than a decade later Sparx Systems support for the HMMG continues. Today, Sparx Systems Pro Cloud Server enables cloud collaboration, opening the entire standards development community to the modeling effort, with  secure access for discussion and review.
 
 "Enterprise Architect is a very powerful tool to make the digital model in the standard. With this tool, you can design model views of various perspectives and effectively communicate with stakeholders related to use cases. Without Enterprise Architect, it would be difficult to have the sufficient level of information model required by ISO" said Dr. Tae-wook, Kang, a BIM subject matter expert, researcher and author at the Korea Institute of Civil Engineering and Building Technology and who is leading the ISO 19166 development project. 
Dr.Kang is also Director in Object-Oriented Design/Analysis and CAD Engineering Software Development with extensive experience in the full life cycle of the research and software process.
 
“As the range of stakeholder interest in the development of standards widens and increases the  requirements challenge for the standards developer, it is both best practice and practically essential to use the best visual modeling platforms available”, noted Ken Harkin, Head of Strategic Relations at Sparx Systems.
He added that “Standards being developed today must be flexible and able to withstand and adapt to fast changing market technologies and associated processes. Through every day use by standards development teams in many industries that are converging and continuous user feedback from a diverse global market, standards developers can be assured of the current and evolving industrial strength of  Enterprise Architect.”
 
 
 
About Sparx Systems:
Sparx Systems is a global software company specializing in high performance, visual modeling platforms for planning, designing and constructing software-intensive systems. Sparx platforms are used by systems designers, corporate planners, business analysts, enterprise architects, standards developers and software engineers. Sparx modeling software is widely used in finance, defense, government, aerospace, automotive engineering, geospatial, entertainment, health, smart grid, aviation, retail and telecommunications.
Sparx Systems' flagship modeling platform, Enterprise Architect, provides robust support for team-wide collaboration, and can scale up from single-user deployment to teams with hundreds of local and remote collaborators. With more than 750,000 effective users globally and 80% of Fortune 100 firms owning licenses, Enterprise Architect is an essential platform for the most complex of projects.
 
Recipient of multiple industry awards, Sparx Systems is highly regarded in the industry for the delivery of scalable, robust and affordable digital transformation software solutions. Sparx software is price competitive even when deployed across the entire development team. First developed in 1998, the Sparx Systems' Enterprise Architect modeling platform was commercially released in 2000, and has enjoyed more than 15 years of continuous development and growth.
 
For media enquiries, please contact:
 
Scott Hebbard, 
Communcations Manager
This email address is being protected from spambots. You need JavaScript enabled to view it.
All trademarks are the property of their respective owners.
 

Please read the attached PDF to learn more.

Published in News

Enterprise Architect 14 and Sparx Services Australia

Come join us on the dates listed below as we celebrate the recent release of Enterprise Architect 14 and the establishment of Sparx Services Australia.

Register using the URL Below:

http://www.sparxsystems.com/press/event/register.html

 eauglogo.png

Enterprise Architect 14

Sparx Systems recently released Enterprise Architect 14, come and see first hand the latest and greatest in the release. Scott Hebbard, Communications Manager at Sparx Systems will walk through and answer any questions around the most notable features of the release.

Sparx Services Australia

Come meet the experts from Sparx Services Australia, Sparx Systems newest services arm. Listen to Stephen Maguire, Principal Consultant and Trainer of Sparx Services Australia and author of over 1000+ patterns in Enterprise Architect 14.

When and where

The event will be held at the following locations: 
  • Melbourne - Tuesday, 8th May, Rendezvous Hotel - 328 Flinders Street, Melbourne VIC 3000
  • Adelaide - Wednesday, 9th May, Grosvenor Hotel - 125 North Terrace, Adelaide 5000
  • Sydney - Wednesday, 9th May, Sydney Masonic Centre - 66 Goulburn Street Sydney NSW 2000
  • Canberra - Thursday, 10th May, Hellenic Club - Matilda Street, Woden ACT 2606

Entry is free but seats are limited, register today to avoid disappointment. Light refreshments will be provided. 

We invite you to register now!

 

Published in Events

Enterprise Architect 14 and Sparx Services Australia

Come join us on the dates listed below as we celebrate the recent release of Enterprise Architect 14 and the establishment of Sparx Services Australia.

Register using the URL Below:

http://www.sparxsystems.com/press/event/register.html

 eauglogo.png

Enterprise Architect 14

Sparx Systems recently released Enterprise Architect 14, come and see first hand the latest and greatest in the release. Scott Hebbard, Communications Manager at Sparx Systems will walk through and answer any questions around the most notable features of the release.

Sparx Services Australia

Come meet the experts from Sparx Services Australia, Sparx Systems newest services arm. Listen to Stephen Maguire, Principal Consultant and Trainer of Sparx Services Australia and author of over 1000+ patterns in Enterprise Architect 14.

When and where

The event will be held at the following locations: 
  • Melbourne - Tuesday, 8th May, Rendezvous Hotel - 328 Flinders Street, Melbourne VIC 3000
  • Adelaide - Wednesday, 9th May, Grosvenor Hotel - 125 North Terrace, Adelaide 5000
  • Sydney - Wednesday, 9th May, Sydney Masonic Centre - 66 Goulburn Street Sydney NSW 2000
  • Canberra - Thursday, 10th May, Hellenic Club - Matilda Street, Woden ACT 2606

 

Entry is free but seats are limited, register today to avoid disappointment. Light refreshments will be provided. 

We invite you to register now!

 

Published in News