Domain Models
Domain Models
Modeling Domains
What support for modeling domains? Sparx
Systems Enterprise Architect supports a range
of modeling languages, technologies and
methods that can be used in modeling and
integrating different domains to reflect aspects
of a complete business or process.
CREATED WITH
Table of Contents
Modeling Domains 25
Guide to Enterprise Architecture 35
Enterprise Architecture Overview 39
What is Enterprise Architecture 41
Context for Enterprise Architecture 43
Levels of Architecture 47
Types of Architecture 54
Scope of Architecture 64
Characteristics of Good Architecture 73
Lists, Diagrams and Matrices 80
Developing an Enterprise Architecture 85
Stakeholder Modeling 87
Requirements Modeling 90
Architectures 92
Business Architecture 95
Information Architecture 97
Application Architecture 99
Technology Architecture 101
The Business Model 102
Business Models 108
Business Modeling/Interaction 111
Example Business Modeling Diagram 112
Risk Taxonomy 114
Strategic Models 130
Value Chains 133
Strategy Maps 136
Balanced Scorecard 141
Create a Balanced Scorecard Diagram 143
Organizational Chart 147
Mind Mapping 151
Flow Charts 156
Requirements 161
Requirements 166
Model Requirements 170
Requirements Diagram 175
Example Requirements Diagram 178
Feature 180
Internal Requirements 182
Make Internal Requirement External 184
Create Requirements 187
Requirement Properties 191
Color Code External Requirements 196
Extend Requirement Properties 198
Display Tagged Values On Diagrams 201
Connect Requirements 203
Import Requirements and Hierarchies in CSV 206
Manage Requirements 207
View Requirements 209
Trace Use of Requirements 211
Manage Requirement Changes 214
Report on Requirements 219
Threat Modeling and Cybersecurity 220
Trust Diagram 228
Useful Enterprise Architect Tools in Threat
Modeling 231
Modeling Business Rules 234
Develop a Business Rule Model 238
Generate a Business Rule Model 242
Model Business Rules 246
Create a Business Domain Model 252
Create a Rule Flow Activity 255
Pass Parameters to Rule Flow Activity 260
Model Rules In an Operation 262
Compose Business Rules 267
Add and Remove Rules 271
Define Rule Conditions 274
Define Rule Actions 278
Bind Rules to Conditions and Actions 282
Define Computation Rules 285
Validate Business Rules 288
Export Composed Rules to CSV 290
Code Generation For Business Rules 292
Decision Models 299
Decision Table Editor 301
Code Generation from Decision Models 310
Decision Tree 312
XML Schema ( XSD ) 314
Getting Started 317
Example Diagram 319
The Schema Composer 320
Schema Composer Profiles 325
Create a Schema Profile 330
Schema Compositions 334
Class Diagrams 344
Schema Analysis 347
Generate Schema 349
Select a Schema Profile 351
Generate Schema File 354
CIM Schema Guide 357
NIEM Schema Guide 359
UPCC Schema Guide 362
Model Compositions 364
Generate a Model Subset (Transform) 367
UML Profile for Core Components (UPCC) 373
Available Frameworks 379
Install a Core Framework 384
The Schema Importer 389
Schema Composer Automation Integration 393
Schema Composer Addin Integration 394
Schema Composer Scripting Integration 395
MDG Technologies - UML Profile Extensions 404
XSD Models 407
Modeling XSD 408
XSD Diagrams 412
Schema Package 413
Global Element 417
Local Element 422
Global Attribute 427
Local Attribute 432
Attribute Group 437
Complex Type 440
Simple Type 445
Group 449
Any 453
Any Attribute 457
Union 461
Model Group 466
Enumeration 471
XML from Abstract Class Models 475
Default UML to XSD Mappings 480
Generate XSD 484
Generate Global Element 488
Import XSD 490
Global Element and ComplexType 494
XSL Transforms 496
Model an XSL Transformation 501
Execute an XSL Transformation 506
Debug an XSL Transformation 508
XML Validation 511
XML Service Oriented Architecture 517
WSDL 520
WSDL 1.1 Model Structure 521
Model WSDL 526
WSDL Namespace 531
WSDL Message 534
WSDL Message Part 537
WSDL Port Type 541
WSDL Port Type Operation 544
WSDL Binding 550
WSDL Binding Operation 555
WSDL Service 561
WSDL Document 566
Generate WSDL 570
Import WSDL 574
SoaML 577
SoaML Toolbox Pages 581
SOMF 2.1 584
National Information Exchange Modeling (NIEM)
2.1 587
National Information Exchange Modeling (NIEM) 598
UML Profile for NIEM 600
Download the NIEM Reference Model 619
Creating a NIEM IEPD 621
NIEM IEPD Generation 631
Creating a NIEM Data Model 634
Subsetting NIEM with the Schema Composer 640
Walk Through Examples 648
Example NIEM Schema 660
Import NIEM XML Schema 673
The Requirements Model 677
Introduction to Requirement Modeling 683
Meet the Requirement Tools 688
Specification Manager 690
The MDG Link for DOORS Add-In 693
Relationship Matrix 694
Requirement Properties 698
Requirements Diagram 702
Scenario Builder 707
Baseline Tool 711
Traceability Window 714
Dashboard Diagrams 718
Requirements Overview 721
What are Requirements 725
Levels and Types of Requirements 727
Characteristics of Good Requirements 733
Business Context for Requirements 743
Requirements Diagram 750
Creating and Viewing Requirements 758
Requirement Development 766
Elicitation 768
User Observations 770
Stakeholder Workshops 771
Creating Requirements 779
External and Internal Requirements 780
Using the Specification Manager 784
Requirement Properties 786
Color Coded Requirements Status 792
Displaying Properties on a Diagram 795
Import Requirements 800
Move Requirement External 811
Recording Requirement Types 814
Analysis 816
Models Used to Document Requirements 818
Requirements Naming and Numbering 825
Model Assumptions and Constraints 832
Create a Glossary 836
Create a Domain Model 838
Model the User Interface 841
Prioritize the Requirements 842
Specification 846
Specify Quality Attributes 848
Requirement Sources 851
Elaborate the Requirements 854
Validation 858
Derive Test Cases 860
Review Requirements 862
Requirement Management 868
Tracing Requirements 869
Tracking Requirements 875
Managing Changing Requirements 878
Impact Analysis of Changes 884
Requirement Volatility 888
Requirement Reuse 892
Requirement Documentation 896
Project Glossary 897
Software Requirement Specification 898
Use Case Report 899
Data Dictionary 901
Requirement Processes and Standards 903
Agile Requirements Processes 905
Business Analysis Body of Knowledge (BABOK) 910
UML Requirements 920
SysML Requirements 922
Additional Requirement Tools 924
Auto-Names and Counters 927
Import and Export Spreadsheets 930
Requirements Checklist 933
Documentation 935
Glossary 938
Auditing 941
Discussions 944
Maintenance Items 948
Library 951
MDG Link for DOORS 954
Getting Started 957
Create a Link to a DOORS Module 960
Export Requirements to DOORS 966
Import Requirements from DOORS 976
Information Engineering 985
Getting Started 987
Example Diagram 991
Working with Data Model Types 993
Conceptual Data Model 996
Entity Relationship Diagrams (ERDs) 998
Logical Data Model 1004
Physical Data Models 1006
DDL Transformation 1009
Creating and Managing Data Models 1015
Create a Data Model from a Model Pattern 1017
Create a Data Model Diagram 1021
Example Data Model Diagram 1025
The Database Builder 1027
Opening the Database Builder 1030
Working in the Database Builder 1034
Columns 1043
Create Database Table Columns 1045
Delete Database Table Columns 1050
Reorder Database Table Columns 1052
Constraints/Indexes 1054
Database Table Constraints/Indexes 1056
Primary Keys 1062
Database Indexes 1068
Unique Constraints 1074
Foreign Keys 1076
Check Constraints 1084
Table Triggers 1087
SQL Scratch Pad 1090
Database Compare 1094
Execute DDL 1109
Database Objects 1114
Database Tables 1116
Create a Database Table 1119
Database Table Columns 1122
Create Database Table Columns 1123
Delete Database Table Columns 1128
Reorder Database Table Columns 1130
Working with Database Table Properties 1132
Set the Database Type 1135
Set Database Table Owner/Schema 1137
Set MySQL Options 1139
Set Oracle Database Table Properties 1141
Database Table Constraints/Indexes 1143
Primary Keys 1149
Non Clustered Primary Keys 1155
Database Indexes 1157
Unique Constraints 1163
Foreign Keys 1165
Check Constraints 1173
Table Triggers 1176
Database Views 1179
Database Procedures 1183
Database Functions 1188
Database Sequences 1193
Database SQL Queries 1198
Create Operation Containers 1201
Oracle Packages 1204
Database Connections 1206
Manage DBMS Options 1212
Data Types 1216
Map Data Types Between DBMS Products 1217
DBMS Product Conversion for a Package 1220
Data Type Conversion For a Table 1222
Database Datatypes 1224
MySQL Data Types 1228
Oracle Data Types 1230
Data Modeling Settings 1232
Data Modeling Notations 1234
DDL Name Templates 1240
Import Database Schema 1243
Generate Database Definition Language (DDL) 1252
Generate DDL For Objects 1253
Edit DDL Templates 1262
DDL Template Syntax 1266
DDL Templates 1268
Base Templates for DDL Generation 1269
Base Templates for Alter DDL Generation 1278
DDL Macros 1280
Element Field Macros 1282
Column Field Macros 1287
Constraint Field Macros 1289
DDL Function Macros 1294
DDL Property Macros 1304
DDL Options in Templates 1315
DDL Limitations 1321
Supported Database Management Systems 1324
More Information 1326
Systems Engineering 1327
Getting Started 1338
Example Models 1345
Requirements Models 1353
Structural Models 1361
Behavioral Models 1368
Defense and Commercial Architecture Models 1376
Verification and Validation 1380
Simulation and Visualization 1384
Publications and Documentation 1393
Collaboration and Teams 1395
Project Management 1397
Software Engineering 1402
Getting Started 1405
Example Diagram 1410
Integrated Development 1411
Feature Overview 1414
Generate Source Code 1417
Generate a Single Class 1422
Generate a Group of Classes 1425
Generate a Package 1427
Update Package Contents 1432
Synchronize Model and Code 1436
Namespaces 1438
Importing Source Code 1440
Import Projects 1445
Import Source Code 1451
Notes on Source Code Import 1453
Import Resource Script 1458
Import a Directory Structure 1462
Import Binary Module 1467
Classes Not Found During Import 1469
Editing Source Code 1470
Languages Supported 1476
Configure File Associations 1478
Compare Editors 1480
Code Editor Toolbar 1483
Code Editor Context Menu 1490
Create Use Case for Method 1497
Code Editor Functions 1500
Function Details 1501
Intelli-sense 1506
Find and Replace 1509
Search in Files 1516
Find File 1522
Search Intelli-sense 1526
Code Editor Key Bindings 1531
Application Patterns (Model + Code) 1539
MDG Integration and Code Engineering 1543
Behavioral Models 1544
Code Generation - Activity Diagrams 1548
Code Generation - Interaction Diagrams 1551
Code Generation - StateMachines 1553
Legacy StateMachine Templates 1563
Java Code Generated From Legacy StateMachine
Template 1567
StateMachine Modeling For HDLs 1576
Win32 User Interface Dialogs 1579
Modeling UI Dialogs 1582
Import Single Dialog from RC File 1586
Import All Dialogs from RC File 1587
Export Dialog to RC File 1589
Design a New Dialog 1591
Gang of Four (GoF) Patterns 1594
ICONIX 1597
Configuration Settings 1600
Source Code Engineering Options 1601
Code Generation Options 1605
Import Component Types 1608
Source Code Options 1610
Options - Code Editors 1614
Editor Language Properties 1617
Options - Object Lifetimes 1622
Options - Attribute/Operations 1624
Modeling Conventions 1627
ActionScript Conventions 1630
Ada 2012 Conventions 1633
C Conventions 1638
Object Oriented Programming In C 1643
C# Conventions 1647
C++ Conventions 1654
Managed C++ Conventions 1659
C++/CLI Conventions 1661
Delphi Conventions 1664
Java Conventions 1668
AspectJ Conventions 1672
PHP Conventions 1674
Python Conventions 1677
SystemC Conventions 1679
VB.NET Conventions 1683
Verilog Conventions 1688
VHDL Conventions 1692
Visual Basic Conventions 1698
Language Options 1701
ActionScript Options - User 1704
ActionScript Options - Model 1706
Ada 2012 Options - User 1708
Ada 2012 Options - Model 1710
ArcGIS Options - User 1712
ArcGIS Options - Model 1714
C Options - User 1716
C Options - Model 1719
C# Options - User 1722
C# Options - Model 1724
C++ Options - User 1727
C++ Options - Model 1730
Delphi Options - User 1733
Delphi Options - Model 1735
Delphi Properties 1737
Java Options - User 1739
Java Options - Model 1741
MySQL Options - User 1744
MySQL Options - Model 1746
PHP Options - User 1748
PHP Options - Model 1750
Python Options - User 1752
Python Options - Model 1754
SystemC Options - User 1756
SystemC Options - Model 1758
Teradata Options - User 1760
Teradata Options - Model 1762
VB.NET Options - User 1764
VB.NET Options - Model 1766
Verilog Options - User 1768
Verilog Options - Model 1770
VHDL Options - User 1772
VHDL Options - Model 1774
Visual Basic Options - User 1776
Visual Basic Options - Model 1778
MDG Technology Language Options 1780
Reset Options 1783
Set Collection Classes 1786
Example Use of Collection Classes 1789
Local Paths 1793
Local Paths Dialog 1795
Language Macros 1798
Developing Programming Languages 1802
Code Template Framework 1805
Code Template Customization 1808
Code and Transform Templates 1810
Base Templates 1814
Export Code Generation and Transformation
Templates 1820
Import Code Generation and Transformation
Templates 1822
Synchronize Code 1824
Synchronize Existing Sections 1827
Add New Sections 1828
Add New Features and Elements 1829
The Code Template Editor 1830
Create New Custom Template 1833
Code Template Syntax 1835
Literal Text 1837
Variables 1839
Macros 1844
Template Substitution Macros 1846
Field Substitution Macros 1849
Substitution Examples 1851
Attribute Field Substitution Macros 1854
Class Field Substitution Macros 1857
Code Generation Option Field Substitution
Macros 1863
Connector Field Substitution Macros 1873
Constraint Field Substitution Macros 1882
Effort Field Substitution Macros 1884
File Field Substitution Macros 1885
File Import Field Substitution Macros 1887
Link Field Substitution Macros 1890
Linked File Field Substitution Macros 1894
Metric Field Substitution Macros 1896
Operation Field Substitution Macros 1897
Package Field Substitution Macros 1900
Parameter Field Substitution Macros 1902
Problem Field Substitution Macros 1904
Requirement Field Substitution Macros 1906
Resource Field Substitution Macros 1908
Risk Field Substitution Macros 1910
Scenario Field Substitution Macros 1911
Tagged Value Substitution Macros 1912
Template Parameter Substitution Macros 1915
Test Field Substitution Macros 1917
Function Macros 1919
Control Macros 1932
List Macro 1933
Branching Macros 1937
Synchronization Macros 1941
The Processing Instruction (PI) Macro 1943
Code Generation Macros for Executable
StateMachines 1946
EASL Code Generation Macros 1970
EASL Collections 1976
EASL Properties 1983
Call Templates From Templates 1996
The Code Template Editor in MDG Development 1998
Create Custom Templates 1999
Customize Base Templates 2002
Add New Stereotyped Templates 2004
Override Default Templates 2007
Grammar Framework 2009
Grammar Syntax 2012
Grammar Instructions 2015
Grammar Rules 2017
Grammar Terms 2019
Grammar Commands 2021
AST Nodes 2025
Editing Grammars 2044
Parsing AST Results 2047
Profiling Grammar Parsing 2049
Macro Editor 2052
Example Grammars 2054
Code Analyzer 2055
Code Miner Framework 2068
Code Miner Libraries 2070
Creating a New Code Miner Database 2075
Code Miner Queries 2085
Code Miner Query Language (mFQL) 2087
The mFQL Language 2090
Set Extraction 2110
Set Traversal 2113
Set Joining 2116
Sparx Intel Service 2121
Sparx Intel Service Configuration 2122
Sparx Intel Service Automatic Update 2133
Service Configuration 2137
Client Configuration - Configuring Enterprise
Architect to Use a Code Miner Service 2139
Geospatial Models 2142
Getting Started 2144
ArcGIS Geodatabases 2146
Example Diagram 2148
Exporting ArcGIS XML Workspaces 2150
Importing ArcGIS XML Workspaces 2154
Geography Markup Language (GML) 2158
Example Diagram 2161
Modeling with GML 2162
More Information 2166
User Interaction & Experience 2167
Getting Started 2169
Interaction Flow Models IFML 2170
Android Wireframe Toolbox 2174
Apple iPhone/Tablet Wireframe Toolbox 2194
Windows Phone Wireframe Toolbox 2215
Dialog Wireframe Toolbox 2233
Webpage Wireframe Toolbox 2260
Simple Analysis Models 2266
Mind Mapping 2268
Whiteboards 2272
Custom Diagram 2275
Data Flow Diagrams 2278
Analysis Stereotypes 2283
Analysis Diagram 2285
Example Analysis Diagram 2289
More Domain Models 2290
Domain Based Diagrams 2292
Modeling Disciplines 2295
Web Stereotypes 2296
User Interface Diagrams 2298
Screen 2302
Example User Interface Diagram 2304
UI Control Elements 2306
Modeling Domains 3 February, 2022
Modeling Domains
Modeling Domains
Domain Description
Strategic Context
The Business Architecture must be related back to the
Strategic Plans to ensure that all the other architecture
domains that describe the architecture in more detail are
ultimately going to benefit the enterprise and deliver value.
Business Architects typically gather information from the
company strategists and should be privy to the high-level
discussions and decisions about the future plans for the
enterprise and its organizations.
Enterprise Architect has a number of tools that help to
ensure that the architecture's alignment to the strategic plans
can be visualized, and that the drivers forming part of the
Business Architecture are related back to elements of the
Implementation Context
The purpose of the architecture is to ensure that initiatives
and projects deliver the business value and benefits that
have been described in the architectural models, so
Levels of Architecture
An Enterprise has a complex and typically hierarchical
structure, and you will need to create architectures at
discrete levels of this structure. This hierarchy of
architectures is analogous to the hierarchies of goals and
capabilities, and intuitively aligns with Strategic, Program
and Project level divisions. In a small organization it might
be possible to create a single architecture that covers the
Strategic level and the Project or Capability levels, but in an
enterprise of any appreciable size at least three separate
levels are typically needed. The naming of the levels has
been influenced by The Open Group Architecture
Framework (TOGAF).
· Strategic - Long term in the range of 3 - 5 years
Strategic
Strategic architectures describe strategic plans and
initiatives and typically run for years rather than months. A
Strategic architecture will provide a long-range plan that is
typically a view of the future over a three to five year
period; this period can be longer for industries or enterprises
that are not affected by dynamic and disruptive
environments. The Strategic architectures must support (or
align with) the enterprise's strategic goals, and Tactical and
Solution architectures must help achieve the Strategic
architecture or run the risk of not being funded.
Enterprise Architect can be used to define and manage
Tactical
Tactical architectures describe mid-range plans that help to
partition the Strategic-level architectures into manageable
groups. They typically could run for a number of years and
represent a portfolio or program-level plan of how to
achieve the goals expressed in the strategic architectures
Solution
Types of Architecture
The overall architecture of an enterprise can be described by
four integrated sub-architectures. These are:
· Business architecture
· Information architecture
· Application architecture
· Technology architecture
· Geospatial architecture
· Social architecture
Business Architecture
A well articulated Business architecture is the cornerstone of
a successful outcome of the overall Enterprise Architecture.
It defines the business drivers, the business strategy,
Information Architecture
Information Architecture is key to the success of an
Enterprise Architecture Program, as information is created,
consumed and destroyed by the components that make up
the other architectures. Understanding which business
functions and processes utilize information, which
applications serve as the master record, where information is
created and destroyed, and which technology components
store and manipulate the information, is critical to achieving
the business outcomes.
The information architecture will typically consist of a
description of the baseline and target architectures, with a
series of transitions defined that can be executed and that
would be described on Roadmap diagrams.
Enterprise Architect is a profoundly useful tool for creating
Application Architecture
Technology Architecture
The technology architecture underpins the other
architectures, providing a description of the logical, physical
and virtual infrastructure that supports the execution of
application services that in turn support information and
business functions and services.
Security Architecture
The security architecture is a slice through all of the other
architectures from a security viewpoint. It is listed as a
separate architecture because of its importance in ensuring
that the enterprise security polices are implemented through
the architecture. A breach of security could occur at any
point from the business architecture through to the
technology architecture. This could include demonstrating
how the architectures comply with security controls
published by the enterprise or available as part of an
Geospatial Architecture
The Geospatial Architecture is a slice through all of the
other architectures from a geo-spatial or location-based
viewpoint. It is listed as a separate architecture because of
its increasing importance in a world dominated by
location-based applications and business technology
functions. Not every architecture program will have the
need to develop separate geospatial architectures and in
these cases it can be relegated to a view of the other
architectures.
Enterprise Architect is well placed to be a repository for
geo-spatial architectures, with its integration with some of
the leading standards and tools in the market place,
including support for the Geographic Markup Language
(GML), ISO 1900 series standards and tools such as ArcGIS
and other geodatabases.
Social Architecture
Social Architecture has been born in an era that depends on
social media and social behavior to achieve a wide range of
outcomes in built and digital environments. Increasingly in
this period of digital and social disruption, understanding
the social aspects of an organization's interaction is critical.
Scope of Architecture
Architectures will only be successful if they are scoped
correctly. The Enterprise Architecture Body of Knowledge
(EABOK) describes three important aspects of scope, but
another one can be added that addresses the importance of
the stakeholders in the success of the architecture program
and the architectures it creates and manages:
· Time Scope
· Organization Scope
· Detail Scope
· Stakeholder Scope
Time Scope
Time Scope is important because the business typically
works in cycles, and it is critical that the architectures
respect this time dimension of the organization's
Detail Scope
Selecting the correct level of detail for an architecture is
critical to its success; this is particularly true when it comes
to the Implementation teams. Creating architectures that are
too lofty or aspirational will result in Implementation teams
making important design decisions themselves which, while
they might be appropriate for their solution, might not be the
best outcome for the entire enterprise. On the flip side of
this argument, creating architectures that are too prescriptive
and detailed can constrain an Implementation team and
result in the team not having the flexibility to select the best
solution.
Enterprise Architect is a tool based on the concept of
collaboration, and there are many facilities that will help the
architecture team members work with each other and with
all stakeholders, including implementation teams, to
determine the most appropriate level of detail for the
architectures. The Model Library facility allows in-model
reviews to be created, where elements from the architectures
such as Goals, Objectives, Applications, Technology nodes
and more can be dragged in as references for the reviews.
The Discuss & Review and Discuss & Review - History
windows allow architects and stakeholders to deliberate
about the architectures and the consequent implementations.
The Diagram Filtering facility and a wide range of tools for
changing the visualization of elements in diagrams allow the
appropriate level of detail to be set for the architectures and
the views that are created for stakeholders.
Organization Scope
Enterprise Architecture is a non-trivial and costly discipline,
and it is critical that value is delivered to the business. The
best outcomes will be achieved if the architecture touches
all parts of the enterprise, but it is quite common for some
parts of the enterprise to receive greater emphasis in the
Stakeholder Scope
(c) Sparx Systems 2022 Page 70 of 2309
Modeling Domains 3 February, 2022
their spirits
These ancient characteristics can be elaborated on and
expanded to apply to the Enterprise Architectures that are
developed in the Twenty-First Century.
Lists
Enterprise Architect has a number of tools for working with
elements in a list. These tools can be applied to any type of
element, including Principles, Business Drivers,
Requirements, Applications, Interfaces, Technology
Devices and more. The Specification Manager can be used
to create and view any type of element in a visually
appealing, word processor-type or spreadsheet-type format.
The properties of the listed elements can be displayed and
any number of properties can be added or removed from the
display, including Tagged Values. The properties can be
Diagrams
Diagrams are an expressive and visually compelling way of
Matrices
The Relationship Matrix and Gap Matrix are grids that
allow the relationships between two sets of element to be
visualized in a matrix format with one set of elements on the
horizontal axis and the other on the vertical axis. Markers at
the intersection of a column and a row indicate information
about the relationship between the two elements.
Stakeholder Modeling
Stakeholder Management is critical to successfully initiating
and maintaining an architectural program. Architects will
need to engage with a wide range of stakeholders, from
senior executives through to implementation staff. The
engagements will often require political sensitivity,
diplomacy and flexibility to ensure that the stakeholders'
needs and concerns are dealt with appropriately. Providing
relevant and tailored views of the architectures will be
critical to ensuring that the stakeholders are kept informed
and that they spend the requisite time needed to understand
the impact the architectures will have on their domain.
Having a comprehensive communication plan is also critical
to ensuring that the stakeholders receive the information
they require and that they maintain an interest and have
input into the architectures. Stakeholder analysis should be
undertaken early in the set up of an architecture program
and early in the development of an architecture, as an
individual stakeholder's position with respect to a particular
architectural initiative can vary. A matrix can be used to
describe the positions key stakeholders or stakeholder
groups hold with respect to aspects of the architecture
program, such as how supportive they are, or what
commitment they have to the architecture. The matrix can
be updated and monitored over the lifetime of an
architecture and remedial efforts made to manage the
relationships with key stakeholders.
Requirements Modeling
Requirements engineering is one of the most important
disciplines in the system lifecycle and when done well it
will set the foundation for a successful architecture or
program of work, ultimately ensuring that great value is
delivered to the users and other stakeholders.
Architectures
Architectures are the key organizing mechanism for
architectural content; they are the design or solution
statement to a proposed problem or opportunity, or the
documentation of an existing system. The architectures can
be defined at a number of different levels, including:
· Strategic - Long term in the range of 3 - 5 years
· Information Architecture
· Application Architecture
· Technology Architecture
Business Architecture
A well articulated Business Architecture is the cornerstone
for a successful outcome of the overall Enterprise
Architecture. It defines the business drivers, the business
strategy, operational models, goals and objectives that the
organization must have to achieve transition in a potentially
competitive and disruptive business environment. Architects
working in the other architecture disciplines must
understand the Business Architecture as the basis for their
own architecture descriptions and as a guide to the business
outcomes that must be achieved.
The Business Architecture will typically consist of a
description of the baseline and target architectures with a
series of transitions defined that can be executed and that
would be described on Roadmap diagrams.
Enterprise Architect has a wide range of features that can be
used to model the Business Architecture and to create
compelling visualizations that will help the executive level
stakeholders and line managers to understand how their
strategies are being addressed by the architectures. When an
architecture program is set up or a business architecture is
initiated it will typically be found that a number of
important architectural materials will be available, such as
mission and vision statements, strategic plans, business
drivers and goals and - more often than not - business
processes and capabilities will be at least started even if not
complete. Enterprise Architect has a convenient facility to
Information Architecture
Information Architecture is key to the success of an
Enterprise Architecture Program, as information is created,
consumed and destroyed by the components that make up
the other architectures. Understanding which business
functions and processes utilize information, which
applications serve as the master record, where information is
created and destroyed, and which technology components
store and manipulate the information, is critical to achieving
the business outcomes.
The information architecture will typically consist of a
description of the baseline and target architectures, with a
series of transitions defined that can be executed and that
would be described on Roadmap diagrams.
Enterprise Architect is a profoundly useful tool for creating
and maintaining information architectures, with its
sophisticated and extensive support for standards and its
wide range of tools to support information models, from
high level classifications and concepts right down to the
level of schemas and the elements and columns they are
composed of. Tools such as the Schema Composer and the
Database Builder, along with the UML Class diagram and
Glossary, and the Model Transformation facility, will be
invaluable.
Application Architecture
The Application Architecture provides an important catalog
of the applications in the enterprise describing the work that
they do to transform, transmit and store information. The
architecture also describes the interfaces that are required or
provided by the applications and the way the applications
interact to carry out the activities described in the business
models such as the Business Process diagrams. The catalog
of applications, interfaces and the diagrams and matrices
that describe their interaction only need to be defined once
at the enterprise level. An application architect will be able
to draw upon this inventory of existing artifacts to create
new architectures, classifying them as part of the baseline
and potentially the future state architecture. Where an
architecture introduces new applications, these can be added
to the description of the target state.
The Application Architecture will typically consist of a
description of the baseline and target architectures with a
series of transitions defined that can be executed and that
would be described on Roadmap diagrams.
Learn More: Application Architecture
Technology Architecture
The technology architecture underpins the other
architectures, providing a description of the logical, physical
and virtual infrastructure that supports the execution of
application services, which in turn support information and
business functions and services.
Business Models
Visualize a Wide Range of Business Concepts,
Knowledge and Risks in a Unified Model
Diagram Description
Type
Business Modeling/Interaction
Business Modeling diagrams and Business Interaction
diagrams enable you to model both the structure and
behavior of a business system. Business Modeling diagrams
are based on a Class (UML Structural) diagram, whilst
Business Interaction diagrams are based on a Sequence
(UML Behavioral) diagram. Both diagram types have the
same default Toolbox, which consists of a Business
Modeling element page. The available elements include
stereotyped Objects, and a stereotyped Actor (Business
Actor), Use Case (Business Use Case) and Collaboration
(Business Use Case Realization).
Example Diagram
Example Business Modeling Diagram
Risk Taxonomy
The UML Profile for Risk Taxonomy supports the Open
Group Standard for Risk Taxonomy (OR-T), Version 2.0,
which provides support for modeling risk scenarios and
analyzing the risk conditions.
Elements
Icon Description
· Volume
· Sensitivity
expressed as a percentage
· MaximumLikelyValue
· MinimumLikelyValue
· Type –
· Sensitivity –
· Sensitivity
· ProbableFrequency - Probability is
Response, Detection
· Cost – The intrinsic value of the asset
· LossForm
expressed as a percentage
· LevelOfEffort - Very High (VH), High
expressed as a percentage
· LevelOfEffort - Very High (VH), High
· MinimumLikelyValue
· MostLikelyValue
(VL)
Failure, Natural
· ThreatType – External, Internal
· DesiredVisibility
· Motive
· Objective
· PersonalRiskTolerance
· Resources
· SkillRating
· Sponsorship
expressed as a percentage
· MaximumLikelyValue - The maximum
· ResponseType –
· Containment - An organization’s
back to normal
Relationships
Icon Description
Strategic Models
Enterprise Architect contains a number of diagram types
that are specifically aligned with creating high quality
strategic business models. Strategic models are typically
defined by executives, modelers and managers responsible
for defining strategic direction and both short and long term
goals.
Value Chains
Present and Identify Customer and Shareholder Value
in Compelling Diagrams
Strategy Maps
Plan and Communicate Corporate Strategy from
Different Perspectives
The Strategy Map extends the Balanced Scorecard approach
in order to clarify corporate strategy, using four perspectives
and their 'Cause & Effect' relationship. The four
perspectives are:
· Financial
· Customer
Balanced Scorecard
Identify and Improve strategic management
performance metrics
Traditional performance management tools only focus on
financial outcomes and often fail to consider other important
factors such as loyal customers or skilled staff. A more
balanced approach is to consider non-financial performance
measures in relation to Company Strategy. For example,
customers might be prepared to pay more for goods and
services produced from an environmentally friendly
company. A Balanced Scorecard (Strategy and Leadership,
Kaplan and Norton, 2004) gives equal weight to four
different perspectives. In a single diagram you can record
key financial and non-financial goals, with links to
meaningful benchmarks and performance measures. The
Scorecard acts as a communication and measurement tool to
address strategic planning.
Balanced scorecard - the four perspectives:
· Financial
· Customer
complaints, yield)
· Targets
· Initiatives
For example:
Organizational Chart
Define an Organization Structure Including Roles and
Responsibilities
From the Toolbox, select the 'Org Chart' Pattern and drag it
onto the diagram. Modify the Pattern elements by selecting
the ellipsis button next to each role.
· Sales Manager
· Accounting
· Head of Logistics
Move the Sales Manager role so that they can report directly
to the CEO.
Delete the connector to the Sales Manager role. Move this
role next to the Chief Operations Officer. Select the 'Reports
to (Vertical Tree)' connector from the Toolbox and link
Sales Manager to the Chief Executive Officer.
Select the Chief Executive Officer and change the Line and
Fill Color to 'Rose' using the 'Layout' ribbon, 'Style' panel.
Mind Mapping
Record, Structure and Visualize Ideas during Meetings
and Workshops
Mind Mapping diagrams offer a flexible, visual notation to
convey complex information. Typically they are used for
studying, collaborative discussions, problem solving,
brainstorming, presenting complex ideas and decision
making. Using this non-linear approach allows the
information to be interpreted in many ways, producing
unique and innovative solutions.
to related topics
· Select 'Memory Recall' and use the Quick Linker to create
three associated Topics called 'Association', 'Visual
Memory' and 'The Brain'
· Select 'The Brain' Topic and use the Quick Linker to
create four Sub-Topics called 'Emotion', 'Language',
'Imagination', and 'Visual Processing'; your diagram
should now contain 11 related topics
· Create links to on-line resources and important
metadata: Access the 'Properties' dialog for the 'Benefits
of Mind Mapping' Central Topic, select the 'Files' tab and
enter the URL shown in order to access the Enterprise
Architect Help topic Mind Mapping Diagrams; Enterprise
Architect can easily link to any supplementary material,
including local minutes of a meeting, relevant documents,
files and web pages
Flow Charts
Create and Manage Diagrams of Workflows and
Processes
HR Process'.
3. Create two different Processes called 'Advertise Position'
and 'Review Written Application'.
4. Create a Decision called 'Met Due Date'. This decision
will be used to determine if a candidate will proceed to
the written application stage.
5. Draw a connector between 'Begin Selection Process' and
'Advertise Position' followed by another connector
between 'Advertise Position' and 'Met Due Date'.
6. Right-click on the Connector located between 'Advertise
Position' and 'Met Due Date' and select the ControlFlow
properties. Name the Connector 'Yes'. By labeling the
Connector with the word 'Yes' we assert that if an
application is received by the due date then it will be
reviewed by staff in the Human Resources department.
Any submissions received after the due date will not be
reviewed by staff.
7. Create a Decision called 'Address Selection Criteria'.
Draw a Connector from 'Review Written Application' to
the Decision 'Address Selection Criteria'.
8. Create a Process called Interview Applicant'. Draw a
Connector from 'Address Selection Criteria' to 'Interview
Applicant' and label the Connector 'Yes' denoting that if
the applicant has addressed the selection criteria then
proceed to 'Interview Applicant'.
9. Create a Decision called 'Appointment Made'. For the
'Yes' response, draw a Connector to 'End HR Process'.
10. For the 'No' response, draw a connector to 'Advertise
Requirements
Manage All Requirements Types from Elicitation
through to Validation
Gathering Requirements
Gathering requirements is typically the first step in
developing a solution, be it for developing either a system or
a process. Requirements are gathered from all parties
expected to use, maintain or benefit from the solution, and
are organized into groups, functional areas and hierarchies
as necessary. They can be created directly within an
integrated modeling tool such as Enterprise Architect, or if
they have been transcribed into a spreadsheet or a
requirements gathering or management tool, they can be
imported into Enterprise Architect.
The management of requirements is one of the more
problematic disciplines in software development, for
reasons such as:
· Volatility of requirements
systems
Enterprise Architect can reduce or eliminate these problems
in Requirements Management.
Notes
· All of these features are illustrated by examples in the
EAExample.qea or EAExample.eap model, provided as
part of your Enterprise Architect installation in the
Enterprise Architect Program Files directory: ...\Program
Files\Sparx Systems\EA
· If your project team are not using Enterprise Architect to
manage Requirements, they can still access, use and work
with them via the Cloud, from an Open Services for
Lifecycle Collaboration (OSLC) client tool
Requirements
Enterprise Architect supports requirements definition for
enterprise, business, software, hardware and system
engineering projects, including functional and
non-functional requirements. There are a number of
requirement types built into the core product and new types
can be added to suit any project. The UML does not
formally define a Requirement element, but Enterprise
Architect extends the language to provide an element that
can be added directly into the repository or through the text
based Specification Manager, or created on diagrams. In
Enterprise Architect the requirement is treated as a
first-class modeling element, and is able to participate in
relationships allowing traceability to be established and a
project manager or business analyst can track that a project
is being designed, built and tested according to the
stakeholders needs and its specifications. Use Cases can also
be defined and a sophisticated editor helps you to define
Scenarios that can be automatically generated to behavior
diagrams, enabling the Requirements Analyst to trace to
individual steps in a scenario. Using Stereotypes user stories
can be modeled, and an Agile Backlog can be defined using
the Feature element; as prioritization occurs these can be
elaborated into well articulated requirements ready for the
development team.
Description
Examples
Requirements can be aggregated to create a hierarchy, as
illustrated by this diagram.
Notes
· External requirements can be displayed with or without an
identifying 'E' (for External) in the top right corner of the
element; to toggle the display of this letter, select or
deselect the 'Show stereotype icon for requirements'
checkbox on the 'Preferences' dialog, 'Objects' page
· The colors on Requirement elements identify the status of
the requirement; you change the status - and hence color -
on the element 'Properties' dialog, and set the color for
each status on the 'Status Types' dialog
Toolbox icon
Model Requirements
Requirements are fundamental to the success of any project,
regardless of the process being used. Many organizations
have traditionally stored and managed their requirements in
text tools such as spreadsheets and word processors, but
these requirements often remain hidden from the
development process. Using Enterprise Architect’s model
based approach to requirements engineering turns
requirements into first class modeling elements. They can be
displayed on diagrams and related to the stakeholders that
own them, and traces can be created connecting them to
other down-process model elements such as Use Cases and
application Components.
Properties such as status, phase, complexity and difficulty
can be assigned to each requirement, which helps you to
manage them easily.
Features
Feature Detail
Requirements Diagram
A Requirements diagram is a Custom diagram used to
describe a system's requirements or features as a visual
model. Each Requirement is defined as a Requirement
element (a Custom element of type Requirement). The
actual Requirement, as a text explanation, is the element
name (short) or description (long) in the element properties.
Requirement elements can have relationships with other
elements, such as other Requirements, Use Cases and
Components, to illustrate how a requirement is satisfied by
modeling and development. You can track the development
arising from a specification or requirement using the
Traceability window.
Example Diagram
Example Requirements Diagram
Example 1
Example 2
Notes
· Change and Defect (Issue) elements resemble
Requirement elements and can be coded and managed in
the same way
Feature
Description
A Feature is a small, granular function or characteristic
expressed in client-valued terms as a satisfaction of a
requirement; for example: 'context-sensitive Help', or 'ability
to reverse-engineer VB.Net'.
Features are the primary requirements-gathering artifact of
the Feature-Driven Design (FDD) methodology. They
define the product feature that satisfies what a Requirement
element has formalized as a contractual, testable, expected
deliverable (for example: requirement - 'every element must
provide context-sensitive Help'; feature - 'every element
provides context-sensitive Help'). One Feature might realize
one or more Requirements, and one Requirement might be
realized by more than one Feature.
Features also have relationships with Use Cases. A Use
Case defines the interaction a user has with the system in
order to satisfy one or more Requirements. The Feature
identifies the facility that provides the means for that
interaction.
Feature elements are non-UML and are not related to the
UML elements of the same name, which are either
Toolbox icon
Internal Requirements
In Enterprise Architect, internal requirements are
requirements that are specific to one element. For example,
an internal requirement to enable the user to log in to the
system could be defined for the Login Use Case. This is a
requirement of the Use Case - an action it is responsible for
carrying out - and it applies only to this Use Case.
Internal requirements form the functional requirements of
the system to be built. The meaning of the requirement can
vary depending on which element is the host; for example, a
business process requirement might mean something
different to a Use Case requirement, which again might
mean something different to a Class requirement.
Internal Requirements are defined on the 'Requirements'
page of the Responsibility window. The significant
parameters (or, in Requirement Management terms,
attributes) are the Type, Status, Difficulty and Priority.
Whilst you can provide a detailed description of the
requirement in the 'Notes' field, there is more scope in the
name ('Requirement' field) to define the nature of the
responsibility. An additional field, 'Stability', indicates the
probability of the requirement changing; high stability
means a low probability of change.
The example Use Case also has connections to two external
Requirement elements, which are system functions that the
Use Case implements either in full or in part. You can
convert an internal requirement into an external
Requirement element.
You can also create internal requirements for an element
using an instance of the Responsibility window within the
element 'Properties' dialog. A requirement created in the
window displays in the 'Properties' dialog, and vice versa.
Access
On a diagram or in the Browser window, select an element
and:
Ste Action
p
Notes
· When an internal requirement is made into an external
Requirement element, the 'Stability' field and its value for
the internal requirement are translated into the Stability
Tagged Value in the external Requirement
Create Requirements
Requirement Analysts tend to work in a variety of ways,
some preferring to work with lists of elements as they would
in a spreadsheet, or with textual representations as in a word
processor document, or visually as in a drawing tool.
Enterprise Architect embraces this variation and provides
functionality for Requirement Analysts to work using their
preferred method for creating and editing requirements. This
can be in diagrams, in lists such as the Diagram List and
Package List, and in the Specification Manager. The
Specification Manager is a versatile and flexible textual tool
that simulates working in a word processor but that allows
you to edit names, descriptions and properties of a
requirement in a single interface.
Enterprise Architect also assists with creating Requirement
elements by allowing them to be dragged into the model
from external text documents or by importing them from
spreadsheets and other documents, and it can integrate with
large requirements management tools such as IBM Rational
Software Architect (formerly Telelogic) DOORS.
Browser window
· Dragging text from a text file onto a diagram, to generate
Notes
· The Requirement element name can be simply descriptive
text, with or without a manually-typed reference number;
however, as requirements often have to have a unique
reference for external checking, you can use the
Enterprise Architect auto-numbering facility to
automatically apply a numbering system with or without
prefixes and suffixes - set the element type to
Requirement
· Requirement elements can be displayed on a diagram with
or without an identifying 'E' in the top right corner; to
toggle display of this letter, select or deselect the 'Show
stereotype icon for requirements' checkbox on the
'Preferences' dialog, 'Objects' page
· Requirement elements can be color coded on a diagram to
indicate their status
Requirement Properties
Requirement properties differ slightly from the properties of
other elements; they include information related to the
difficulty and priority of the Requirement. The 'Notes' field
is also important, as it describes precisely what requirement
the element represents. Requirement naming requires
careful consideration and could reflect either a categorical
naming convention, or simply a loose English description of
the Requirement.
Access
On a diagram or in the Browser window, select a
Requirement element and:
Keyboard Alt+Enter
Shortcuts
Fields
(c) Sparx Systems 2022 Page 191 of 2309
Modeling Domains 3 February, 2022
Field Action
· Medium
· High
· Medium
· High
· Medium
· Difficult
Notes
· In Requirement Management tools and texts, the
(c) Sparx Systems 2022 Page 194 of 2309
Modeling Domains 3 February, 2022
Access
Ste Action
p
Connect Requirements
Aspects
Aspect Detail
· Specification Manager
· 'Requirements' tab of the target element
'Properties' dialog
· 'Links' tab of the Requirement element
'Properties' dialog
· Responsibility window
· Relationships Window
reports
· Standard document output
Manage Requirements
Requirements Management is the process of maintaining
requirements and ensuring they are traced, prioritized,
assigned to phases, iterations or sprints in a development life
cycle, and also ensuring those changes are communicated
effectively to stakeholders. Enterprise Architect has built-in
functionality that allows you to assign properties to each
requirement for management purposes, such as status,
priority, phase, difficulty and detailed notes. This
model-based approach to requirements management allows
the requirements to be traced to up-process elements such as
stakeholders and goals and to down-process elements such
as Use Cases and application components. Requirements
Managers can work in a variety of ways and Enterprise
Architect allows them the flexibility of viewing
requirements as visual elements in diagrams or in lists and
textual representations. The Specification Manager and list
views allow the requirements metadata to be visualized and
edited in a single interface. There is also a versatile chart
and graph facility where the requirements metadata such as
status and priority can be displayed in compelling charts and
graphs. For example, a Pie chart could be created showing
the percentage of elements with particular statuses.
Example
View Requirements
Use these windows and facilities to: locate and list
Requirement elements in the model; add, move and delete
the elements; display and edit the properties and
characteristics of individual elements; and generate reports
on Packages or specific elements.
· Project tab of the Browser window - shows the content
Facilities
Facility Detail
Case X, and
· Use Case X also realizes Requirement
B, and
· Requirement B in turn is also realized
by Use Case Y
Facilities
Facility Detail
comparison.
Report on Requirements
Enterprise Architect provides two report generation facilities
that help you to output document reports and web reports on
your model structure and components.
The document reporting facility is especially
comprehensive, and contains a number of features that
provide particular support to Requirements Management:
· A requirements report template that extracts details of
Pattern Method
ribbon option
The 'New Diagram' dialog displays.
1. Provide a name for the diagram and, in
the 'Type' field, click on the drop-down
arrow and select 'Management | Threat
Modeling'.
2. In the 'Select From' panel click on
'Threat Modeling Diagram' and in the
'Diagram Types' panel click on 'Trust
diagram'.
3. Click on the OK button.
The Diagram View displays ready to
populate with objects, and the 'Trust
Diagram' page opens in the Diagram
Toolbox (see the Trust Diagram Toolbox
Page section in this topic).
Threat Description
Icon Represents
Trust Diagram
A Trust diagram can serve different purposes, depending on
what you want to model and examine. Initially, the Trust
diagram might capture sections of a process and show how
those sections are locked in to each other or separate from
each other by enclosing the elements in Trust Boundaries.
You might then have a separate diagram to show what
threats to the system exist, what particular elements are open
to those threats, and what measures might be put in place to
mitigate the threats. This could be one diagram representing
all of the system under investigation, or several diagrams
each representing one segment or one threat type.
Example Diagrams
The Threat Model with multiple trust boundaries pattern in
the 'Create from Pattern' tab (Model Wizard) creates an
example of a Threat Model structure with Packages for
Trust diagram elements and identified threats. In addition, it
provides the concept for establishing traceability between
the identified threats and the Trust diagram elements that the
threat is associated with.
Derived from this pattern, the first figure shows several trust
boundaries differentiating between specific security
constraints.
Tool Description
Managing Rules
Broadly, modeling your business processes can clarify:
· Your business requirements (from which many business
Notes
· Business Rule Modeling is available in the Unified
Edition and the Ultimate Edition of Enterprise Architect
Process Summary
1. Use the 'Create from Pattern' tab (Model Wizard) to
generate a Business Rule Model in which to define the
business rules.
2. In the generated Business Rules diagram, begin to
identify the business rules as Business Rule elements,
each element representing a specific business rule.
3. In the generated Business Domain Model diagram, edit
the existing Classes - and create others - to represent the
Business Objects in the business domain or process; these
provide the business vocabulary as the context for the
business rules.
4. One of the Classes represents the actual application of the
rules; under this Class is a Rule Flow Activity and
Activity diagram, in which you create the Rule Tasks
under which the business rules are grouped, in the
Notes
(c) Sparx Systems 2022 Page 240 of 2309
Modeling Domains 3 February, 2022
· The business tasks or objects that the rules take effect on,
and
· The actual processing that takes place to apply the rules
Access
Use any of the methods outlined here to open the Model
Wizard (Start Page 'Create from Pattern' tab).
Keyboard Ctrl+Shift+M
Shortcuts
Ste Action
p
Example Diagram
This Business Rule Model diagram was generated at the top
level of the model and encapsulates the components of the
Business Rule model.
Notes
· Business Rule Modeling is available in the Unified
Edition and the Ultimate Edition of Enterprise Architect
· To see an example of a Business Rules model, open the
EAExample model provided with the installer, and
expand:
Ste Action
p
the diagram.
You will later define the parameters of the rules
using the Rule Composer.
Example
(c) Sparx Systems 2022 Page 250 of 2309
Modeling Domains 3 February, 2022
Notes
· Business Rule Modeling is available in the Unified
Edition and the Ultimate Edition of Enterprise Architect
Notes
· Business Rule Modeling is available in the Unified
Edition and the Ultimate Edition of Enterprise Architect
· When you create Classes in the Business Domain model,
select the correct language for code generation to ensure
that the correct data type is set for attributes and operation
parameters
· Business Rules code generation is supported for these
languages:
- C++
- C#
- Java
- VB.Net
Ste Action
p
2 Drag the 'Rule Task' icon from the Toolbox onto the
diagram and give the element, as a name, the title of
the task it represents, such as Calculate Debit Charge
or Determine Eligibility.
Create a Rule Task element for each task or action in
the process.
You can also use the Quick Linker arrow to create
the new elements and Control Flow connectors.
Example
This Rule Flow diagram is from the EAExample model Car
Rental example.
Notes
· Business Rule Modeling is available in the Unified
Edition and the Ultimate Edition of Enterprise Architect
· In a Rule Flow diagram, every Decision node has a
matching Merge node to ensure proper code generation
· For code generation, the Rule Task elements must be
grouped inside the appropriate Rule Flow Activity in the
Browser window (Business Rule elements can be defined
anywhere in the model, as they can be used in more than
one Rule Task)
Access
Ste Action
p
Example
In this hierarchy, the parameters m_rent and m_application
can be used by any of the Rule Tasks under the
ProcessApplication Rule Flow Activity.
Access
Ste Action
p
View Detail
be passed.
On code generation, the code for rules
logic is generated in the method body.
Notes
· Business Rule Modeling is available in the Unified
Edition and the Ultimate Edition of Enterprise Architect
Access
variables
· Rule Actions – to model action
variables
· Rule Bindings – to link the rule in the
rule table
· Expression
· Rule Bindings
· Rule Dependency
Notes
· Business Rule Modeling is available in the Unified
Edition and the Ultimate Edition of Enterprise Architect
· To assist with traceability as you complete the
relationships across the Rule Composer, selecting an entry
in one table automatically highlights the corresponding
rows and columns of the other tables; for example, if a
Rule Statement is selected, the related rule column in the
Decision Table and row in the Computation Rule table are
highlighted
Similarly, if a Computational Rule is selected, the
corresponding column in the Decision Table and row in
the Rule Statements list are highlighted
· If the table columns are not wide enough to display their
contents, you can drag the column header margins to
increase the width; all tables on the 'Decision Table' tab
and the 'Computation Rule' tab are linked, so if you
(c) Sparx Systems 2022 Page 269 of 2309
Modeling Domains 3 February, 2022
Access
Access
Ste Action
p
· >50
· False
dialog.
· You can add an operation as a Rule Condition
Access
Ste Action
p
Access
Bind rules
Ste Action
Example
· Rule 2 is 'A car must not be rented to a customer of age
less than 18'
· The first Rule Condition is Customer.age
· The 'Value1' field contains the value '< 18' against that
Rule Condition
Action
· The second Rule Action is Application.Status
Rule Action
You would select '2' in the 'Rule Bindings' field over the
'Value1/Result1' column, so that a when a customer's
application to rent a car is tested against rule 2, if the
customer is found to be under 18 they are automatically
classified as ineligible and the application rejected.
Access
Ste Action
p
Access
Validate Rules
Ste Detail
p
Access
Ste Action
p
Step Action
Example
This code snippet was generated from the Rental System
Class element in the EAExample model:
///////////////////////////////////////////////////////////
// RentalSystem.cs
// Implementation of the Class RentalSystem
// Generated by Enterprise Architect
// Created on: 26-July-2016 2:39:23 PM
///////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
public RentalSystem()
{
}
~RentalSystem()
{
}
public virtual void Dispose()
{
}
/* Begin - EA generated code for Activities and
Interactions */
public bool ProcessApplication(Rent
m_rent,Application m_application)
{
// behavior is an Activity
/*CAR MUST NOT BE RENTED TO
CUSTOMERS WITHOUT A VALID LICENSE
NUMBER*/
if(m_Customer.ValidLicenseNumber ==
"FALSE")
{
m_application.Status = "Reject";
m_Customer.Eligible = false;
}
/*CAR MUST NOT BE RENTED TO
CUSTOMERS OF AGE LESS THAN 18*/
if(m_Customer.age < 18)
{
m_application.Status = "Reject";
m_Customer.Eligible = false;
}
/*CAR MUST NOT BE RENTED TO
CUSTOMERS WITH BAD HISTORY LEVEL 3*/
if(m_Customer.BadHistoryLevel == 3)
{
m_application.Status = "Reject";
m_Customer.Eligible = false;
}
if (Customer.Eligible == true)
{
/*RENT FOR SMALL CARS IS 80 AUD PER
DAY*/
if(m_Car.type == Small)
{
m_rent.RentPerDay = 80;
}
/*RENT FOR AWD CARS IS 100 AUD PER
DAY*/
if(m_Car.type == AWD)
{
m_rent.RentPerDay = 100;
}
/*RENT FOR LUXURY CARS IS 150 AUD
PER DAY*/
if(m_Car.type == Luxury)
{
m_rent.RentPerDay = 150;
}
/*RENT PAYABLE IS CALCULATED AS
THE PRODUCT OF RENTPERDAY AND
RENTALPERIOD IN DAYS*/
m_rent.RentPayable = m_rent.RentPerDay *
m_rent.No_of_rent_days;
if (CustomerBadHistoryLevel > 0)
{
/*PENALTY OF 20 % OF RENT MUST
BE APPLIED FOR CUSTOMERS WITH BAD HISTORY
LEVEL 2*/
if(m_Customer.BadHistoryLevel == 2)
{
m_rent.PenaltyFee = m_rent.RentPayable
* 0.2;
}
//end RentalSystem
Notes
· Business Rule Modeling is available in the Unified
Edition and the Ultimate Edition of Enterprise Architect
Decision Models
Create Expressive Models of Juncture Points Using
Decision Tables
of the Help.
Access
Context On a diagram:
Menu · Right-click on Activity element |
Notes
· The Decision Tables facility is available in the Corporate,
Unified and Ultimate Editions of Enterprise Architect
Access
Context On a diagram:
Menu Right-click on Activity element | Simple
Decision Table | Decision Table or
Right-click on Action element | Simple
Decision Table | Decision Table
Task Action
· 'Completeness | Complete' or
'Incomplete'
If you do not want to display the
completeness, select the 'Completeness |
Clear' option.
· Delete Column
· Delete Column
Notes
· The Decision Tables facility is available in the Unified
and Ultimate Editions of Enterprise Architect
Ste Action
p
· Decision Table
· Decision Logic
· Decision Condition
· Decision Action
Notes
· Currently C++ is the only language implemented in the
EASL templates for Decision Table code generation
· You can use ActivityParameters to define method
parameters
· You can add Attributes to the Activity element to define
local variables
· The Decision Tables facility is available in the Unified
and Ultimate Editions of Enterprise Architect
Decision Tree
Represent and Analyze Decisions in a Tree Structure
Getting Started
Example Diagram
XSD Models
XSL Transforms
XML Validation
Example Diagram
Schema Composer
Access
Benefits
The Schema Composer:
· Operates on a Class model rather than an XML schema
profile
XSD documents
· Is most useful when operating on industry standard Class
· RDFS
· JSON
Notes
The Schema Composer is supported in the Corporate,
Unified and Ultimate Editions of Enterprise Architect
Schema Profiles
A Schema Composer profile comes in two forms. Each form
fulfills a particular system requirement - Schema generation
(xsd, rdfs, json) and sub model creation. When you create a
profile in the Schema Composer you choose which form to
use based on your needs. A single profile in the Schema
Composer can be used to either compose a schema, in its
common forms, or create a UML sub-model from a core
model.
Profile Types
Type Description
Generic
Where a standard does not meet your requirements, the
generic option provides a simpler choice for quick schema
composition from your UML model. Typically you will
model your own data library using UML Classes with
attributes, associations, Aggregation and Inheritance. You
can then use this model as the input to the Schema
Composer.
EA Script Engine
Enterprise Architect provides a scripting engine that
supports JavaScript, VBScript and JScript languages. The
scripting engine is also integrated with the Schema
Composer. When generating a schema, either for a
particular standard or generic scheme, a script can be
employed to perform the operation on its own or as a
supplement to the options provided by the standard.
EA Add-In
Enterprise Architect provides Add-In integration with the
Schema Composer. An Add-In can participate in the
generation of the sub model or schema by registering its
interest with Enterprise Architect. The Add-In can provide
Access
Option Action
Namespaces
When a new profile is created, you specify the target
namespace and the namespace prefix. Schemas typically
involve multiple namespaces and the Schema Composer
provides support for this within a single model. The scheme
by which namespaces are identified is the presence of two
specific properties on a Package. The properties are 'URI',
which specifies the namespace, and 'Alias', which provides
the namespace prefix. The properties can be present on the
immediate Package or a parent Package. When present,
elements of the Class will take that namespace. Where no
namespace exists, Classes will take the target namespace
specified when the profile was created.
created.
Notes
· The process of creating and generating schema for NIEM
has additional notes in the NIEM Help topic
· The Schema Composer is supported in the Corporate,
Unified and Ultimate Editions of Enterprise Architect
Schema Compositions
A schema composition refers to a restricted set of elements
taken from the model that together describe a unique entity
that has no equivalent in the model. Commonly, schema
compositions are used to generate schema files such as XSD
files. In contrast, model compositions are used to configure
the material as the basis of a subset 'transform' - for example
when creating a NIEM model subset.
Add Classes
Drag the required Class elements from the Browser window
into the 'Classes' panel. As you add a Class:
· Its ancestry is listed in the 'Inheritance' section in the
middle panel
· Its attributes are listed under the 'Inheritance' section, with
panel
Select Properties
Any time you select a Class in the 'Classes' list, its attributes
and model ancestry are listed in the 'Attributes' list. Select
the checkbox against each attribute to define the elements of
this type. When chosen, the attribute's type is added
automatically to the schema, appearing in the 'Classes' list
and the 'Schema' panel to the right.
Inheritance
If you favor or foresee a need for inheritance in the schema
you are preparing, it would make sense to begin the
composition with ancestors first, then re-use these as child
Classes are added. The method is not set in stone. You can
switch from an inheritance model to an aggregated
composition or vice-versa at any time. Here is a brief
description of the provision of inheritance in the Schema
Composer.
The Schema Composer offers flexibility in dealing with
inheritance. For example, you can choose to aggregate
selected attributes from the Class and its parent, while
choosing to inherit the grandparent. However, when you
choose to use inheritance, you choose to inherit the
restricted form of that type as well. When an ancestor is
selected in this list, the generated XML schema would show
an extension element identifying this ancestor. Only one
ancestor can be selected.
Redefined Types
One of the common issues with schema composition is the
requirement to be able to vary a type description to meet
various demands of the instances a schema describes. A
vehicle, for example, might be described by its brand, model
and price by an element of a Truck type, but by its year,
model and color by an element of a Sedan type. The issue is
that we might only have one actual Vehicle Class at our
disposal. To address this the Schema Composer allows you
to clone the Vehicle Class and give it another name. You can
then assign this version of Vehicle to any property that has
Vehicle as its type. The type created is only available within
the domain of the schema - the model is untouched.
To create a new definition of a type, select the Class first in
the 'Classes' list, then right-click on it and choose the
'Redefine Type' option. Enter a unique name for this type
and press the Enter key. You can then define or restrict this
type independently, the way you would for any Class.
Root elements
Property Restrictions
definition
Cardinality
The cardinality of a property can be further restricted from
its model counterpart, but it cannot be less restrictive. The
cardinality can be changed for any root element Class and
any Class property.
Type redefinition
When a Class is redefined within the Schema Composer it
creates a new type. The new type is a clone of the original,
but has a name that is unique to the schema. A Payment
enumeration type, for example, might be redefined as a
CardPayment to better suit the schema purpose. The new
type is a restriction of the original in that no new attributes
can be added to it. Other properties that share this type and
be similarly restricted by specifying the new type in their
restriction dialog. Redefined types such as sub types can be
offered as additional choice elements in the restriction of
other properties.
Specializations
Where specializations of a property's type are present, those
subtypes will be available in the 'Restriction' dialog. When
more than one specialization is selected, these will appear as
choice elements in the schema. When only one is chosen,
the property will exhibit this subtype in the schema.
Inline Elements
A property type will be emitted as an inline definition when
this box is checked.
By Reference
A property will take the 'By reference' form when emitted in
the schema. The 'By reference' form emits an inline
complexType that defines a single attribute named 'ref' of
type 'string'.
· minLength
· maxLength
· pattern
· enumeration
· whiteSpace
· maxInclusive
· maxExclusive
· minExclusive
· minInclusive
· totalDigits
· fractionDigits
- multipleof
- minimum
- maximum
- exclusiveMinimum
- exclusiveMaximum
· strings
- minLength
- maxLength
- pattern
· arrays
- minItems
- maxItems
- uniqueItems
Class Diagrams
The Schema Composer also supports the creation of simple
XSD and other formats from generic UML Classes. This is
particularly useful when there is a need to export a Class
definition in a generic manner for consumption by a script
or web based tool, for example.
Schema Analysis
Analysis on the go
The Schema Composer performs analysis of each type as it
is added to the schema, and whenever the Class is selected.
The System Output window will show how many, if any,
references exist for the type, the number of times it is
inherited and other helpful information. This illustration
shows a message detailing the elements that are referencing
the selected Class.
Validation on the go
The Schema Composer performs specific validation for a
technology should one be assigned. This image shows
warnings about missing Tagged Values for Classes in a
schema built on the UN/CEFACT Core Components
standard.
Generate Schema
Having designed a profile, at any stage, with a minimum of
definitions and customizations, you can quickly and easily
generate the schema or sub-model. Depending on the
technology chosen and the profile type (schema or
transform), the formats presented to you will vary. Note
multiple formats can often be generated at once. And, of
course, you can repeat the process easily, as the composition
evolves or after design changes to the model.
Access
Notes
· The Schema Composer is supported in the Corporate,
Unified and Ultimate Editions of Enterprise Architect
Access
Access
Schema Formats
Select the checkbox against each schema format to export.
Schema Details
Format
Generate
Click on this button to generate the schema.
Use a file browser to locate and open the schema files.
Notes
· You can edit and validate XML documents including
XSD schema, using Enterprise Architect
· You can set Enterprise Architect as the default document
handler for XML documents
Ste Action
p
Ste Action
p
Model Compositions
The model composition feature of the Schema Composer is
useful for creating a sub-model from a core model. This can
be as simple as generating a single business Package from a
core Package (CDT library to BDT library transform in
UN/CEFACT Core Components standard) or creating a
complete sub-model from a large core model.
The enormity of such a task can be daunting and error
prone; ensuring every type that is referenced by the
sub-model is included by the sub-model, for example. The
Schema Composer addresses this problem by automatically
working out the dependencies and adding them to the
schema for you where necessary.
Create Transform
Reference checking
When a property is excluded that was previously included in
the schema and is no longer referenced, the property type is
not automatically removed. However, the Schema
Composer will always show the number of references for a
type if you select it in the Class window. Types that show
no references at all can easily be removed.
Summary
Access
Access
Model Transform
Select the model transform(s) to run.
Transform Description
Option
by the profile.
When you click on the OK button, you
will be prompted to select the target
Package for creation of the subset. The
<<Namespace>> Packages that make up
the subset will then be created at this
location. If any of the subset Packages
already exist at this location, their content
will be added to. All subset Packages will
have the 'defaultPurpose' Tagged Value
set to 'subset'.
Generate
Click on the OK button to generate the schema. When the
generation is complete, the message Export of profile
<name> completed displays.
You can then expand the Package in the Browser window to
see the generated UML model.
Notes
Common Libraries
Libraries shared by both versions of the UML Profile for
Core Components.
Library Description
UPCC Libraries
The UML Profile for Core Components is available in two
versions, NDR 3.0 and NDR 2.1. Both profiles describe a
NDR 3.0
Library Description
NDR 2.1
Library Description
UPCC Diagrams
The UML profile for Core Components uses UML Class
diagrams for composition of components. There are
however specific toolboxes provided by the technology for
each of its libraries.
Common
In this notation, UPPCx represents the UPCC profile and x
is the version of the NDR
Common Description
UPCCx -
CCLibrary
Abstract
Syntax
UPCCx -
DOCLibrary
Abstract
Syntax
UPCCx -
CDTLibrary
Abstract
Syntax
UPCCx -
BIELibrary
Abstract
Syntax
NDR 3.0
Library Description
Syntax
UPCC -
BDTLibrary
Abstract
Syntax
NDR 2.1
Library Description
Syntax
UPCC -
UDTLibrary
Abstract
Syntax
UPCC -
QDTLibrary
Abstract
Syntax
Available Frameworks
Using the Enterprise Architect Model Wizard (Start Page
'Create from Pattern' tab) you can deploy any of the
frameworks supported by the Schema Composer - such as
NIEM, CIM and CCTS - to your model in minutes,
providing a multi-featured UML medium for modeling in
those technologies.
The frameworks are also available directly from the Sparx
Systems Reusable Asset Service (via the Cloud Server
'Cloud Connection' dialog and then 'Frameworks' on the
Model Wizard).
Note: In addition to the custom frameworks such as CIM
and NIEM, it is possible to use standard Class models to
rapidly build generic Schemas, so if you are not targeting a
particular meta-model, it might be simplest to model your
data in UML and use the resultant model as input to the
Schema Composer.
Model Wizard
Access
Keyboard Ctrl+Shift+M
Shortcuts
Note
You can limit the MDG Technologies to use by selecting the
ribbon option: 'Specialize > Technologies > Manage-Tech'.
Here you can see which technologies are currently enabled.
Import Model
Ste Action
Access
Import Model
Ste Action
p
Schema
· Common Information Model (CIM) specific RDFS XML
Access
Option Action
· RDFS XML
Schema in
Schema
Composer
Notes
· The progress of import will be displayed in the System
Output window
· The Schema Composer will validate the Schema against
the elements in the Reference Package before importing
the Schema; if validation fails, the Schema elements that
fail validation will be displayed in the System Output
window and the import process will stop
· Double-click on a validation error entry in the System
Output Window to open the Schema in Enterprise
Architect's internal file editor and go to the source of the
error
· If validation succeeds, the 'New Schema Definition'
dialog displays, through which you can save the imported
Profile in the file system or as an Artifact in the current
model
language
· Provide custom model transformation using a scripting
language
· Provide custom stereotype mapping to any standard
/*
(c) Sparx Systems 2022 Page 396 of 2309
Modeling Domains 3 February, 2022
}
else
{
var sPropDesc = xmlProp.Name;
sPropDesc += "::"
if(xmlProp.IsPrimitive())
sPropDesc +=
xmlProp.PrimitiveType;
else
sPropDesc += xmlProp.TypeName;
if(xmlProp.IsByReference())
{
sPropDesc += "(by reference)";
}
if(xmlProp.IsInline())
{
sPropDesc += "(inline)";
}
Session.Output(" " + sPropDesc + ",
cardinality: " + xmlProp.Cardinality);
xmlChoiceEnum1 = xmlProp.Choices;
xmlChoiceEnum2 =
xmlProp.SchemaChoices;
}
}
}
function main()
{
var schema as EA.SchemaComposer;
var xmlType as EA.SchemaType;
var xmlTypeEnum as EA.SchemaTypeEnum;
var xmlNamespaceEnum as
EA.SchemaNamespaceEnum;
var xmlNS as EA.SchemaNamespace;
// Get SchemaComposer
schema = Repository.SchemaComposer;
xmlNS = xmlNamespaceEnum.GetNext();
}
}
// Get Schema Types Enumerator
xmlTypeEnum = schema.SchemaTypes;
xmlType = xmlTypeEnum.GetFirst();
while(xmlType)
{
var xmlns = schema.GetNamespacePrefixForType( xmlType.TypeID );
uri = schema.GetNamespaceForPrefix(xmlns);
printType(xmlType, xmlns, uri);
xmlType = xmlTypeEnum.GetNext();
}
}
main();
function TranslateStereotype(srcStereo)
{
var destStereo = srcStereo
if (srcStereo == "BDT")
{
destStereo = "My_BDT"
}
return destStereo;
}
XSD Models
XML Schema Definition (XSD), also known as XML
Schema, is a World Wide Web Consortium (W3C) XML
technology that is used to specify the rules to which an
XML document must adhere. XSD support is critical for the
development of a complete Service Oriented Architecture
(SOA), and the coupling of UML 2.5 and XML provides the
natural mechanism for specifying, constructing and
deploying XML-based SOA artifacts within an organization.
The UML Profile for XSD specifies a set of stereotypes,
Tagged Values and constraints that can be applied to the
UML model in order to change specific aspects of the
resulting schema. Enterprise Architect provides native
support for the XSD Profile through the XML Schema page
of the Diagram Toolbox. The XSD Profile supported by
Enterprise Architect is an adaptation of the profile defined
in the publication Modeling XML Applications with UML.
Working with the XSD Profile through Enterprise Architect,
you can rapidly model, forward engineer and reverse
engineer XML Schema.
You can also quickly define and generate XSD and other
schema using the Enterprise Architect Schema Composer.
Modeling XSD
You can model XML schemas at two levels, using UML
Class diagrams that:
· Have no XML schema-specific implementation details, to
Ste Action
p
icons, or
· Create a tailored XML Schema diagram using the
Notes
· The UML attributes of the Classes map directly to XML
elements or attributes
· If you have modeled your XSD Schema as a straight Class
diagram, you can define and generate schema from it
using the Schema Composer
· Classes in an XML Schema model have no methods since
XSD Diagrams
This example diagram shows a Class diagram containing
XSD-specific elements created using the 'XSD Schema'
pages of the Diagram Toolbox. The diagram models an
employee records system.
Schema Package
An «XSDschema» stereotyped Package acts as a container
for the XSD constructs, from which XML Schema can be
generated. All Classes in the Package are defined within one
schema; the Schema element provides the default
schema-wide settings. You can create an «XSDschema»
Package by dragging the Schema icon from the XML
Schema Toolbox and dropping it directly onto a diagram.
Toolbox Icon
Access
To display the XSD schema 'Properties' dialog for the
selected «XSDschema» stereotyped Package, use one of the
methods outlined here:
Define Properties
Field/Button Action
Namespace
· OK - Click on this button to save the
Notes
· The default schema-wide settings are defined by Tagged
Values, which you can review on the 'Tags' tab of the
schema element 'Properties' dialog, or the Properties
window for the element; you can edit the schema-wide
settings if you need to, or provide element-specific
overrides in the properties and Tagged Values of the
individual XSD construct elements
Global Element
An «XSDtopLevelElement» stereotyped Class acts as a
XSD global element. You can create it by dragging the
'Element' icon from the XML Schema Toolbox and dropping
it directly onto a diagram.
Toolbox Icon
Access
To display the 'XSD element Properties' dialog for the
selected «XSDtopLevelElement» stereotyped Class, use one
of the methods outlined here.
Keyboard Alt+Enter
Shortcuts
«XSDtopLevelElement» stereotyped
Class, or
Drag icon from toolbox
onto diagram (this creates a new
«XSDtopLevelElement» stereotyped
Class)
Define Properties
Field/Button Action
Type Either:
· Type the name of a data type, or
topic.
Notes
· The fields 'Type', 'Nested complexType' and 'Nested
simpleType' are mutually exclusive; selecting one
disables the others
· The fields 'Nested complexType' and 'Nested simpleType'
are available in the dialog only when creating a new
global element (and not when editing the global element)
· A Global element:
- Cannot contain any UML attributes
- Cannot be the source of an Association connector
- Can be the target of an Association connector from a
Complex Type Class or Group Class element
- Cannot be the target of a Generalization connector
- Can be the source of one Generalization connector to
a Complex Type Class or Simple Type Class
Local Element
A Local element is an «XSDelement» stereotyped UML
attribute that acts as a local XSD element. You can create it
by dragging the 'Element' icon from the XML Schema
Toolbox and dropping it onto an «XSDcomplexType» or
«XSDgroup» stereotyped Class.
Toolbox Icon
Access
To display the 'XSD element Properties' dialog for the
selected «XSDelement» stereotyped UML attribute, use one
of the methods outlined here.
Define Properties
Field/Button Action
Type Either:
· Type the name of a data type, or
element
topic.
Notes
· Only «Complex Type», «Group» and «Model Group»
stereotyped elements can have this UML Attribute
Global Attribute
A Global Attribute is an «XSDtopLevelAttribute»
stereotyped Class. You can create it by dragging the
'Attribute' icon from the XML Schema Toolbox and
dropping it directly onto a diagram.
Access
To display the 'XSD attribute Properties' dialog for the
selected «XSDtopLevelAttribute» stereotyped element, use
one of the methods outlined here.
Keyboard Alt+Enter
Shortcuts
Other Double-click on
«XSDtopLevelAttribute» stereotyped
Class, or
Drag icon from toolbox
and drop directly onto the diagram (this
creates a new «XSDtopLevelAttribute»
stereotyped Class)
Toolbox Icon
Define Properties
Field/Button Action
Type Either:
· Type the name of a data type, or
Notes
· The field 'Nested simpleType' is available in the dialog
only when creating a new global attribute (and not when
editing the global attribute)
· The fields 'Type' and 'Nested simpleType' are mutually
exclusive; selecting one disables the other
· A Global attribute:
- Cannot contain any UML attributes
- Cannot be the source of an Association connector
- Can be the target of an Association connector from a
Local Attribute
A local attribute is an «XSDattribute» stereotyped UML
attribute. You can create it by dragging the 'Attribute' icon
from the XML Schema Toolbox and dropping it onto an
«XSDcomplexType» or «XSDattributeGroup» stereotyped
Class.
Toolbox Icon
Access
To display the 'XSD attribute Properties' dialog for the
selected «XSDattribute» stereotyped UML attribute, use one
of the methods outlined here.
Define Properties
Field/Button Action
Type Either:
attribute
· unqualified - Do not qualify this
attribute
Notes
Attribute Group
An Attribute Group Class is used to group a set of
«XSDattribute» stereotyped UML attributes and Simple
Type Classes that can be referenced from an
«XSDcomplexType» stereotyped Class. You can create it by
dragging the 'Attribute Group' icon from the XML Schema
Toolbox and dropping it directly onto a diagram.
Toolbox Icon
Access
To display the 'XSD Attribute Group Properties' dialog for
the selected «XSDattributeGroup» stereotyped Class, use
one of the methods outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Field/Button Action
Notes
· An Attribute Group element:
- Cannot be the child of any other XSD Class
- Can contain only «XSDattribute» stereotyped UML
attributes and Simple Type Classes
- Can be the source of an Association connector to
another Attribute Group
- Can be the target of an Association connector from a
Complex Type Class
- Cannot be the source or target of a Generalization
connector
Complex Type
An «XSDcomplexType» stereotype is applied to a generic
UML Class, to tailor the generation of a complexType
definition in the Schema. You can create an
«XSDcomplexType» stereotyped Class by dragging the
Complex Type icon from the XML Schema Toolbox and
dropping it directly onto a diagram.
Toolbox Icon
Access
To display the 'XSD complexType Properties' dialog for the
selected «XSDcomplexType» stereotyped Class, use one of
the methods outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Field/Button Action
can occur
· 'all' - the child elements can occur in
any order
Notes
· A complexType can:
- Contain both XSDelement and XSDattribute
stereotyped UML attributes
- Contain other complexTypes as child elements
- Be a child of a Global Element
- Be the source of Association connectors to other
complexTypes, Simple Types, Attribute Groups, Groups
and Model Groups
- Be the source of a maximum of one Generalization
connector to either another complexType or a Simple
(c) Sparx Systems 2022 Page 443 of 2309
Modeling Domains 3 February, 2022
Type Class
Simple Type
An «XSDsimpleType» stereotype is applied to a generic
UML Class, to tailor the generation of a simpleType
definition in the Schema. You can create an
«XSDsimpleType» Class by dragging the Simple Type icon
from the XML Schema Toolbox and dropping it directly
onto a diagram.
Toolbox Icon
Access
To display the 'XSD simpleType Properties' dialog for the
selected «XSDsimpleType» stereotyped Class, use one of
the methods outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Field/Button Action
Type Either:
· Type the name of a data type, or
selected Type.
The various restrictions (facets) on the
simpleType are available as Tagged
Values on this Class.
Notes
· A simpleType:
· Cannot contain any «XSDelement» or «XSDattribute»
stereotyped UML attributes
· Cannot contain any child Classes
· Cannot be the source of an Association connector
· Can be the target of a Generalization connector
· Can have at the most one Generalization connector to
another simpleType Class
Group
The Group Class is used to group a set of «XSDelement»
stereotyped UML attributes, Complex Type Classes and
Simple Type Classes that can be referenced from an
«XSDcomplexType» Class. You can create this type of
element by dragging the Group icon from the XML Schema
Toolbox and dropping it directly onto a diagram.
Toolbox Icon
Access
To display the 'XSD group Properties' dialog for the selected
«XSDgroup» stereotyped Class, use one of the methods
outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Field/Button Action
Notes
· A Group element can:
· Contain only «XSDelement» stereotyped UML attributes
Any
An «XSDany» stereotyped Class allows a Complex Type
Class to contain elements that are not specified in the
Schema Package. You can create it by dragging the Any
icon from the XML Schema Toolbox and dropping it
directly onto a diagram.
Toolbox Icon
Access
To display the 'XSD any Properties' dialog for the selected
«XSDany» stereotyped Class, use one of the methods
outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Field/Button Action
Notes
· An Any Class:
· Cannot contain any UML Attributes or child XSD Classes
· Cannot be the child of any XSD Class
· Cannot be the target of a Generalization connector
· Cannot be the source of an Association or Generalization
connector
· Can be the target of Association connectors from
Complex Types, Groups and Model Groups
· Must be the target of at least one incoming Association
connector
Any Attribute
The «XSDany» stereotyped UML attribute allows a
Complex Type element or an Attribute Group element to
contain attributes that are not specified in the Schema
Package. You can create it by dragging the 'Any Attribute'
icon from the XML Schema Toolbox and dropping it onto
an «XSDcomplexType» or «XSDattributeGroup»
stereotyped Class.
Toolbox Icon
Access
To display the 'XSD anyAttribute Properties' dialog for the
selected «XSDany» stereotyped UML attribute, use one of
the methods outlined here.
Define Properties
Field/Button Action
elements.
Notes
· Only Complex Type and Attribute Group elements can
have this UML attribute
Union
A Union Class is a Simple Type element that defines a
collection of Simple Types. You can create it by dragging
the Union icon from the XML Schema Toolbox and
dropping it directly on a diagram.
Toolbox Icon
Access
To display the 'XSD union Properties' dialog for the selected
«XSDunion» stereotyped Class, use one of the methods
outlined here.
Keyboard Alt+Enter
Shortcuts
stereotyped Class, or
Drag icon from toolbox
onto diagram (this creates a new
«XSDunion» stereotyped Class)
Define Properties
Field/Button Action
Notes
· When you click on the Close button on the XSD union
'Properties' dialog, a Generalization connector is added to
the diagram from the XSD Union element to each of the
member elements on the same diagram; any elements not
on the same diagram are listed in the top right corner of
the XSD Union element
Model Group
You can create an «XSDsequence», «XSDchoice» or
«XSDall» stereotyped Class by dragging the Model Group
icon from the XML Schema Toolbox and dropping it
directly onto a diagram.
An «XSDsequence» model group (the default model group
type) is a container for the attributes and associations owned
by the Class. The model group is in turn added to the model
groups of the Class's respective owners. Tagged Values
specified by owners of the Class persist through to the child
elements of the model group; if memberNames are
unqualified for a complexType, so are the children of this
model group when added to that complexType.
Toolbox Icon
Access
To display the 'XSD Model Group Properties' dialog for the
selected «XSDsequence», «XSDchoice» or «XSDall»
stereotyped Class, use one of the methods outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Field/Button Action
Notes
· A Model Group:
Enumeration
An Enumeration defines a list of acceptable values for the
Class. You can create an Enumeration element by dragging
the Enum icon from the XML Schema Toolbox and
dropping it directly onto a diagram.
Toolbox Icon
Access
To display the 'XSD enumeration Properties' dialog for the
selected «enumeration» stereotyped element, use one of the
methods outlined here.
Keyboard Alt+Enter
Shortcuts
stereotyped element, or
Drag icon from toolbox and drop
directly onto the diagram (this creates a
new «enumeration» stereotyped element)
Define Properties
Field/Button Action
Type Either:
· Type the name of a data type, or
Notes
· An Enumeration:
· Cannot contain any «XSDelement» or «XSDattribute»
stereotyped UML attributes
· Cannot contain any child Classes
· Cannot be the source of an Association connector
· Can be the target of a Generalization connector
· Can have at most one Generalization connector to a
Simple Type Class
Example
Structure Detail
<?xml version="1.0"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XM
LSchema">
<xs:simpleType name="Status">
<xs:restriction base="xs:string">
<xs:enumeration value="Full-Time"/>
<xs:enumeration value="Part-Time"/>
<xs:enumeration value="Casual"/>
<xs:enumeration value="Contract"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="Person"
type="Person"/>
<xs:complexType name="Person">
<xs:sequence>
<xs:element name="firstName"
type="xs:string"/>
<xs:element name="surName"
type="xs:string"/>
<xs:element name="birthDate"
type="xs:string"/>
<xs:element name="gender"
type="xs:string"/>
<xs:element name="contactDetails"
type="ContactInfo"/>
</xs:sequence>
</xs:complexType>
<xs:element name="Employee"
type="Employee"/>
<xs:complexType name="Employee">
<xs:complexContent>
<xs:extension base="Person">
<xs:sequence>
<xs:element name="status"
type="Status"/>
<xs:element name="jobTitle"
type="xs:string"/>
<xs:element name="startDate"
type="xs:date"/>
<xs:element name="department"
type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="EmployeeRecords"
type="EmployeeRecords"/>
<xs:complexType
name="EmployeeRecords">
<xs:sequence>
<xs:element name="Employee"
type="Employee" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:element name="ContactInfo"
type="ContactInfo"/>
<xs:complexType name="ContactInfo">
<xs:sequence>
<xs:element name="homePhone"
type="xs:string"/>
<xs:element name="mobilePhone"
type="xs:string"/>
<xs:element name="officePhone"
type="xs:string"/>
<xs:element name="email"
type="xs:string"/>
<xs:element name="streetAddress"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Constructs
targetNamespaces differ
Notes
· If left unspecified, the minOccurs and maxOccurs
(c) Sparx Systems 2022 Page 482 of 2309
Modeling Domains 3 February, 2022
attributes default to 1
· If the direction of the Association is unspecified, the
owner is assumed to be the source
Generate XSD
When you have developed your XML Schema model, either
as an abstract Class model or a tailored XSD Class model,
you can forward-engineer it into W3C XML Schema (XSD)
files using the Generate XML Schema feature. As an XML
Schema corresponds to a UML Package in Enterprise
Architect, XML Schema generation is a Package-level
operation.
You define the location of the file into which the XML
Schema is to be generated, in the Schema Package element
in your model.
Access
Option Action
Encoding Either:
Example
You can change the specified default behavior by
de-selecting the 'Generate global element for all global
ComplexTypes' checkbox on the 'Generate XML Schema'
dialog. Then, the generated XSD no longer contains the
global element; that is, it no longer has the lines:
· <xs:element name="ContactInfo" type="ContactInfo"/>
and
· <xs:element name="Person" type="Person"/>
Import XSD
To reverse engineer a W3C XML Schema (XSD) file to
create or overwrite a Package of your UML Class model,
you can use the XML Schema Import facility.
Access
Option Action
· UML attributes
Notes
Notes
· Enterprise Architect treats these two definitions as
separate entities irrespective of whether the 'Import global
elements with "Type" postfix' checkbox is selected or
unselected:
<xs:element name="HomeAddress"
type="AddressType"/>
<xs:complexType name="AddressType">
<xs:sequence/>
</xs:complexType>
XSL Transforms
Model, Author and Execute XSLT Transforms and
Stylesheets with XML Documents
transformations
· Specialized editor for Stylesheet authoring, debugging
and execution.
· XML document validation
Ste Action
p
Artifact Description
diagram.
Activity element
· XSLT Stylesheet file element and the
7 (Optional.)
· If you want to capture the output in a file, locate
Ste Action
p
Ste Action
p
highlighted.
Across the top of the view is a debugger toolbar,
providing the normal debugging options to Start,
Pause, Step Over, Step In, Step Out and Stop the
debugging process. The final icon in the toolbar
provides the option of hiding or showing the '.xml
source' tab in the view. You can use these buttons to
repeat and control the debugging process.
The System Output window also displays, showing
the debugger progress messages on the 'XSLT
Transformation' tab. (Press Alt+1 and select 'System
Output' if the System Output window does not
display.)
Error messages are directed to the Debug window
(press Alt+8). You can also use the Debug window
toolbar buttons and options to control debugging of
the XSL Transformation.
XML Validation
Enterprise Architect provides validation of XML
documents. Documents can be verified against XML
schema or Data Type Definitions (DTD). Validation is
performed from within an Enterprise Architect editor using
its context menu. Often an XML document will contain
information relating to the schema that it conforms to. You
can, however, choose to override this, validating the
document against any schema, either at a path on your local
machine or at a URL. This example demonstrates the use of
the feature for a document that contains an incorrect
attribute.
Access
Ste Action
p
· c:\mydomain\myschema.xsd
WSDL
Web Services Description Language 1.1 (WSDL) is a key
XML-based, World Wide Web Consortium (W3C) language
for describing web services. WSDL support is critical for
the development of a complete Service Oriented
Architecture (SOA), and the coupling of UML 2.5 and XML
provides the natural mechanism for specifying, constructing
and deploying XML-based SOA artifacts within an
organization.
Using Enterprise Architect, you can rapidly model, forward
engineer and reverse engineer WSDL files.
WSDL Description
Element Type
Example
This figure shows an example WSDL namespace,
Notes
Model WSDL
You can quickly and easily model the elements in a Web
Service Definition using the WSDL page of the Diagram
Toolbox. As a first step, you can create an example WSDL
Package structure in the Browser window, using the
Namespace icon from the WSDL page. You can use this
example Package structure as a template for developing
your WSDL.
Ste Action
p
WSDL structure.
WSDL Namespace
A «WSDLnamespace» stereotyped Package represents the
top-level container for the WSDL constructs in Enterprise
Architect. You can create the Namespace Package by
dragging the Namespace icon from the WSDL Toolbox
page and dropping it directly onto a diagram.
Toolbox Icon
Access
To display the 'WSDL Namepace Properties' dialog for the
selected «WSDLnamespace» stereotyped Package, use one
of the methods outlined here.
Define Properties
Option Action
WSDL Message
A «WSDLmessage» stereotyped Class represents a WSDL
Message and acts as a container for one or more WSDL
Message Parts. You can create WSDL Messages by
dragging the Message icon from the WSDL Toolbox and
dropping it directly onto the Messages diagram (under the
Messages Package in the WSDL Package structure).
Toolbox Icon
Access
To display the 'WSDL Message' dialog for the selected
«WSDLmessage» stereotyped Class, use one of the methods
outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Option Action
Notes
· WSDL Messages can only be created under the Messages
Package in the WSDL Package structure
· The name of the WSDL Message should be unique
amongst all WSDL Messages within the WSDL
Toolbox Icon
Access
To display the 'WSDL Message Part' dialog for the selected
Message Part, use one of the methods outlined here.
Define Properties
Option Action
Part attribute.
Type Either:
· Type the name of a data type, or
Package Structure or
· Any other Package in the model
Notes
· WSDLmessage stereotyped Classes can effectively
contain Message Part attributes only; if you add other
attributes to the Class element, they are re-cast as
Message Parts
Toolbox Icon
Access
To display the 'WSDL PortType' dialog for the selected
«WSDLportType» stereotyped Interface, use one of the
methods outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Option Action
Notes
· WSDL PortTypes can only be created under the
PortTypes Package in the WSDL Package structure
· The name of the WSDL PortType should be unique
amongst all the WSDL PortTypes within the WSDL
Toolbox Icon
Access
To display the 'WSDL PortType Operation' dialog for the
selected PortType Operation, use one of the methods
outlined here.
Operations
Define Properties
Option Action
· Request-Response
· Solicit-Response
· Notification
Notes
· WSDL PortType Operations can only be contained by
WSDL PortTypes
· The name provided for an Input, Output or Fault Message
in a PortType Operation must be unique amongst the
Input, Output and Fault Messages, respectively, across the
WSDL PortType
· In the UML operation 'Properties' dialog, the Messages
identified as Input, Output and Fault can be examined as
the parameters of the operation
WSDL Binding
A WSDL Binding element implements the operations
specified by a particular «WSDLportType» stereotyped
Interface and describes the message format and protocol
details for the operations and messages defined by this
WSDL PortType. A WSDL Binding element is represented
by a «WSDLbinding» stereotyped Class.
You create a WSDL Binding element by dragging the
Binding icon from the WSDL Toolbox directly onto the
Bindings diagram under the Bindings Package in the WSDL
Package structure.
Toolbox Icon
Access
To display the 'WSDL Binding' dialog for the selected
«WSDLbinding» stereotyped Class, use one of the methods
outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Option Action
· HTTP
· POST
Notes
· A WSDL Binding must implement a WSDL PortType;
therefore, WSDL PortTypes should be defined before you
create WSDL Bindings
· WSDL Bindings can only be created under the Bindings
Package in the WSDL Package structure
Access
To display the 'WSDL Binding Operation Details' dialog for
the selected Binding Operation, use one of the methods
outlined here.
Define Properties
Option Action
SOAP/HTTP Header
· Documentation - (Optional) Type in
any notes you need for this message
· OK - Click on this button to save the
data entered and close the 'WSDL
Binding Parameter Details' dialog
· Cancel - Click on this button to discard
the data entered and close the 'WSDL
Binding Parameter Details' dialog
· Help - Click on this button to display
this Help topic
element.
Notes
· If you subsequently change the WSDL Port Type
operations, you can refresh the Binding Operations by
deleting the Realization connector and re-establishing it;
the 'Overrides & Implementations' dialog displays, on
which you select the updated operations to establish
· You can review the parameters of a Binding Operation by
highlighting the operation in the diagram or Browser
window and expanding the entries in the Properties
window
WSDL Service
A WSDL Service is represented by a «WSDLservice»
stereotyped Interface; it describes a collection of Ports that
expose a particular Binding. You can create a WSDL
Service element by dragging the Service icon from the
WSDL Toolbox and dropping it directly onto a diagram in
the Services Package of your WSDL model.
When you save a newly-created «WSDLservice»
stereotyped Interface, the system:
1. Adds the WSDL Binding elements exposed by the WSDL
Service to the Service diagram.
2. Draws an Association connector from the Service element
to each Binding element.
3. Labels each connector with the corresponding Port name.
Toolbox Icon
Access
To display the 'WSDL Service' dialog for the selected
«WSDLservice» stereotyped Interface, use one of the
methods outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Option Action
Port
· Binding - Click on the drop-down
Port
· Documentation - (Optional) Type in
Notes
· WSDL Services can only be created under the Service
Package in the WSDL Package structure
· The name of the WSDL Service should be unique
amongst all the WSDL Services within the WSDL
WSDL Document
A WSDL Document encapsulates a Web Service defined
within the «WSDLnamespace» stereotyped Package, and is
the source from which the WSDL file is generated. It is
represented by a «WSDL» stereotyped Component element
as a direct child element of the «WSDLnamespace»
stereotyped Package. You can have multiple WSDL
Documents under a single WSDL Namespace, to reuse and
expose the WSDL Services for that namespace across
multiple WSDLs.
One «WSDL» stereotyped Component element is
automatically created when you create the Namespace
Package structure. You can add further WSDL elements by
dragging the WSDL icon from the WSDL Toolbox and
dropping it directly onto the namespace Overview diagram.
Toolbox Icon
Access
To display the 'WSDL Document Properties' dialog for the
selected «WSDL» stereotyped Component, use one of the
methods outlined here.
Keyboard Alt+Enter
Shortcuts
Define Properties
Option Action
File Name Type the file path into which the WSDL
1.1 file is to be generated.
Namespace
· OK - Click on this button to save the
Generate WSDL
If you have developed a WSDL model in UML, you can
forward-engineer it into WSDL 1.1 files using the Generate
WSDL feature. This feature acts on either a
«WSDLnamespace» stereotyped Package or a «WSDL»
stereotyped Component (Document), and generates any or
all of the WSDL Components owned by the target
«WSDLnamespace» structure.
Access
Option Action
Encoding Either:
· Click on the drop-down arrow and
use Ctrl+click
· Select a range use Shift+click
stereotyped Components.
A message displays when the generation
is complete; click on the OK button on
the message to close it.
Field/Button Description
Namespace.
Notes
· You can also generate WSDL files through the
Automation Interface
Import WSDL
If you have WSDL 1.1 files external to Enterprise Architect
that you want to reverse engineer into UML Class models,
you can import them into the system using the WSDL
Import facility.
Access
Browser window | Click on root Package to contain
imported file, then:
Option Action
Notes
· Enterprise Architect cannot import a WSDL file that
references WSDL constructs existing outside that file; if
there are referenced constructs in other files, combine all
files into a single file and import that combined file
SoaML
Service oriented architecture Modeling Language (SoaML)
is a standard method of designing and modeling SOA
solutions using the Unified Modeling Language (UML).
This text is derived from Service oriented architecture
Modeling Language (SoaML) - Specification for the UML
Profile and Metamodel for Services (UPMS) (OMG
document ad/2008-11-01); pp. 25-26:
"A service is an offer of value to another through a
well-defined interface and available to a community (which
may be the general public). A service results in work
provided to one by another."
"Service Oriented Architecture (SOA) is a way of
organizing and understanding (representations of)
organizations, communities and systems to maximize
agility, scale and interoperability. The SOA approach is
simple - people, organizations and systems provide services
to each other. These services allow us to get something done
without doing it ourselves or even without knowing how to
do it - enabling us to be more efficient and agile. Services
also enable us to offer our capabilities to others in exchange
for some value - thus establishing a community, process or
marketplace. The SOA paradigm works equally well for
integrating existing capabilities as for creating and
integrating new capabilities."
"SOA ... is an architectural paradigm for defining how
people, organizations and systems provide and use services
Notes
Access
Toolbox Pages
SoaML Component Diagram Toolbox
SOMF 2.1
The Service-Oriented Modeling Framework (SOMF) is a
service-oriented development life cycle methodology,
offering a number of modeling practices and disciplines that
contribute to successful service-oriented life cycle
management and modeling. This text is derived from the
extensive Wikipedia entry on Service Oriented Modeling:
'The Service-Oriented Modeling Framework (SOMF) has
been proposed by author Michael Bell as a holistic and
anthropomorphic modeling language for software
development that employs disciplines and a universal
language to provide tactical and strategic solutions to
enterprise problems. The term "holistic language" pertains
to a modeling language that can be employed to design any
application, business and technological environment, either
local or distributed. This universality may include design of
application-level and enterprise-level solutions, including
SOA landscapes or Cloud Computing environments. The
term "anthropomorphic", on the other hand, affiliates the
SOMF language with intuitiveness of implementation and
simplicity of usage.'
'SOMF ... illustrates the major elements that identify the
“what to do” aspects of a service development scheme.
These are the modeling pillars that will enable practitioners
to craft an effective project plan and to identify the
milestones of a service-oriented initiative—either a small or
large-scale business or a technological venture.'
Diagram' dialog:
- Conceptual
- Analysis
- Cloud Computing
- Logical Design Relationship
- Logical Design Composition
- Business Integration
- Conceptual Architecture
- Asset Utilization
- Transaction
- Transaction Directory
- Reference Architecture
· SOMF pages in the Toolbox - Enterprise Architect
NIEM Diagrams
You can also create all of the appropriate diagrams from the
Ste Action
p
information models
· Import NIEM Reference Schema into your model
Access
Use any of the methods outlined here to display the Diagram
Toolbox, then click on to display the 'Find Toolbox Item'
dialog and specify 'NIEM 3.0 MPD' (or 'PIM' or 'PSM').
The Diagram Toolbox that corresponds to a particular
diagram type becomes active whenever you open a diagram
of that type. However, you can also access any Diagram
Toolbox at any time, using this method:
· From the top of the Diagram Toolbox, click on to
display the 'Find Toolbox Item' dialog and specify
'<profile> <toolbox>'
Keyboard Ctrl+Shift+3
Shortcuts
Generalizatio
n A UML Generalization
Property
ValueRestrict
ion
Relationships
MPDRelation The
ship ModelPackageDescriptionRelationship
stereotype applies to a Dependency that
represents a relationship between MPDs
or between an MPD and another resource
(such as a NIEM specification; as in the
case of conforms-to).
IEPConformanceTargetType to the
IEPConformanceTarget slot of the
ModelPackageDescription Artifact
instance
· Add a QualifiedNamesType instance to
File Type
Usage
or IEP artifact.
Schema
Document
Usage
Access
Display the Model Wizard (Start Page 'Create from Pattern'
tab) using any of the methods outlined here.
In the Model Wizard, select the Information Exchange >
NIEM Perspective and then select 'NIEM 3, 4 and 5'.
Select a Reference Model, MPD Types and Starter Model,
as required.
Keyboard Ctrl+Shift+M
Shortcuts
Steps Description
diagram, or
· Create and add a new instance
Create your This is where you model the data that will
data model be sent in your information exchange
message.
In NIEM, this is typically modeled within
Packages that have the
<<InformationModel>> stereotype,
representing the different namespaces
used in the model. These Packages
typically include a NIEM-core Package
that is a subset of the NIEM-core
Reference Model Package, and two
Notes
· ALL projects containing NIEM models must include the
Ste Action
p
Notes
· The output location of the schema file generated for a
Package is specified by the 'pathURI' tag value on the
Usage connector that relates the Package to the IEPD
instance specification; default values are set by the
Schema Composer when the subset Packages are created,
but the values can be overridden by the user
Step Detail
of the message.
Organizing schema elements into
'exchange' and generic 'extension'
groupings also offers the possibility of
sharing the more generic schema across
multiple IEPDs, whereas the 'exchange'
schema is usually specific to one
particular IEPD. You can also have
multiple 'exchange' schemas in order to
represent different message types or
groups of different message types.
Access
Use either of the methods outlined here to display the
Schema Composer window and then display the 'New
Model Transform' dialog,
Enter a name for the new model transform, then from the
'Schema Set' drop-down list choose 'National Information
Exchange Model (NIEM)'.
Save the profile as a Model Artifact within a suitable
Package in your project (the root Package of your IEPD is
suitable - then the Artifact will be easy to find).
Ste Action
Notes
· Please read through each of the walk-through examples -
each one contains important information
· The Schema Composer functionality that supports NIEM
development, assists in creating Subset Schemas; it does
earlier in step 2.
Select the Package 'NIEM 5 Starter Model', then
click on the OK button.
Note: When creating more complex models, your
subset might include Classes from several different
<<InformationModel>> Packages. Enterprise
Architect's Schema Composer will automatically
create the required target Packages and copy the
Classes you are subsetting into the target Packages
whose Tagged Value 'targetNamespace' matches that
of the source Package from which the original Class
was drawn. The subset <<InformationModel>>
Packages will be created as children of the Package
you choose as the generation target.
Ste Description
p
· Open the Start Page 'Create from Pattern' tab (the Model
Wizard)
· Find the Perspective 'NIEM 3, 4 and 5'
Once the required types are selected, you can generate the
subset. When prompted, select the parent Package into
which the subset namespace Packages will be generated.
After generation, the Classes in the subset Packages should
resemble this:
We can now create a NIEM PIM diagram and place all our
subset Classes on that diagram, to produce something that
resembles this:
Generate IEPD
Right-click on the IEPD object instance.
Select 'Specialize | NIEM | Generate NIEM Schema'.
The dialog shows the standard NIEM artifacts and the list of
linked namespaces that can be generated as schemas. Set the
target directory and click on the Generate button to create
the modeled IEPD.
Access
Option Action
Notes
· Enterprise Architect uses the schemaLocation attribute in
the XSD Import and XSD Include elements of an XML
Schema, to determine the dependencies between the files;
this attribute must be set to a valid file path (and not a
URL) for the dependent XML Schema(s) to be imported
correctly
· The 'Create Diagram for XML Schema(s)' option
generates a diagram for each imported schema file, but
displays the diagrams only for the schema files
specifically selected by the user; it does not display the
diagram for a referenced schema file
· If you import large schema files, it is recommended that
you deselect the 'Create Diagram for XML Schema(s)'
option, as this considerably increases the time taken by
the import
Requirement Development
Requirement Development consists of all the activities and
tasks associated with discovering, evaluating, recording,
documenting and validating the Requirements for a
particular project. Requirements are discovered, analyzed,
specified and verified. Enterprise Architect has a wide range
of tools and features to assist the Analyst as they develop
Requirements. The centerpiece for Requirement
Requirement Management
Requirement Management comprises the activities to
maintain a set of Requirements that represent an accord or
agreement between the project team and the customer. It
also has a focus on ensuring that the Requirements are
acceptable to the Design and Development Teams, and that
they are sufficiently specific to be implemented into
working business, software or hardware systems.
Requirement Documentation
A number of documents are commonly produced as part of
the Requirement Engineering discipline, such as the
Software (System) Requirements Specification and Use
Case Reports, and these can be generated automatically
from a Requirement Model using built-in templates. In
addition a wide range of other documents can be produced
using built-in or customized templates.
Meet the Lists the key tools that are used for
Requiremen developing and managing Requirements,
t Tools including a picture of each tool in action,
where to find the tool, how to use it and
how to become proficient in using the
tool. There are a large number of
additional useful tools that are described
in the Help topic Additional Requirement
Tools.
Specification Manager
Relationship Matrix
of the relationship.
Requirement Properties
find Properties
Requirement Element Context Menu: Properties... |
Properties Properties...
or
Browser window Context Menu:
Properties | Properties...
Requirements Diagram
Learn more
(c) Sparx Systems 2022 Page 705 of 2309
Modeling Domains 3 February, 2022
Scenario Builder
Scenario
Builder
Baseline Tool
Traceability Window
Dashboard Diagrams
Dashboard diagrams allow you to create high quality Charts
and graphs to display repository information in a visually
compelling way. This diagram is an example of creating a
Dashboard diagram in Sparx Systems Enterprise Architect;
it illustrates the ratio of Requirement Priorities in a Pie
Chart.
Requirements Overview
The discipline of Requirement Engineering is one of the
most critical parts of any system development process.
Whether it is an enterprise, business, engineering, real-time,
software or hardware system, the definition and
management of requirements is critical to the success of any
endeavor. Clear and unambiguous articulation of
requirements will ensure that the implementation team has
the problem defined, giving the best chance of the correct
solution being implemented. Enterprise Architect equips the
Requirement Analyst and Manager with a formidable set of
tools to take on this important challenge.
The multi-featured Specification Manager allows
requirements to be entered, viewed and managed in a
spreadsheet format, facilitating rapid input and editing of
requirements. Requirement properties, including Tagged
Values, can be edited in-line and values can be selected
from drop-down lists.
These are just a few of the tools that are available to the
Requirement Analyst and Managers.
Business Requirements
Business Requirements are high-level requirements that
express the objectives and desired outcomes of an
organization. They are often disregarded as being 'fluffy' by
Functional Requirements
Functional Requirements are the bridge between the
business and technical teams and provide the definition of
what the system must do for its users that will in turn meet
the business goals. Some methodologists believe that
Functional Requirements can be described using only Use
Cases or User Stories, but this appears to be a purist view
and in practice there seems to be a need for detailed textual
Requirements that describe what the architect must design
Stakeholder Requirements
Stakeholder Requirements are statements of the
stakeholders' needs and expectations and describe the
features that must be met if the business requirements are to
be fulfilled. Analysts tend to focus on the functional aspects
of the needs but stakeholders' expectations might include
performance and reliability and a variety of other
non-functional needs. Both are critical and act as precursors
to the definition of the functional and non functional
Transition Requirements
Transition Requirements define what is needed to transform
the business and systems from the current state to the future
state. They define a transitory situation and once the system
has been fully implemented the requirements and their
implementation will not be visible. They define things such
as training, conversion and reformatting of data and parallel
Business Case
The Business Case is a high level document or argument
that attempts to articulate the reasons for initiating a project.
It is an important artifact for the requirements analyst
because it will typically contain information describing
business value, drivers and business and technical risks. It
places the endeavor in the context of other functions in the
business and describes the solution options at a high level. It
is an important source for requirements and should be
included as an artifact in the model.
Requirements Diagram
A Requirements diagram is one of Enterprise Architect's
extended diagram types. It allows an analyst to model
requirements visually, showing how requirements relate to
each other and how they connect with other elements in the
model such as Business Drivers, Constraints, Business
Rules, Use Cases and design Components. The Requirement
will be the main element seen on these diagrams; it has a
name, a description and a series of properties (called
attributes in some literature) such as status, complexity,
difficulty and author. Enterprise Architect is designed to be
a flexible tool and allows requirements to be created directly
in the repository without the use of a diagram, but the
diagram has proven to be a useful tool to express the
important role requirements play in the development
process.
Example Diagram
Requirements Toolbox
You can create elements by dragging them from the
'Requirements' pages of the Diagram Toolbox onto the
diagram canvas. Connectors can also be selected from the
Toolbox and dragged between elements in the diagram or by
using the Quick Linker. This table lists the elements
available from the 'Requirements' toolbox but it is important
to remember that other elements such as Use Cases and
Components can be added to the diagram by opening other
Toolbox pages - click on to display the 'Find Toolbox
Item' dialog and specify the element name.
Element Usage
and Assumptions.
Connector Use
Components.
Viewing Requirements
Facility Description
diagrams.
Requirement Development
Requirement development includes all the activities and
tasks associated with discovering, evaluating, recording,
documenting and validating the requirements for a particular
project or program of work. Requirements are discovered,
analyzed, specified and verified, and Enterprise Architect
has a wide range of tools and features to assist the
Requirement Analyst as they develop requirements. The
centerpiece for requirement development is the
Specification Manager, allowing the Analyst to enter, view
and manage requirements in textual form in a spreadsheet
format.
Elicitation
Elicitation is the process of information discovery, the
information forming the precursors to requirements. The
information will typically be raw and often heterogeneous,
and it will not be until the requirements analysis phase is
performed that true requirements will be able to be derived
from it. Elicitation will take many forms, and all of the skills
of the analyst will be needed to determine which documents,
tools, people and processes to examine to discover the
information. Some of these information source locations are
listed in this table.
User Observations
Observing users perform their work is an effective and
unobtrusive way of gaining an understanding of the tasks
they carry out and how they use information and other
software and hardware devices to achieve an outcome. Even
if the processes that support the planned system will be
different, the observations of the current processes will
provide a useful context for discussions. It will also help the
analyst empathize with the user and can result in a deeper
understanding of the issues they face and provide the basis
for the discovery of potential solutions. An analyst will
often discover unmentioned documents, checklists and clue
cards that can help illuminate the process. Equipped with a
mobile phone or camera, it is also useful for the analyst to
take photographs of the user working, which will help in the
requirements analysis phase.
Enterprise Architect supports the modeler in representing
files such as photos and scanned documents directly in the
model, creating a rich and expressive representation of the
user at work. There is the option to represent these as an
Artifact (which, with a single key stroke (F12), will launch
the file) or to use a hyperlink or even to include the image
itself in a diagram.
Stakeholder Workshops
The requirements analyst or business analysis is charged
with the difficult task of eliciting requirements, which
necessitates excellent communication with the stakeholders,
including the customer and the analysis team. One very
successful way of facilitating the elicitation of the
stakeholders' needs is to run a workshop with all the key
stakeholders present. The analyst's skills as a communicator,
diplomat and mediator are important to create a
collaborative and respectful environment conducive to the
exploration of the stakeholders' needs and concerns. It is
imperative that the analyst uses terminology that the
stakeholders understand and displays an understanding or a
willingness to learn the elements that make up the domain.
There is sometimes a misconception that what will be
articulated is a set of clearly defined requirements that can
be entered into the tool as Stakeholder Requirements; this is
far from the reality of what happens. Stakeholders will
typically articulate a wide range of ideas, including Policies,
Business Rules, Data definitions, Project Management
Constraints, Functional Requirements, Business
Requirements, existing system problems and even suggested
solutions. Even when an external consultant is used to run
these meetings the analyst will not have time to categorize
all of these statements in the meetings. What is needed is a
way for the scribe who is tasked with documenting the
statements to get them into the tool without any concern for
what type of information is being recorded. Having them
(c) Sparx Systems 2022 Page 771 of 2309
Modeling Domains 3 February, 2022
Glossary
Prior to a workshop an analyst can populate the Project
Glossary with the existing terms and their meanings that
have been gleaned from reading project documentation such
as a Business Case or Vision Document. During the
workshops, as new terms are uncovered they can be added
to the Glossary and their definitions can be discussed and
entered or deferred until later in the analysis phase.
Domain Model
A domain model will act as a guiding model for discussions
with many stakeholders and ideally a skeleton model should
be created prior to the commencement of any workshops.
The Domain Model should be kept simple and domain
elements should be given a name and a description or a
responsibility and initially only important connections
should be made between elements. As the workshop
Discussions
Creating Requirements
Enterprise Architect has extensive support for developing
Requirements, and provides a number of specialized tools
for this purpose. As with all model content a modeler is
encouraged to check whether the Requirements have been
entered into the repository by someone else before
embarking on the task of creating new Requirements. It is
also possible that the Requirements have been defined in
another tool such as a spreadsheet and could be imported
into Enterprise Architect without the need to create each
Requirement manually. Enterprise Architect has two
locations for Requirements; they can be created in the model
as an element that will appear in the Browser window, or
they can be created inside another element as an Internal
Requirement or Responsibility.
Method Description
Notes
An Internal Requirement will not be displayed on a diagram
by default; to ensure it is displayed you must set the
compartment as visible either for the individual element or
for all elements on the diagram.
Ste Action
p
Requirement Properties
Requirements development and management is critical to
the success of any project and the properties of the
requirements are important to the prioritization, and the way
they will be elaborated and used within an implementation
or development team. All Enterprise Architect elements
have standard properties such as Status, Author and Phase
but the requirement element has additional properties such
as Difficulty and Priority. Some requirements processes will
specify specific properties such as Owner and Volatility
(Stability) and these can be configured by using Tagged
Values that can be applied to each requirement. The 'Notes'
field for a requirement has special significance as it often
contains a formal and contractual description of how the
system must behave or perform.
Access
On a diagram or in the Browser window, select an element
and:
Keyboard
Shortcuts Alt+Enter
Use to
· Document requirements
· Set requirement properties such as Type, Difficulty and
Priority
· Set other element properties common to both
Requirements and other model elements
Reference
Field Action
auto-counter text.
· Medium
· High
· Medium
· High
Notes
· In Requirement Management tools and texts, the
characteristics of a requirement are commonly called
'Attributes'; however, in UML the term 'Attribute' refers to
a different type of feature, and the Requirement
characteristics are defined as properties - in this Enterprise
Architect documentation, the term properties is used
· In a project, it might be necessary to define more
information in a Requirement than is provided by the
standard properties and Tagged Values can be used for
this purpose
Access
Ste Action
p
diagram
· Customize what is displayed for all elements in a diagram
Action Description
Notes
· When the display is customized at the level of the diagram
these settings will take precedence over the element level
settings
· When the display is customized at the level of the
requirement the length of the notes text displayed can be
further tailored to a particular number of characters and
formatting options can be set
Import Requirements
A requirements analyst has a busy schedule of work, from
running stakeholder workshops to sifting through project
documentation and updating project managers with the
status of the requirement development, so any opportunity
to save time and work more efficiently is usually welcomed.
One of the most difficult tasks that the analyst faces is how
to get a central repository of requirements when the source
documents are often in a variety of formats and tools.
Enterprise Architect has a range of mechanisms to import
requirements from disparate sources, including:
· Enterprise Architect models using copy and paste
similar tool
· An XMI file that has been exported from another model
2 Select:
· For a single requirement, or a complete Package of
Ste Action
p
Access
Ste Action
p
Access
Select your target Package in the Browser window, then:
Keyboard Ctrl+Alt+I
Shortcuts
Ste Action
p
Access
On a diagram or in the Browser window, select an element
and:
Ste Action
p
Notes
· When an internal requirement is made into an external
requirement element it is still viewable from within the
element; any change to the external requirement will be
reflected in the internal requirement and vice versa
· When an internal requirement is made into an external
requirement element, the 'Stability' field and its value for
the internal requirement are translated into the Stability
Tagged Value in the external requirement
Extended Requirements
There is also a convenient set of extended requirements that
can be used to model a variety of diagram types ranging
from Functional, Business and User to Architectural and
Non-Functional requirements. These come pre-configured
with Tagged Values that allow you to specify additional
Analysis
The analysis phase of Requirements development ensures
that the Requirements discovered in the Elicitation phase
have been articulated correctly and have the correct format,
level of detail and properties and form a cohesive and
correct set. As a result of the disparate sources and methods
of elicitation the Requirements recorded in the elicitation
phase will need some massaging and balancing - it is quite
common for example to find repeated or overlapping
requirements or for an analyst to have omitted to record the
concerns of one or more stakeholders. Tools such as the
Relationship Matrix and the Traceability window will reveal
omissions and issues with requirements. The Discuss &
Review window and the Chat & Mail window -
incorporating the Model Mail facility - also provide
mechanisms for discussing the Requirements with other
team members.
Requirements models
Model Description
Sequential Numbering
Good practice often recommends that Requirements are
given a sequential number when they are created so they can
be referred to in stakeholder workshops, change requests,
conversations with System Integrators or implementation
teams. Using a name in this situation is often unwieldy and
subject to error so a sequential number is preferred.
Enterprise Architect has a facility called Auto Names and
Counters for this purpose that can be used to assign a
Numbered Hierarchies
When Requirements are written in word processors they
typically use a numbering scheme called Outline
Numbering, which assigns a number to the first level
heading such as: '4 Inventory Requirements' and then a
sub-heading is numbered by adding a period and a number
such as '4.1 Stock Levels' and again down another level
'4.1.1 List Stock Levels'. Enterprise Architect has a facility
called Level Numbering that applies hierarchical numbering
(c) Sparx Systems 2022 Page 827 of 2309
Modeling Domains 3 February, 2022
Numbered Packages
This is a hybrid method where Packages are used to create a
high level naming and numbering structure and the
Requirements in each Package are numbered using the
Package identifier and a number to identify them. So
Requirements for the Fulfillment of Orders could be
contained in a Package named '2.4 Fulfill Orders' and an
individual requirement in this Package could be named
'FO-01 Process Credit Card Payments'. This would be
manually maintained or a Script could be written to ensure
that the numbers were correctly assigned.
Business Constraints
A Business Constraint is a business restriction or limitation
imposed on the choices that can be made for the design,
implementation or deployment of the solution. They are
typically restrictions of budget, time and resources, but can
be any type of limitation such as the context of the business
deployment where the solution must not change the way that
branch staff currently work. A Business Constraint might
also limit the access or presentation of information such as
'Only the last four digits of a credit card number can be
displayed in reports.' There is some overlap with business
rules and the analyst should be careful to separate the two
notions. Business Constraints can be modeled in Enterprise
Architect using a Constraint element available from the
Common toolbox page or a stereotyped Requirements
element. They can be related to one or more model elements
Assumptions
An assumption is a statement that is believed to be true but
that has not yet been verified. It is imperative that
assumptions are modeled and attempts are made to verify
them as they have the potential, if proved to be false, to
significantly change in the definition of the problem and
therefore the solution. They can be statements made about
the way things are currently done or they could pertain to a
future process or solution. Assumptions are similar to Risks,
and good practice would prescribe them as being managed
in a similar way to Risks. Attempts should be made to verify
them as early as possible in the requirements development
phase. An example of an assumption is: 'The User will know
the meaning of toolbox icons as used in other Windows
Technical Constraints
A technical constraint is any restriction on the choices that
can be made for the architecture, design, implementation or
deployment of the solution. They can start with principles
defined in the enterprise architecture that restrict the types
of platform, programming language and decision to buy or
build part of the solution. They could also be restrictions on
the type of protocol or standard that the solution must
implement or comply with. Restrictions on file sizes and
Create a Glossary
One of the fundamental precepts of requirements
engineering is to promote understanding and convergence of
thought and to remove ambiguity. It is quite common for
members on a project team to have quite disparate
understanding of domain concepts. This can be easily
rectified by creating a Project Glossary early in the project
and ensuring the glossary is accessible to the project team.
Enterprise Architect has a built in Glossary that allows the
requirements analyst to define terms and meanings, and to
create categories (types) of terms.
Notes
Experienced modelers tend to define the terms of a domain
in a Domain Model and reserve the glossary for project and
process terms and their definitions such as Use Case,
Software Requirements Specification, Metric etc. This
allows relationships between domain terms to be defined
and data elements (Attributes) can be added including
datatypes creating a more expressive representation than
would be possible in the Glossary.
Notes
(c) Sparx Systems 2022 Page 839 of 2309
Modeling Domains 3 February, 2022
Dashboard Diagams
Enterprise Architect has a series of dashboard diagrams that
can be used to create a compelling view of the Priority of
requirements in a Package with the option to include
sub-Packages. There are a number of pre-configured charts
that can be used to display the ratio of Priority values for
Requirements in a part of the model. Filters add another
level of user configuration allowing a modeler to, for
example, exclude requirements of a particular Status or
ensure only requirements for the current phase are
displayed.
Specification
Requirements are typically derived from a wide range of
sources, and there are often a number of requirements
analysts working on a project. This will tend to make the
Requirements disparate. Ensuring the Requirements are
consistent and of high quality is critical to the success of a
project.
Requirements Packages
Quality Attributes are often grouped into sets, such as those
pertaining to security or performance, or one of the '-ilities'
such as Reliability. A requirements Package can be used to
group these elements together which provides a convenient
categorization for reporting. The Packages can be seen in
the Browser window and can also be added to a diagram
with the option to display the individual Requirements
inside the Package.
Requirement Sources
Much of the literature on requirements development talks of
'gathering' requirements, which implies that the analyst is
walking through an orchard picking low hanging fruit. In
practice the process is quite the opposite and the
requirement analyst needs to have all the skills and tenacity
of a detective to discover the sources of requirements. The
requirement sources and the documents and artifacts that are
discovered are first class citizens and can be modeled in
Enterprise Architect to provide a register of the requirement
sources. This is a list of common requirements sources:
· Interviews with users and other stakeholders
Ste Action
p
Property Description
Validation
Requirements validation is necessary to make sure the
Requirements are of a high standard, suitably define the
Customer's problem (or opportunity) and are sufficient for
the implementation teams to design and implement the
product. It is imperative that the requirements have the
desired level of quality and are complete and necessary.
There are a number of ways that Requirements can be
validated, but probably the two most common ways are to
perform team reviews and to assign test cases to the
requirements.
The team reviews are typically conducted by team members
or other analysts who have some familiarity with the
domain, but were not themselves responsible for the
requirements development or management. Enterprise
Architect has a handy tool to assist with this process, called
the Formal Review, which works across the entire model
and allows reviewers to record their findings in discussion
documents and to reference model elements. There is also a
Requirements Checklist element available from the
'Extended Requirements' page of the Requirements Toolbox,
which provides a useful mechanism for checking the quality
of Requirements.
The details of the tests, including when they were run and
the status of the test indicating whether it passed or failed,
can be recorded.
Review Requirements
Requirements are typically discovered and written by a
variety of team members, and are commonly sourced from a
variety of documents and stakeholders at disparate times.
All of these factors lead to a tendency for the Requirements
to lack quality, be inconsistent and to contain issues. Best
practice encourages early and continuous reviews of
Requirements to detect and remove defects before the
Requirements reach the design and implementation teams.
Enterprise Architect provides sophisticated tools for
reviewing Requirements including the Model Library tool,
Discussions, and Maintenance items.
Requirement Management
This consists of the activities to maintain a set of
requirements that represent an accord or agreement between
the project team and the customer. It also involves ensuring
that the requirements are acceptable to the design and
implementation teams and that they are sufficient so that
what they specify can be implemented into working
business, software or hardware systems. Enterprise
Architect is a sophisticated platform for managing
requirements, and regardless of the domain, the size of the
project or the method being followed, there are tools that
will make it straightforward to manage even large
repositories of requirements in complex projects.
Tracing Requirements
Most Requirement processes mandate that Requirements are
traced from high level concepts such as Business Drivers,
Visions and Goals down to the parts of Components that
implement them. For many projects this is an intractable
problem because much of the information lives in a set of
heterogeneous tools such as word processor documents,
spreadsheets, diagram tools, corporate presentation tools and
more. Some Project Managers attempt to solve the problem
by creating a spreadsheet that acts as a register of all the
disparate information but the management of this file takes
up considerable project resources and the file is almost
impossible to keep up to date. With Enterprise Architect
there is the ability to model all of this project information in
the one tool and to create easy-to-maintain and analyzable
traces between all the elements, from the organization's
mission statement right down to the level of programming
code, if required.
Tracking Requirements
The status of a requirement is a fundamental indicator of
where it is positioned in the requirement's development
process. For example requirements that have a status of
'Proposed' indicate that they are not yet ready and available
for development work to begin. Enterprise Architect has a
variety of tools to allow status to be tracked, analyzed and
managed, starting with the fact that each requirement can be
assigned a status and the list of status codes are completely
configurable. The status is conveniently displayed in list
views of the requirements including when using the
Specification Manager. There are also a set of pre-defined
and extensible dashboard charts and graphs that can be used
to get a compelling visual representation of the status and
other properties of requirements.
Tool Description
Mechanism Description
Tool Description
Requirement Volatility
There are ever increasing market place pressures to release
products and systems as early as possible, putting stress on
project teams to develop, test and deploy products in shorter
and shorter periods of time. The requirements processes
have changed significantly in recent years to ensure that
stable, correct and well-articulated specifications are
provided to architects, designers and developers when they
need them. There has been a move to iterative and
incremental processes and this necessitates providing a set
of stable requirements for every iteration. The churning of
requirements is often an indicator that a problem is not
clearly understood, that stakeholders have not been
compromised and there are unresolved political issues, the
scope is not defined or the business itself is in fluctuation.
Enterprise Architect has a number of mechanisms that can
be used to assist with this problem. Enterprise Architect
does not have a built-in property for requirement volatility
(stability) but using the general purpose UML extension
mechanism of Tagged Values a tag could be created to
record this property.
Note: Internal requirements do have a stability property but
external requirements do not.
Mechanism Description
Requirement Reuse
The concept of reusing artifacts of a system development
process has been written about in many papers and text
books but has traditionally been confined to software
components. In more recent years the notion of reusing
specifications, including requirements, has started to get
traction. The reuse is particularly important where
organizations create a family of products with similar
features, or where there is a community of users within an
industry or domain. Other types of requirement such as
security and regulatory requirements will typically apply to
a number of projects. Business Rules and Stakeholders
Concerns will also typically apply across many projects and
are best catalogued outside individual project structures.
Enterprise Architect provides a number of sophisticated
mechanisms for managing the reuse of elements across
projects, including structuring the repository for reuse,
importing requirements from other sources, and a Reusable
Asset Service.
Mechanism Description
Requirement Documentation
A number of documents are commonly produced as part of
the Requirements Engineering discipline, such as the
Software (System) Requirements Specification and Use
Case Report. These can be generated automatically from a
requirements model using built-in templates. In addition a
wide range of other documents can be produced using
built-in or customized templates. The documentation facility
in Enterprise Architect is highly configurable and many
reports can be produced using the template system, but for
more complex reports there is a facility called Virtual
Documents that allows a publisher to model the structure of
the document and to cherry pick content from anywhere in
the repository, applying different templates to each section
of the document. There is also a wide variety of options that
can be applied at the template or document generation level,
and the Scripting engine can be used to inject content into a
document or to produce the entire report.
Project Glossary
A Project Glossary lists and defines the terms that are
important for a project or program of work. The Project
Glossary can be generated as an isolated document, or it can
be included as a section in one or more other documents. It
provides a single point of truth for the important project
terms and their meanings; when new documentation is
generated the terms will automatically be updated. The
Glossary can be generated to a DOCX or PDF format, or to
HTML that could be included in a project or organization
level web site. The Glossary allows the modeler to
categorize the terms into user-defined Types, and these can
have styles applied when they are generated in
documentation.
The detailed Use Case report will list all the details of the
Use Case and the detailed steps, including Basic Paths,
Alternate and Exception Scenarios. Other information,
including Internal Requirements, Pre and Post Conditions
and other Constraints will also be included in the report. If a
Behavioral diagram such as an Activity diagram has been
automatically created, this diagram will also be displayed in
the report.
Data Dictionary
Many processes specify the creation of a Data Dictionary
that acts as a reference for all the information that will be
consumed, stored or created by the system. The Data
Dictionary can be created in Enterprise Architect using the
UML Class diagram and Classes can be defined to represent
the important elements of the domain including Attributes
and Data Types. Enterprise Architect can generate high
quality documentation from the Class diagram and data
items and their descriptions can be listed and the Attributes
of these Classes can also be detailed with Data Types and
Multiplicities. Enterprise Architect provides built-in
templates that allow the Data Dictionary to be created
automatically and these templates can be edited or new ones
created.
Method Support
Knowledge Description
Area
rationales.
Notes
· Support for BABOK in Enterprise Architect includes a
BABOK-specific Glossary for the product
UML Requirements
The Unified Modeling Language does not specify an
element for modeling Requirements other than the Use
Case, which it states can be used to describe system usages.
In very early versions of UML a Requirement was defined
as a stereotyped comment, but this was later made obsolete.
Enterprise Architect has, since very early versions, filled
this gap in the UML specification by extending the language
to include a Requirement element that allows this important
concept to be modeled textually and graphically in diagrams
and other views. Enterprise Architect has rich support for
modeling Use Cases in compliance with the specification
but allows the requirements analyst to specify other
Requirements using the flexible Requirements element.
When used together the Requirement element and the Use
Case equip the analyst with a useful palette to describe the
Requirements for any system at any level. The Requirement
element can be used to describe Business Drivers, Business
Goals and Stakeholder Requirements, and these can be
linked to Use Cases with the Realize connector. The Use
Cases can be augmented with detailed Functional,
Architectural and Implementation Requirements suitable for
the implementation teams.
SysML Requirements
The Systems Modeling Language (SysML) specifies a rich
set of modeling constructs to represent text-based
requirements as elements that can be related to other
elements in a model. Model Based Engineering has become
important in recent years, as the complexity of systems has
increased and the engineering profession has recognized the
need for more sophisticated mechanisms for describing and
developing these complex systems. Enterprise Architect has
full support for SysML and the modeling of Requirements,
including support for a range of ways of presenting
Requirements such as: Diagrams, Lists, Matrices,
Hierarchies and documentation. There are even dashboard
diagrams that present charts and graphs that summarize
requirements' properties such as Status, Priority and
Difficulty in a visually compelling way.
Tool Overview
Auto-Names
and Counters Use to assign a sequential number to a
Requirement, including a prefix and
suffix.
Requirements
Checklist Provides a graphical list of checks that
can be applied to individual
Requirements.
Import and
Export A tool to import and export Requirements
Spreadsheets from spreadsheet files in the CSV format.
Documentati
Counters
Requirements.
Requirements Checklist
The Requirement Checklist is a convenient element that acts
as a tally to indicate whether a Requirement complies with a
set of predefined measures such as whether the Requirement
is Atomic, Cohesive, Traceable and Verifiable. It can be
assigned to any Requirement and the measures can be
updated directly in the diagram. When working with
Requirements it is sometimes very useful to refer to a
common set of 'best practices' and qualities that help define
the nature of a well formed specification. The Requirement
Checklist element is designed to meet this need.
Documentation
Glossary
Auditing
find Auditing
Discussions
Maintenance Items
Library
Features
The MDG Link for DOORS is useful when you need to
perform the management of requirements external to your
Model Driven Development. Using this Add-In you can
interchange requirements defined within IBM DOORS with
the traceable Requirements used within Enterprise
Architect's Requirements Management features.
The MDG Link for DOORS supports:
Importing:
· Objects from IBM® Rational® DOORS®
· Discussions
Exporting:
· Requirements and Use Cases
· Attachments
Synchronization:
· Of IBM® Rational® DOORS® requirements and
Getting Started
After installing and enabling the MDG Link for DOORS,
you can access the facilities of the technology in Enterprise
Architect.
Access
Tasks
There are three principal tasks that you can perform through
the MDG Link for DOORS.
Task Description
Access
Ste Action
p
Notes
· You can also create and edit links to DOORS modules
through the 'Export to Doors' and 'Import from Doors'
dialogs, using the Module Manager button
Access
Export Options
Field/Button Action
this operation.
Field/Button Action
Profile table.
Field/Button Action
Access
Import Options
Field/Button Action
Field/Button Action
Field/Button Action
Information Engineering
Design, Create and Manage Conceptual, Logical and
Physical Data Models
Getting Started
Information Modelers, Data Modelers and Architects are
responsible for creating models of an organization’s
information that span multiple levels of abstraction, from
conceptual through to logical and physical. The conceptual
models are technology independent and can be used for
discussions with business people and domain experts,
allowing the basic concepts in the domain to be represented,
discussed and agreed upon. The logical model elaborates the
conceptual model, adding more detail and precision but is
still typically technology neutral, allowing Information
Analysts to discuss and agree on logical structures. The
physical model applies technology specific data to the
models and allows engineers to discuss and agree on
technology decisions in preparation for generation to a
target environment, such as a database management system.
Example Diagram
An example diagram provides a visual introduction to the
topic and allows you to see some of the important elements
and connectors that are created in specifying or describing
the way a data model is defined including: Tables, Views,
Procedures, Sequences, Functions.
More Information
This section provides useful links to other topics and
resources that you might find useful when working with the
Data Modeling tool features.
Example Diagram
Using the Database engineering features of Enterprise
Architect you can create rich models of the objects that
make up a data model at any level of abstraction from
Conceptual through Logical to Physical. These models are
created by adding tables and other database objects from the
toolbox or by reverse engineering and existing database into
a model from a range of RDBMSs. A database diagram can
contain Tables, VIews, Procedures, Sequences and
Functions. Table Columns are annotated as Primary and
Foreign Keys are modeled using specialized association
relationships. In this example the user has created a simple
physical data model of Customers and their Addresses and
Orders.
Data Models
Type Description
Toolbox
· Entity Relationship element and relationship entries in the
Tagged Values
Some of the Entity Relationship diagram components can be
modified by Tagged Values, as indicated:
Entity isWeakEntity
Notes: If true, this entity is a weak entity.
Attribute attributeType
Notes: There are four valid options:
'normal', 'primary key', 'multi-valued' and
'derived'
Attribute commonDataType
Notes: Defines the common data type for
each attribute.
Attribute dbmsDataType
Notes: Defines the customized DBMS
data type for each attribute. This option is
only available when the
commonDataType tag is set to 'na'.
You must define the customized type first
through the 'Settings > Reference Data >
Settings > Database Datatypes' ribbon
option.
N-ary isRecursive
Association Notes: If true, the N-ary Association
represents the many-to-many recursive
relationship.
Relationship isWeak
Notes: If true, the Relationship is a weak
relationship.
Disjoin Participation
Overlapping Notes: There are two valid options,
'partial' and 'total'.
Notes
· Entity Relationship diagrams are supported in the
Corporate, Unified and Ultimate Editions of Enterprise
Architect
Example
The following diagram is a simple example of a Logical
data model. The Logical Model adds detail to the
Conceptual Model but without going to the level of
specifying the Database Management System that will be
used.
Notation
The example model is defined using Enterprise Architect's
UML Profile for Data Modeling; the relationship between
the Tables uses the default Information Engineering
notation.
Information Engineering is one of three notations that
Enterprise Architect supports to help Data Modelers identify
cardinality in relationships. You can change the notation by
selecting the 'Design > Diagram > Manage > Properties'
ribbon option, clicking on the 'Connectors' page and
selecting the required option in the 'Connector Notation'
drop-down list. You would most probably change the
notation to IDEFX1, but the UML2.1 notation is also
available.
Default DBMS
Prior to creating a Physical Data Model it is advisable for
you to set the default DBMS for the project. Setting a
default DBMS ensures that all new database elements that
are created on diagrams are automatically assigned the
default DBMS.
If the default DBMS is not set, new Tables are created
without a DBMS assigned, this restricts Enterprise
Datatypes or
· 'Develop > Data Modeling > Datatypes or
Toolbar
Note: When modeling via the Database Builder the default
DBMS is defined at the model level (as a Tagged Value
'DBMS' against the <<Database>> Package) instead of at
the project level, thereby allowing for greater flexibility
when projects involve multiple DBMSs.
DDL Transformation
The DDL transformation converts the logical model to a
data model structured to conform to one of the supported
DBMSs. The target database type is determined by which
DBMS is set as the default database in the model (see the
Database Datatypes Help topic, 'Set As Default' option).
The data model can then be used to automatically generate
DDL statements to run in one of the system-supported
database products.
The DDL transformation uses and demonstrates support in
the intermediary language for a number of database-specific
concepts.
Concepts
Concept Effect
<MDG.Technology version="1.0">
<Documentation id="UserdataTypes" name="Userdata
<CodeOption
name="DBTypeMapping-boolean">TINYINT</CodeOptio
n>
<CodeOption
name="DBTypeMapping-text">CLOB</CodeOption>
...
</CodeOptions>
</CodeModule>
</CodeModules>
</MDG.Technology>
Notes
· You can define DBMS-specific aspects not depicted in a
Logical model, such as Stored Procedures, Triggers,
Views and Check Constraints, after the transformation;
see the Physical Data Model Help topic
Example
The PIM elements
Access
Display the Model Wizard (Start Page 'Create from Pattern'
tab) using any of the methods outlined here.
In the Model Wizard, select the 'Database Engineering'
Perspective.
Keyboard Ctrl+Shift+M
Shortcuts
Field/Button Action
Notes
· Once a data modeling workspace has been created, you
can begin to develop your model in one of two ways:
· View
· Procedure
· Sequence
· Function
· Association and
· Database Connection
Access
Display the 'New Diagram' dialog using any of the methods
outlined here.
Keyboard Ctrl+Insert
Shortcuts
Field/Button Action
Notes
· The default diagram connector notation for all new
diagrams is Information Engineering, although many data
Start > Help > Help > Open the Example Model
Access
Database Builder
Overview
The interface of the Database Builder consists of:
· A Tree of data models, listing all defined data models in
Table columns
· A 'Constraints/Indexes' tab for the direct management of
Notes
· The Database Builder is available in the Corporate,
Unified and Ultimate Editions of Enterprise Architect
selecting 'Load', or
· Double-clicking on the name
Properties
Option Description
'DefaultConnection' property is
checked; if present, the Connection by
that name is automatically made active
· The database engineering model
Notes
· If a data model is selected in the Browser window when
the Database Builder is opened, that model's details will
be automatically loaded
of multiple objects.
· Database Procedures
· Database Functions
· Database Sequences
· Database Connections
if successful, continues
· 1 Connection – sets it as active and continues
if successful, continues
Columns
Tables are the fundamental database object, and Columns
(and their properties) are the most frequently modified Table
feature updated and changed by data modelers, therefore the
'Columns' page is conveniently located as the first page of
the Database Builder's interface.
Once a Table is selected in the Database Builder's tree, the
'Columns' page is populated with the currently defined list
of columns for that Table. The data modeler can then make
changes to main column properties directly in the list or
grid. As the data modeler selects individual columns in the
list, the column's extended properties (and Comments) are
shown immediately under the list, allowing modification to
these extended properties.
Notes
· The 'Columns' page will only be populated when a Table
item is selected in the Database Builder's tree
Access
new Column
Option Action
value here.
Column Properties
The appropriate properties for the Table's Database
Management System automatically display in the 'Property'
panel (expand the 'Column (<name>)' branch if they are not
visible).
Property DBMS
Autonum Oracle
(Startnum MySQL
Increment) SQL Server
DB2
PostgreSQL
Notes: If you require an automatic
numbering sequence, set this property to
True and, if necessary, define the start
number and increment.
Generated DB2
Notes: Set this additional property for
auto numbering in DB2, to 'By Default' or
'Always'.
NotForRep SQLServer
Notes: Set this property to True if you
want to block replication.
Zerofill MySQL
Notes: Set this property to True or False
to indicate if fields are zerofilled or not.
Unsigned MySQL
Notes: Set this property to True or False
to indicate whether or not fields accept
unsigned numbers.
LengthType Oracle
Notes: Set this property to define the
character semantics as 'None', 'Byte' or
'Char'.
Access
Use one of the methods outlined here to display a list of
columns for a table, then select a column and delete it.
When you select the 'Delete column '<name>'' option, if all
validation rules are satisfied the column is immediately
deleted.
Notes
· If the deleted database Table column is involved in any
constraints it will automatically be removed from them
Access
Use one of the methods outlined here to display a list of
columns for a Table, then select a column and reposition it
within the list.
Keyboard F9
Shortcuts
Ste Action
p
Constraints/Indexes
Tables are the fundamental database object, and Constraints
and Indexes (and their properties) are the second most
frequently modified Table feature updated and changed by
data modelers, therefore the 'Constraints/indexes' page is
conveniently located as the second page of the Database
Builder's interface.
Once a Table is selected in the Database Builder's tree, the
'Constraints/Indexes' page is populated with the currently
defined list of constraints and indexes for the selected Table.
The data modeler can then make changes to main properties
directly in the list. As the data modeler selects individual
constraints or indexes in the list, the constraint's extended
properties (and Comments) are shown immediately under
the list, allowing modification of these extended properties.
Notes
· The 'Constraints/Indexes' page will only be populated
when a Table item in the Database Builder's tree is
selected
Access
Create a Constraint
The process of creating any of these constraint types is the
same and is achieved in one of the ways described here.
Ste Action
p
Ste Action
p
assigning columns.
Ste Action
p
Delete a constraint
To delete a constraint you no longer require, right-click on
the constraint name in the list on the 'Constraints/Indexes'
tab and select the 'Delete constraint <name>' option. If all
validation rules for the given constraint type are met, the
constraint is immediately removed from the repository along
with all related relationships (if there are any).
Primary Keys
A Primary Key is a column (or set of columns) that uniquely
identifies each record in a Table. A Table can have only one
Primary Key. Some DBMSs support additional properties of
Primary Keys, such as Clustered or Fill Factor.
Access
Ste Action
p
1 Either:
· In the Database Builder, click on a Table with one
Ste Action
p
1 Either:
· In the Database Builder, click on a Table with one
Ste Action
p
1 Either:
· In the Database Builder, click on the Table with
Ste Action
p
1 Either:
· In the Database Builder, click on the Table with
Notes
· Warning: Enterprise Architect assumes that Primary Key
constraints have at least one column assigned to them;
however, Enterprise Architect does not enforce this rule
during modeling
If DDL is generated for a Table whose Primary Key has
no column assigned, that DDL will be invalid
Database Indexes
Database indexes are applied to Tables to improve the
performance of data retrieval and sort operations. Multiple
indexes can be defined against a Table; however, each index
imposes overheads (in the form of processing time and
storage) on the database server to maintain them as
information is added to and deleted from the Table
In Enterprise Architect an index is modeled as a stereotyped
operation.
Some DBMSs support special types of index; Enterprise
Architect defines these using additional properties such as
function-based, clustered and fill-factor.
Access
Work on an index
Ste Action
p
Additional Properties
Property Description
Notes
· Warning: Enterprise Architect assumes that Indexes have
at least one column assigned to them; however, Enterprise
Architect does not enforce this rule during modeling
If DDL is generated for a Table that has an Index defined
without column(s) assigned, that DDL will be invalid,
unless the index is functional-based
· Any columns assigned to a functional-based index are
ignored
Unique Constraints
Unique Constraints enforce the 'uniqueness' of a set of fields
in all rows of a Table, which means that no two rows in a
Table can have the same values in the fields of a Unique
Constraint. Unique Constraints are similar to Primary Keys
(in that they also enforce 'uniqueness') but the main
difference is that a Table can have multiple Unique
Constraints defined but only one Primary Key.
Access
Create a Constraint
Ste Action
p
Notes
· Warning: Enterprise Architect assumes that Unique
Constraints have at least one column assigned to them;
however, Enterprise Architect does not enforce this rule
during modeling
If DDL is generated for a Table that has a unique
constraint defined without column(s) assigned, that DDL
will be invalid
Foreign Keys
A Foreign Key defines a column (or a collection of
columns) that enforces a relationship between two Tables. It
is the responsibility of the database server to enforce this
relationship to ensure data integrity. The model definition of
a Foreign Key consists of a parent (primary) Table
containing a unique set of data that is then referred to in a
child (foreign) Table.
In Enterprise Architect, a Foreign Key is modeled with two
different (but related) UML components:
· A Foreign Key constraint (a UML operation with the
Ste Action
p
Ste Action
p
Option Action
Examples
This example shows simple Foreign Keys in a diagram:
Check Constraints
A Check Constraint enforces domain integrity by limiting
the values that are accepted by a column.
Access
Create a Constraint
Ste Action
p
<name>', or
· Click on the item and press Ctrl+D
Notes
· Any columns assigned to a check constraint are ignored
Table Triggers
A Table trigger is SQL or code that is automatically
executed as a result of data being modified in a database
Table. Triggers are highly customizable and can be used in
many different ways; for example, they could be used to
stop certain database activities from being performed during
business hours, or to provide validation or perform deletions
in secondary Tables when a record in the primary Table is
deleted.
In Enterprise Architect, a Table trigger is modeled as a
stereotyped operation and managed using the Table's
'Constraints' screen.
Access
Shortcuts Ctrl+N
Ste Action
p
DDL generation.
<name>', or
· Click on the item and press Ctrl+D
Notes
· Any columns assigned to table triggers are ignored
Access
Open the Database Builder window, then display the 'SQL
Scratch Pad' tab.
Ctrl+Shift+C.
Notes
· The SQL Scratch Pad does not manipulate your SQL in
any way, so you must use the correct syntax for the
current DBMS
· While the SQL Scratch Pad can execute multiple SQL
statements, and the status and messages of each statement
are shown in the 'Messages' list, only the results of one
SELECT statement can be shown in the 'Results' list at a
time; all subsequent SELECT statements will be ignored
Database Compare
The 'Database Compare' tab provides a mechanism for
comparing the current data model with a live database, and
optionally synchronizing any differences in either direction.
Differences 'pushed' into a live database are performed
using 'Alter DDL' statements, while changes imported from
the live database can be directly 'pulled' into the model.
The Database Compare functionality requires the Database
Builder to have a valid connection to a live database. This
database connection is shared by the 'SQL Scratch Pad',
'Database Compare' and 'Execute DDL' tabs of the Database
Builder.
Access
Open the Database Builder window, then display the
'Database Compare' tab.
Differences List
Column Description
Unpaired objects
· Create <object name> - create the
Component List
Column Description
or model
· ===> - update the object in the live
Comparison Action
Table Options
Option Action
compared.
Notes
· The Database Compare functionality currently can
perform comparisons on Table, View, Procedure,
Function and Sequence object types
Execute DDL
The 'Execute DDL' tab provides a mechanism to easily
execute generated DDL statements against a live database,
and provides instant feedback on their success, all within the
Enterprise Architect interface and without the need for other
products.
There are two different types of DDL statement that
Enterprise Architect can generate and send to the 'Execute
DDL' tab:
· Create DDL statements, created by the Generate DDL
screen, and
· Alter DDL statements, created by the Database Compare
window
The Execute DDL functionality requires the Database
Builder to have a valid connection to a live database. This
database connection is shared between the SQL Scratch Pad,
Database Compare and 'Execute DDL' tabs of the Database
Builder.
Access
Open the Database Builder window, then display the
'Execute DDL' tab.
Example
In the example used in the earlier section on Database
Comparison (when a column and constraint were renamed),
if the defaults are used to 'push' the data model changes into
the live database the Execute DDL screen is populated with
the details shown here.
Database Objects
Whilst Tables are the fundamental components of a
relational database and allow the definition of Columns,
Data Types, Keys and Indexes, there are a number of other
Objects that are important in RDBM systems including:
· Views - a View represents the result-set of a pre-defined
diagrams
· Tables as UML Class objects with a stereotype of
<<table>>
· Views as UML Class objects with a stereotype of
<<view>>
· Procedures as UML Class objects with a stereotype of
<<procedure>>
· Functions as UML Class objects with a stereotype of
<<function>>
· Sequences as UML Class objects with a stereotype of
<<dbsequence>>
You can quickly create and configure all of these objects in
your database model with Enterprise Architect.
Database Tables
Tables are the fundamental components of a relational
database, representing multiple rows of structured data
elements (referred to as Columns). Every individual item of
data entered into a relational database is represented by a
value in a column.
Enterprise Architect's UML Profile for Data Modeling
represents:
· Database Tables as UML Class objects with a stereotype
of <<table>>
· Table columns as UML attributes of a Table, with a
stereotype of <<column>>
· Primary Keys as UML operations/methods of a Table,
stereotype of <<index>>
· Unique Constraints as UML operations/methods of a
Example
This simple example of a Physical Data Model diagram in
Enterprise Architect consists of two Database Tables
represented by UML Classes, named customers and
customer_addresses.
Notes
· The Table stereotype is denoted by the icon in the
top-right corner of each Class (see the Data Modeling
Notation topic)
· The Enterprise Architect maintenance screen for
Ste Action
p
Ste Action
p
Access
new Column
Option Action
value here.
Column Properties
The appropriate properties for the Table's Database
Management System automatically display in the 'Property'
panel (expand the 'Column (<name>)' branch if they are not
visible).
Property DBMS
Autonum Oracle
(Startnum MySQL
Increment) SQL Server
DB2
PostgreSQL
Notes: If you require an automatic
numbering sequence, set this property to
True and, if necessary, define the start
number and increment.
Generated DB2
Notes: Set this additional property for
auto numbering in DB2, to 'By Default' or
'Always'.
NotForRep SQLServer
Notes: Set this property to True if you
want to block replication.
Zerofill MySQL
Notes: Set this property to True or False
to indicate if fields are zerofilled or not.
Unsigned MySQL
Notes: Set this property to True or False
to indicate whether or not fields accept
unsigned numbers.
LengthType Oracle
Notes: Set this property to define the
character semantics as 'None', 'Byte' or
'Char'.
Access
Use one of the methods outlined here to display a list of
columns for a table, then select a column and delete it.
When you select the 'Delete column '<name>'' option, if all
validation rules are satisfied the column is immediately
deleted.
Notes
· If the deleted database Table column is involved in any
constraints it will automatically be removed from them
Access
Use one of the methods outlined here to display a list of
columns for a Table, then select a column and reposition it
within the list.
Keyboard F9
Shortcuts
Ste Action
p
Important
A DBMS must be assigned to a Table before you can add
columns in it. If you are using the Database Builder then the
DBMS of the data model will be automatically applied to all
new Tables; however, if you have added a Table by other
means (such as working on a diagram) then this is a manual
step.
Tasks
Once the Database Table properties are defined, you are
ready to add columns.
Task
Set the database type for a Table - other than the Table
Default DBMS
Prior to creating a Physical Data Model it is advisable for
you to set the default DBMS, which will be automatically
applied to new database objects that you create outside of
the Database Builder. You can set the default DBMS type in
one of these ways:
· Select 'Start > Appearance > Preferences > Preferences >
Toolbar
Owner)
· What set of validation rules will be applied while database
modeling
· The data types that are available when creating columns,
Generation
Access
Select a Table in the Browser window or on a diagram then,
using any of the methods outlined here, open the Table's
'Properties' dialog, display the 'General' tab, then display the
'Main' child tab.
Options
Field/Button Action
Access
Select a Table in the Browser window or on a diagram then,
using any of the methods outlined here, open the Table's
'Properties' dialog, display the 'General' tab and display the
'Table Detail' child tab.
Ste Action
p
Ste Action
p
Generate DDL
When you generate DDL for this Table, the Table type is
included in the SQL script.
To allow for later versions of MySQL, additional Table
options that can be added in the same way include:
Tag Value (Example)
ENGINE InnoDB
CHARACTE latin1
R SET
CHARSET latin1
COLLATE latin1_german2_ci
Set Properties
The same properties can be added to indexes and
constraints, by highlighting the index or constraint
Operation and adding the appropriate Tagged Values.
Ste Action
p
· DBVERSION - 9.0.111
· FREELISTS - 1
SELECT, UPDATE
· INITIAL - 65536
· INITRANS - 1
· LOGGING - LOGGING
· MAXEXTENTS - 2147483645
· MAXTRANS - 255
· MINEXTENTS - 1
· MONITORING - MONITORING
· OWNER - OWNER1
· PARALLEL - NOPARALLEL
· PCTFREE - 10
· PCTINCREASE - 0
· PCTUSED - 0
· SYNONYMS -
PUBLIC:TABLE_PUB;OWNER2:TABLE_OWN
ER2
· TABLESPACE - MY_TABLESPACE
· TEMPORARY - YES
Access
Create a Constraint
The process of creating any of these constraint types is the
same and is achieved in one of the ways described here.
Ste Action
p
Ste Action
p
assigning columns.
Ste Action
p
Delete a constraint
To delete a constraint you no longer require, right-click on
the constraint name in the list on the 'Constraints/Indexes'
tab and select the 'Delete constraint <name>' option. If all
validation rules for the given constraint type are met, the
constraint is immediately removed from the repository along
with all related relationships (if there are any).
Primary Keys
A Primary Key is a column (or set of columns) that uniquely
identifies each record in a Table. A Table can have only one
Primary Key. Some DBMSs support additional properties of
Primary Keys, such as Clustered or Fill Factor.
Access
Ste Action
p
1 Either:
· In the Database Builder, click on a Table with one
Ste Action
p
1 Either:
· In the Database Builder, click on a Table with one
Ste Action
p
1 Either:
· In the Database Builder, click on the Table with
Ste Action
p
1 Either:
· In the Database Builder, click on the Table with
Notes
· Warning: Enterprise Architect assumes that Primary Key
constraints have at least one column assigned to them;
however, Enterprise Architect does not enforce this rule
during modeling
If DDL is generated for a Table whose Primary Key has
no column assigned, that DDL will be invalid
Access
Database Indexes
Database indexes are applied to Tables to improve the
performance of data retrieval and sort operations. Multiple
indexes can be defined against a Table; however, each index
imposes overheads (in the form of processing time and
storage) on the database server to maintain them as
information is added to and deleted from the Table
In Enterprise Architect an index is modeled as a stereotyped
operation.
Some DBMSs support special types of index; Enterprise
Architect defines these using additional properties such as
function-based, clustered and fill-factor.
Access
Work on an index
Ste Action
p
Additional Properties
Property Description
Notes
· Warning: Enterprise Architect assumes that Indexes have
at least one column assigned to them; however, Enterprise
Architect does not enforce this rule during modeling
If DDL is generated for a Table that has an Index defined
without column(s) assigned, that DDL will be invalid,
unless the index is functional-based
· Any columns assigned to a functional-based index are
ignored
Unique Constraints
Unique Constraints enforce the 'uniqueness' of a set of fields
in all rows of a Table, which means that no two rows in a
Table can have the same values in the fields of a Unique
Constraint. Unique Constraints are similar to Primary Keys
(in that they also enforce 'uniqueness') but the main
difference is that a Table can have multiple Unique
Constraints defined but only one Primary Key.
Access
Create a Constraint
Ste Action
p
Notes
· Warning: Enterprise Architect assumes that Unique
Constraints have at least one column assigned to them;
however, Enterprise Architect does not enforce this rule
during modeling
If DDL is generated for a Table that has a unique
constraint defined without column(s) assigned, that DDL
will be invalid
Foreign Keys
A Foreign Key defines a column (or a collection of
columns) that enforces a relationship between two Tables. It
is the responsibility of the database server to enforce this
relationship to ensure data integrity. The model definition of
a Foreign Key consists of a parent (primary) Table
containing a unique set of data that is then referred to in a
child (foreign) Table.
In Enterprise Architect, a Foreign Key is modeled with two
different (but related) UML components:
· A Foreign Key constraint (a UML operation with the
Ste Action
p
Ste Action
p
Option Action
Examples
This example shows simple Foreign Keys in a diagram:
Check Constraints
A Check Constraint enforces domain integrity by limiting
the values that are accepted by a column.
Access
Create a Constraint
Ste Action
p
<name>', or
· Click on the item and press Ctrl+D
Notes
· Any columns assigned to a check constraint are ignored
Table Triggers
A Table trigger is SQL or code that is automatically
executed as a result of data being modified in a database
Table. Triggers are highly customizable and can be used in
many different ways; for example, they could be used to
stop certain database activities from being performed during
business hours, or to provide validation or perform deletions
in secondary Tables when a record in the primary Table is
deleted.
In Enterprise Architect, a Table trigger is modeled as a
stereotyped operation and managed using the Table's
'Constraints' screen.
Access
Shortcuts Ctrl+N
Ste Action
p
DDL generation.
<name>', or
· Click on the item and press Ctrl+D
Notes
· Any columns assigned to table triggers are ignored
Database Views
A Database View represents the results of a pre-defined
query. Unlike a Table, a View is dynamically derived from
data in one or more Tables (or other Views). Enterprise
Architect supports the definition of Views both with and
without this statement:
"Create View {viewName} As" statement
The system will automatically add it dynamically (if
missing) whenever DDL generation is performed. The
advantage of not defining this statement is that when a view
object is renamed the 'View Definition' property does not
have to be manually updated.
You can create a Database View either:
· Within the Database Builder or
Ste Action
p
Ste Action
p
Database Procedures
Database Procedures (sometimes referred to as Stored
Procedures or Procs) are subroutines that can contain one or
more SQL statements that perform a specific task. They can
be used for data validation, access control, or to reduce
network traffic between clients and the DBMS servers.
Extensive and complex business logic can be embedded into
the subroutine, thereby offering better performance.
Database Procedures are similar to Database Functions. The
major difference is the way in which they are invoked -
Database Functions can be used in the same way as for any
other expression within SQL statements, whereas Database
Procedures must be invoked using the CALL or EXEC
statement, depending on the DBMS.
In Enterprise Architect, Database Procedures can be
modeled in one of two ways:
· As individual objects (the default method) or
· As operations in a container
Individual objects
Database Procedures modeled as individual objects are
Ste Action
p
Ste Action
p
Operations in a Container
Database Procedures modeled as operations have a
Database Functions
Database Functions provide you with a mechanism to
extend the functionality of the database server. A Database
Function is a routine that accepts parameters, performs an
action (such as a complex calculation) and returns the result
of that action as a value. Depending on the Function, the
return value can be either a single value or a result set.
Once created, a Database Function can be used as an
expression in an SQL statement.
In Enterprise Architect, Database Functions can be modeled
in one of two ways:
· As individual objects (the default method) or
· As Operations in a container
Individual objects
Database Functions modeled as individual objects are UML
Classes with the stereotype «function»; you create these
either:
· Within the Database Builder or
Ste Action
p
Ste Action
p
Operations in a Container
Database Functions modeled as operations have a container
object, this being a UML Class with the stereotype
«functions» (with an 's' on the end). Each Function is an
operation with the stereotype «func». The system provides a
dedicated Maintenance window through which you can
easily manage the Database Functions stored as operations.
Database Sequences
Sequences are a feature that some DBMS products
implement to provide users with a mechanism to generate
unique values - the Sequence ensures that each call to it
returns a unique value. This is particularly important when
the Sequence's result is used as a Primary Key. These can be
generated with a schema for loading onto the DBMS server.
Sequences are provided so that database users are not forced
to implement their own unique value generator. Not all
DBMS products support Sequences; those that do not
instead provide functionality for columns to be initialized
with an incrementing value.
In Enterprise Architect, Sequences can be modeled in one of
two ways:
· As individual objects (the default method) or
· As Operations in a container
Individual objects
Sequences modeled as individual objects are UML Classes
with the stereotype «dbsequence»; you create these either:
· Within the Database Builder or
Ste Action
p
Ste Action
p
Option Action
Operations in a Container
Database Sequences modeled as operations have a container
object, this being a UML Class with the stereotype
«sequences» (with an 's' on the end). Each Sequence is an
operation with the stereotype «sequ». The system provides a
Ste Action
p
Ste Action
p
Access
Ste Action
p
Dialog' option.
The element 'Properties' dialog displays, showing the
'General' tab.
Ste Action
p
1 F10.
The 'Database <Structure> container: <Classname>'
dialog displays.
· sp_AddOrder or
· seq_AddressID
Oracle Packages
Oracle Packages are database objects that are unique to the
Oracle DBMS. They are containers that group
logically-related objects into a single definition. Packages
have two parts - a specification and a body. The:
· Specification section declares the various components
components
The Package components can consist of Types, Variables,
Constants, Exceptions, Cursors and subprograms.
In Enterprise Architect, an Oracle Package is modeled as a
UML Class with a stereotype of <<package>>. It has two
operations:
· Specification
· Body
Ste Action
p
Database Connections
A Database Connection object provides a convenient way of
storing the connection details of a live database. Enterprise
Architect supports the definition of three different
connection types:
· MS Access
· Firebird
v16), and
· ODBC
Ste Action
p
Ste Action
p
Option Action
Delete connection
If a connection is no longer required, you can delete it as for
any other element from the Database Builder, the Browser
window or a diagram. Right-click on the element and select
the corresponding 'Delete <element name>' option.
Notes
· It is advisable that when working in a team environment
(that is, multiple users sharing a single Enterprise
Architect repository) all ODBC based Database
Connection objects are defined as 'DSN-less' so that the
Database Connection object contains all necessary details
and can therefore be shared between all users, although a
Native Connection does this and is easier to setup
· The DBMS type of a Database Connection object cannot
be changed once the initial selection has been saved
Access
Options
Option Action
Data Types
Every Table column that you define in your data model has
a data type assigned that specifies the type of information
that can be stored by the column. The available datatypes
for a column are dependent on the selected DBMS for the
Table, because each DBMS supports its own list of
datatypes. Whilst each DBMS supports the same basic
types, such as string, whole or decimal numbers, each
DBMS calls them by different names and have different
properties.
Each Enterprise Architect repository contains the definitions
of the core datatypes for a number of standard DBMS
products. However, since data types vary from one DBMS
product to another, and from one version of a product to
another, Enterprise Architect provides you with tools to:
· Define new data types for a new version of your DBMS
product
· Define data types for a new, non-standard database
product
· Automatically convert data types from one defined
Access
Access
Field/Button Action
Ste Action
p
Database Datatypes
Using Enterprise Architect's 'Database Datatypes' dialog,
you can add to the set of data types that are available for a
particular DBMS. You can:
· Identify the DBMS in use and, if required, set this as the
model default
· Include any new data types that are supported by later
longer relevant
· Add a new DBMS product and its built-in data types if,
Access
Manage Datatypes
You can transport these database data types between
Enterprise Architect models using the 'Export Reference
Data' and 'Import Reference Data' options.
Field/Button Action
Access
Access
Data Types
Access
DDL Editor
In this field you browse for the full execution file path and
name of an external program that Enterprise Architect
should use to open files that are created by its Generate
DDL functionality. If you leave this field empty, Enterprise
Architect uses the default code editor.
Default Database
In this field you select the DBMS that will be automatically
assigned to database objects that are created outside a Data
Model workspace (see the Create a Data Model from Model
Pattern Help topic).
MySQL Storage
In this field you select the default storage engine to be
assigned to MySQL Tables; from MySQL v 5.5 onwards the
default value is InnoDB.
Settings
Setting Detail
Access
Option Action
Template Macros
These recognized macros will be replaced by name text
during the creation of a constraint name.
Macro Applies to
ribbon.
Ste Action
p
> Import'
The 'Import DB Schema' dialog displays, showing
the details of the current active database connection.
Option Description
Indexes
· Unique Constraints - Select to import
Procedures
Packages
Advanced
· System Objects - Select to import
removed.
Notes
· Within Windows, ODBC DSN can be defined for either
32 or 64 bit applications, therefore care must be taken to
ensure that all ODBC DSNs for Enterprise Architect's use
are defined sharing the same architecture. This is
particular important from Enterprise Architect version 16
onwards because it is now available in both 32 and 64 bit
versions. An alternative solution (and what Sparx Systems
recommend) is to make use of Native connections, since
they work for both architectures.
· The ODBC connection should use the ODBC driver
available from the DBMS vendor, such as MySQL's
ODBC driver for MySQL, and Oracle's ODBC driver for
Oracle; drivers provided by third-party vendors are not
Access
Open the Database Builder window, then use the context
menu and select 'Generate DDL'.
Generate Tab
Field/Button Action
objects
· The first and last objects in a block
while you press Shift, to select every
object in the block
Options Tab
Set any of these flags to False if you do not want to take the
action they initiate.
Group Options
Notes
· (*) - options with this mark will be automatically set to
True if you have specified to generate DDL for an
individual element of that type; that is, if you select a
Table and your 'Generate Table' option is False,
Enterprise Architect will change the option to True
· ($) - options with this mark will be disabled if the 'Tables'
option is set to False
· (#) - options with this mark will be disabled if the 'Include
Comments' option is set to False
created
· If generating Oracle sequences, you must always set the
'Table Triggers' and 'Sequences' options to True, so that a
pre-insert trigger is generated to select the next sequence
value to populate the column; also, in the column
properties, set the 'AutoNum' property to True
· You can edit the DDL templates that the system uses to
generate the DDL; these are stored at the repository level
so that all other users of the same repository will
automatically use the updated templates
Access
Option Action
Notes
DDL Templates
The DDL Template Editor operates in the same way as the
Code Template Editor, except that the DDL Template Editor
displays templates for DDL Generation and templates for
Alter DDL Generation at the same time. The Alter DDL
Generation templates are shown at the bottom of the list,
prefixed by 'DDL Diff'.
Templates
This table lists and briefly describes the base templates used
for DDL generation.
Template Description
column.
Templates
This table lists and briefly describes the base templates used
for Alter DDL generation.
Template Description
DDL Macros
Field substitution macros provide access to data from your
model. In particular, they are used to access data fields
from:
· Database objects (such as Tables and Views)
· Columns
· Constraints
· Constraint Columns
ddlFunctionAlias
Function 'Properties' dialog: 'Main' tab: 'Alias' text field.
ddlFunctionName
Function 'Properties' dialog: 'Name' text field.
ddlOwner
{Table element} 'Properties' dialog: {element} 'Table Detail'
tab: 'Owner' text field.
ddlPackageAlias
Package 'Properties' dialog: 'Main' tab: 'Alias' text field.
ddlPackageName
Package 'Properties' dialog: 'Name' text field.
ddlProcedureAlias
Procedure 'Properties' dialog: 'Main' tab: 'Alias' text field.
ddlProcedureName
Procedure 'Properties' dialog: 'Name' text field.
ddlSchemaFunctionName
The name of the Function element's definition read in from
the live database.
ddlSchemaOwner
The 'Owner' property of the element's definition read in
ddlSchemaProcedureName
The name of the Procedure element's definition read in from
the live database.
ddlSchemaSequenceName
The name of the Sequence element's definition read in from
the live database.
ddlSchemaTableName
The 'Table Name' property read in from the live database.
ddlSchemaViewName
The name of the View element's definition read in from the
live database.
ddlSequenceAlias
Sequence 'Properties' dialog: 'Main' tab: 'Alias' text field.
ddlSequenceName
Sequence 'Properties' dialog: 'Name' text field.
ddlTableAlias
Table 'Properties' dialog: 'Main' tab: 'Alias' text field.
ddlTableDBMS
Table 'Properties' dialog: 'Main' tab: 'Database' drop down
list field.
ddlTableLevelComment
Table 'Properties' dialog: 'Notes' text field.
ddlTableName
Table 'Properties' dialog: 'Name' text field.
ddlViewAlias
View 'Properties' dialog: 'Main' tab: 'Alias' text field.
ddlViewName
View 'Properties' dialog: 'Name' text field.
ddlColumnName
'Columns and Constraints' dialog: 'Column' tab: 'Name' cell.
ddlColumnAlias
'Columns and Constraints' dialog: 'Column' tab: 'Alias' cell.
ddlColumnComment
'Columns and Constraints' dialog: 'Column' tab: 'Notes' text
field.
ddlSchemaColumnName
The Column Name property read in from the live database.
ddlConstraintAlias
'Columns and Constraints' dialog: 'Constraints' tab: 'Alias'
cell.
ddlConstraintColumnAlias
'Columns and Constraints' dialog: 'Constraints' tab:
'Involved Columns: Assigned' list.
ddlConstraintColumnName
'Columns and Constraints' dialog: 'Constraints' tab:
'Involved Columns: Assigned' list.
ddlConstraintComment
(c) Sparx Systems 2022 Page 1289 of 2309
Modeling Domains 3 February, 2022
ddlConstraintName
'Columns and Constraints' dialog: 'Constraints' tab: 'Name'
cell.
ddlPKColumnCount
Only relevant if the current constraint has a type of Primary
Key, this macro will return a count of assigned columns to
the Primary Key.
'Columns and Constraints' dialog: 'Constraints' tab:
'Involved Columns: Assigned' list.
ddlReferenceColumnAlias
Only relevant if the current constraint has a type of Foreign
Key, this macro will return the column alias from the
reference table.
'Columns and Constraints' dialog: 'Constraints' tab: 'Alias'
cell.
ddlReferenceColumnName
Only relevant if the current constraint has a type of Foreign
Key, this macro will return the column name from the
reference table.
Foreign Key 'Constraint' dialog: 'Involved Columns' list:
'Parent' column.
ddlReferenceTableAlias
Only relevant if the current constraint has a type of Foreign
Key, this macro will return the reference table's alias.
Table 'Properties' dialog: 'Main' tab: 'Alias' text field.
ddlReferenceTableName
Only relevant if the current constraint has a type of Foreign
Key, this macro will return the reference table's name.
Foreign Key 'Constraint' dialog: 'Involved Columns' list:
'Parent' column header.
ddlReferenceTableOwner
Only relevant if the current constraint has a type of Foreign
Key, this macro will return the reference table's owner.
Foreign Key 'Constraint' dialog: 'Involved Columns' list:
'Parent' column header.
ddlSchemaConstraintColumnName
The column names involved in the current constraint read in
from the live database.
Note: this field is not editable directly in Enterprise
Architect.
ddlSchemaConstraintName
The Constraint Name property read in from the live
database.
Note: this field is not editable directly in Enterprise
Architect.
ddlSchemaConstraintType
DDL_DATATYPE_SIZE ([productName],
[datatype])
Returns the fully formatted datatype of the current column
in DDL syntax.
Parameters
· productName - the current Table's assigned DBMS, such
VARCHAR or INT
Remarks
Within an Enterprise Architect Table column, datatypes are
defined with a Length Type (0, 1 or 2) property that
influences the DDL syntax; this function macro takes the
DDL_GET_DEFINITION_PARAS ([definition])
Returns a string representation of the parameters from the
supplied function/procedure definition.
Parameters
· definition - the complete SQL definition of the
procedure/function
Remarks
Some DBMSs (such as PostgreSQL) support multiple
definitions of the same procedure/function name. The
definitions differ only in their parameter list, therefore to
manipulate such objects the DDL must specify the name and
parameters. This function macro gives the DDL templates
the ability to extract the parameters so that they can then be
used to identify individual objects.
DDL_INCLUDE_SQLQUERY([objectName])
Returns the SQL statement defined in the SQLQuery object.
Parameters
· objectName - the name of the SQL Query object defined
Remarks
None.
DDL_INDEX_SORT([product],[columns])
Returns the sort order of a given index.
Parameters
· product - the DBMS (currently, Firebird)
Remarks
This macro currently only applies to Firebird indexes.
DDL_RESOLVE_NAME ([productName],
[name], [leftSurround], [rightSurround])
Returns the supplied name delimited (with the supplied left
and right characters) if the name is a reserved word for the
current DBMS.
Parameters
· productName - the current Table's assigned DBMS, such
DDL_TABLE_TAGVALUE ([tagName])
Returns the value for the supplied tag name in the
repository's version of the current Table.
Parameters
· tagName - the tag item's name that is to be retrieved
Remarks
None.
EXECUTE_CURRENT ([objectName],
[actionName], [priority])
Adds the return string from the current template to the
Execution Engine's execution queue.
Parameters
· objectName - the value that will be shown in the 'Object'
EXECUTE_STRING ([objectName],
[actionName], [priority], [ddlStatement])
Adds the supplied DDL statement to the Execution Engine's
execution queue.
Parameters
· objectName - the value that will be shown in the 'Object'
required action
Remarks
This function macro has no effect if the user has elected to
generate DDL to a file.
EXIST_STRING ([ddlStatement])
Searches the Execution Engine's execution queue for the
supplied DDL Statement and returns 'T' if the statement is
found.
Parameters
· ddlStatement - a single DDL statement
Remarks
None.
GET_FIRST_SQL_KEYWORD([statement])
Returns the first keyword of the provided SQL statement.
Parameters
· statement - the SQL statement
Remarks
None.
ODBC_TABLE_TAGVALUE ([tagName])
Returns the value for the supplied tag name in the live
database's version of the current table.
Parameters
· tagName - the tag item's name that is to be retrieved
Remarks
None.
TBL_EMPLOYEES
· parameter3 = a delimited string of values, separated by
Return Result
Of the format:
CREATE SYNONYM OE.EMPLOYEES FOR
TBL_EMPLOYEES;
CREATE PUBLIC SYNONYM PUB_EMPLOYEES
FOR TBL_EMPLOYEES;
REMOVE_LAST_SEPARATOR
([ddlStatement], [separator])
Returns the supplied DDL statement with the last separator
Remarks
When building a string that represents a DDL statement, it is
common practice to append the separator character after
each item; however, the separator is not required after the
last item, so this function macro is provided to remove the
trailing separator.
REMOVE_STRING ([ddlStatement])
Removes the supplied DDL statement from the Execution
Engine's execution queue.
Parameters
· ddlStatement - a single DDL statement
Remarks
None.
SUPPRESS_EXECUTE_CURRENT ([boolean])
A function macro to enable/disable subsequent calls to
EXECUTE_CURRENT.
Parameters
· boolean - True or False
Remarks
The default state for this flag is False; that is, calls to
EXECUTE_CURRENT are not ignored.
INTERNAL PROPERTIES
tableBoolProperty:"propertyName"
Returns a Boolean representation ("T" or "") of the value for
the internal property in the repository's version of the
current Table.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
tableProperty:"propertyName"
Returns the value for the internal property in the repository's
version of the current Table.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
columnProperty:"propertyName"
Returns the value for the internal property in the repository's
version of the current Column.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
columnBoolProperty:"propertyName"
Remarks
None.
constraintProperty:"propertyName"
Returns the value for the internal property in the repository's
version of the current Constraint.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
constraintBoolProperty:"propertyName"
Returns a Boolean representation ("T" or "") of the value for
the internal property in the repository's version of the
current Constraint.
Parameters
constraintColumnProperty:"propertyName"
Returns the value for the internal property in the repository's
version of the current Constraint Column.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
constraintColumnBoolProperty:"propertyNa
me"
Returns a Boolean representation ("T" or "") of the value for
the internal property in the repository's version of the
current Constraint Column.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
viewProperty:"propertyName"
Returns the value for the internal property in the repository's
version of the current View.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
procedureProperty:"propertyName"
Returns the value for the internal property in the repository's
version of the current Procedure.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
functionProperty:"propertyName"
Returns the value for the internal property in the repository's
version of the current Function.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
sequenceProperty:"propertyName"
Returns the value for the internal property in the repository's
version of the current Sequence.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
packageProperty:"propertyName"
Returns the value for the internal property in the repository's
version of the current database Package.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
odbcTableProperty:"propertyName"
Returns the value for the internal property in the ODBC's
version of the current Table.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
odbcConstraintProperty:"propertyName"
Returns the value for the internal property in the ODBC's
version of the current Constraint.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
tableUserProperty:"propertyName"
Remarks
None.
columnUserProperty:"propertyName"
Returns the value for the user-defined property in the
repository's version of the current Column.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
constraintUserProperty:"propertyName"
Returns the value for the user-defined property in the
repository's version of the current Constraint.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
constraintColumnUserProperty:"propertyNa
me"
Returns the value for the user-defined property in the
repository's version of the current Constraint Column.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
viewUserProperty:"propertyName"
Returns the value for the user-defined property in the
repository's version of the current View.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
procedureUserProperty:"propertyName"
Remarks
None.
functionUserProperty:"propertyName"
Returns the value for the user-defined property in the
repository's version of the current Function.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
sequenceUserProperty:"propertyName"
Returns the value for the user-defined property in the
repository's version of the current Sequence.
Parameters
· propertyName - the property name that is to be retrieved
Remarks
None.
ddlGenerateToExecuteEngine
Directs the generated DDL to the Execution Engine.
ddlOptionColumnComments
Include column comments in the generated DDL.
ddlOptionGenerateCheck
Include Check constraints in the generated DDL.
ddlOptionGenerateDrop
ddlOptionGenerateForeign
Include Foreign Keys in the generated DDL.
ddlOptionGenerateFunction
Include Functions in the generated DDL.
ddlOptionGenerateIndex
Include Indexes in the generated DDL.
ddlOptionGenerateLengthSemantic
(Oracle only) Include length semantics syntax on text
columns in the generated DDL.
ddlOptionGenerateNullable
ddlOptionGeneratePackage
(Oracle only) Include Packages in the generated DDL.
ddlOptionGeneratePrimary
Include Primary Key constraints in the generated DDL.
ddlOptionGenerateProcedure
Include Procedures in the generated DDL.
ddlOptionGenerateSeparateConstraint
Generate Table constraints separately to the CREATE
TABLE statement; that is, using an ALTER TABLE
statement.
Note: Some DBMSs do not support separate constraints in
all conditions.
ddlOptionGenerateSequence
Include Sequences in the generated DDL.
ddlOptionGenerateTable
Include Tables in the generated DDL.
ddlOptionGenerateTableProperty
Include extended properties on Tables in the generated
DDL.
ddlOptionGenerateTrigger
Include Table Triggers in the generated DDL.
ddlOptionGenerateUnique
ddlOptionGenerateView
Include Views in the generated DDL.
ddlOptionHeaderComments
Include header comments in the generated DDL.
ddlOptionTableComments
Include Table comments in the generated DDL.
ddlOptionUseAlias
Use Aliases instead of Names for all objects (object
components) as specified on the Generate DDL screen.
ddlOptionUseDatabaseName
ddlUseAlias
Use Aliases instead of Names for all objects (object
components) as specified on the Database Builder 'Database
Compare' tab.
DDL Limitations
A fundamental feature of a Database Management System
(DBMS) is to allow the definition of database objects via a
structured language; this language is called DDL (for data
definition language, or data description language). The DDL
syntax of each DBMS is unique. While there are common
DDL statements and keywords across all DBMSs, there are
differences that require each DBMS to have its own set of
DDL templates within Enterprise Architect.
This page summarizes the main limitations for each of the
supported Database Management Systems.
MS Access
· Comments cannot be applied to (or changed in) Tables,
Table Columns, Table Constraints or Views, therefore
Enterprise Architect ignores these differences
· The CREATE TABLE statement does not support the
definition of column defaults, therefore Enterprise
Architect excludes the Default definition from all
generated DDL; however, it does highlight a Default
difference in the comparison logic
· Generally object names in DDL can be enclosed in square
brackets ([ ]) so that they can include spaces and other
non standard characters, however the CREATE VIEW
DDL statement does not support the square bracket
MySQL
· Comments can only be applied to Indexes and Unique
Constraints, when the MySQL version is greater than
5.5.3
· Comments can only be applied to Indexes and Unique
Constraints when they are created, therefore changing an
Index or Unique Constraint's comment causes the
constraint to be dropped and recreated
· Check Constraints are not supported; whilst the MySQL
DDL engine can parse such statements, it simply ignores
them
· Comments cannot be applied to (or changed in) Views,
Procedures or Functions, therefore Enterprise Architect
ignores these differences
Oracle
· Comments cannot be applied to (or changed in)
Procedures, Sequences or Functions, therefore Enterprise
Architect ignores these differences
PostgreSQL
· Currently Enterprise Architect does not support function
parameters, therefore any statements (COMMENT ON or
DROP) that refer to a function by name will fail because
they must use a combination of function name and
parameters
SQL Lite
· Constraints cannot be added to an existing Table; the
Table must be dropped and created (including the new
Constraint in the Create statement)
· Comments are not supported on any object type, therefore
Enterprise Architect ignores all remark differences
· Firebird
· MySQL v4, v5
· SQLite
· Informix (#)
· Ingres (#)
· InterBase (#)
· Sybase Adaptive Server Anywhere (Sybase ASA) (#)
· Sybase Adaptive Server Enterprise (Sybase ASE) (#)
Notes
· To perform data modeling for a particular DBMS, you
must have the appropriate data types for that DBMS in
your repository; you can download the most up-to-date
data definitions from the 'Resources' page of the Sparx
Systems web site
More Information
Edition Information
The Database Builder is available in the Corporate, Unified
and Ultimate Editions of Enterprise Architect.
Systems Engineering
Systems Engineering is, very broadly, the work of
researching, designing and managing complex physical or
electronic systems over their lifecycles. It focuses on the
whole system and typically involves a number of
sub-disciplines such as requirements, reliability, logistics,
design, testing and maintenance; it considers not only the
system itself but also processes, optimization and risk
management, and requires sophisticated project
management techniques.
In earlier decades a large but localized team might consider
a very specific set of objects within a very specific and
controlled environment, to be delivered to a small user base
and maintained by perhaps an, again, localized team of
experts who each might have responsibility for only a part
of the system. Even for such a controlled and structured
scenario, a huge volume of documentation was required to
define the system requirements, the components, the
engineering process, the standards applied and complied
with, and the tests to be run on the system. Keeping this
documentation cross-referenced, up to date and integrated
was a major task.
Getting Started
Getting started with a new tool is can be quite daunting even
for experienced engineers, but Enterprise Architect makes
this easy by providing a number of facilities to assist the
newcomer to the tool. Enterprise Architect is a large and
multi-featured application and the breadth of its coverage
might appear overwhelming to a person new to the program,
but fortunately a solution to this has been built into the
design. One of the main tool features is perspectives.
You can use Perspectives to limit the functionality to a
specific domain or language, such as System Engineering,
making it easy for a System Engineer or Manager to get
started. A user still can utilize other functionality that might
be useful, such as Strategic Modeling, Mind Mapping, Code
Engineering, and more, simply by changing Perspectives, all
without having to open a different tool. It is worth noting
that Perspectives exist for a wide range of modeling
disciplines that Enterprise Architect supports.
Setting a Perspective
Enterprise Architect is a tool packed with features for a wide
range of disciplines, methods, languages and frameworks.
Perspectives provide a way for a user to select a facet of the
tool that allows them to focus on a particular subset of the
tools features and facilities. The Systems Engineering
group of Perspectives provides a natural starting point for
Systems Engineers, but at any point if you decide to use
other facilities in the tool you can simply change
Perspectives and the tool will change to provide a focus on
the selected area.
Selecting a Workspace
Enterprise Architect has a helpful way of quickly changing
the User Interface layout to facilitate particular engineering
or management tasks or ways of working. This is achieved
by simply selecting a workspace that will change the visible
windows and tools to provide the most efficient working
Example Models
Transitioning from a document centric approach to a model
based systems engineering method can present some hurdles
for the newcomer. Fortunately Enterprise Architect has rich
and supportive help available and a series of in-tool
facilities such as patterns that will get you started with the
tool and project models. In this topic we present some
straight-forward examples of requirement, structural and
behavioral models and the diagrams that you or your
colleagues would create in a typical project.
Requirements Models
Requirements models are fundamental to any Systems
Engineering project whether be a greenfield project or a
change to an existing system. Requirements are typically
derived from a number of sources including meetings and
workshops with stakeholders, documents or formal and
formal requests from sponsors and other project
stakeholders. There are a three main types of requirements
including high level strategic or business requirements, user
requirements and system requirements often referred to as
quality attributes of the system.
Behavioral Models
A systems engineer can describe how the structural elements
of a model behave using a series of diagrams collectively
known as the Behavioral model. Structural elements exhibit
behavior in a running system, and a number of the structural
elements themselves have behavioral features such as
operations. The system modeling language specification
classifies the following diagrams as behavior. They are all
used to represent different aspects of a system's behavior,
from the Use Case that describes the behavior that is
Activity Diagram
Activity diagrams are flow-based models that describe a
system's behavior by articulating the flow of items,
including information and physical items that act as inputs
and outputs to activities and actions as the system performs
work.
Sequence Diagram
A modeler uses the sequence diagram to describe the way
messages flow between parts and properties of blocks. The
messages are sequenced and are typically implemented by
behaviors such as operations owned by the block.
Structural Models
A systems engineer can describe the structure of a system
using a series of diagrams that together form the structural
model. These diagrams and the elements and relationships
they contain, define the components of the system that are
bought to life by the behavioral models. The system
modeling language specification classifies the following
diagrams as structural. They are all used to represent
different aspects of a system's structure at a logical and
physical level, from the packages that organize the model to
parametric diagrams that define equations and their input
and output parameters.
Package Diagram
A complex system needs to be organized to ensure both
humans and other systems can understand, digest, and locate
items of interest in the model. Packages that appear in the
Browser window can also be placed onto diagrams and are
the primary element used to structure the model.
Parametric Diagram
A property's constraints are defined using parametric
diagrams that model engineering and mathematical
equations and their input and output paramters.
Requirements Models
Requirement Engineering is one of the most important
disciplines in the system lifecycle. When done well, it will
set the foundation for a successful project or program of
work, ultimately ensuring that engineering teams deliver
great value to the users and other stakeholders. Enterprise
Architect is a sophisticated and intuitive platform for
developing and managing Requirements gleaned from
modeling stakeholder statements, business cases, business
drivers, and capabilities to define detailed Functional and
Non-functional Requirements. The engineer can prioritize,
trace, and track requirements and record changes, baseline,
version, and record audits of changes. Engineers, managers,
consultants, and customers can work together in a
collaborative platform with role-based Security,
Discussions, a team Library, Model Mail, and a range of
other tools to encourage best practice and productivity,
either directly on the local system or through Pro Cloud
Services.
Requirements Diagram
A systems engineer uses a requirements diagram to create
and view Requirements and their relationships to other
elements, including other Requirements. You can specify
requirements at any level, from strategic enterprise or
business requirements through stakeholder requirements
down to low-level engineering and even software and
transition requirements. Requirements properties, including
their id and text, can be displayed or suppressed on a
diagram; the choice depends on the diagram's purpose and
its intended audience.
Requirements Discipline
Requirement development includes all the activities and
tasks associated with discovering, evaluating, recording,
documenting, and validating the requirements for an
engineering project or program of work. Requirements are
discovered, analyzed, specified, and verified, and Enterprise
Architect has a wide range of tools and features to assist the
requirement engineer as they develop requirements. The
Specification Manager is the centerpiece for requirement
development, allowing the Analyst to enter, view, and
manage requirements in textual form in a spreadsheet or
document-like view.
Requirements Tools
The Specification Manager is an easy-to-use tool providing
a spreadsheet or word processor view that you can use to
manage requirements or any other model element. It is
particularly beneficial when working with requirements that
have descriptive text to describe the requirement in detail.
An engineer can create new requirements with names and
detailed descriptions, and properties such as Status and
Priority can be added or changed from drop-down lists. You
can conveniently view and manage existing requirements
using other diagrams and windows - and changing them in
the Specification Manager will change them in all other
places in the repository.
DOORS Integration
The designers of Enterprise Architect understand that
customers may have existing or incumbent requirement
management tools that they use as part of a corporate or
engineering policy. To allow the full scope of modeling and
traceability, Enterprise Architect integrates with both the
legacy DOORS application and the newer DOOR Next
Generation tool, allowing you to view the DOORS
requirements inside the and trace to both up-process and
down-process elements thes requirements.
DOORS NG Integration
Using the Pro Cloud Server Jazz Plug-in integration, you
can manage various Rational tools, including the DOORS
Next Generation Requirement Management tool. This
allows you to push and pull requirements from any
configured DOORs project. The tools include:
Structural Models
The structural models contain the 'nouns' of the system and
define the structures or components of the system. Packages
are the primary element for structuring a model or
repository and act as containers or namespaces for other
elements and their features, including other packages. The
fundamental element of structure is the Block which can
contain both structural and behavior features and can be
used to model any logical or physical aspect of a system.
Blocks are typically created and viewed on Block Definition
Diagrams and also appear on Internal Block diagrams that
you use to describe the usage of the Block in a particular
context showing the parts that make up the Block.
Parametric diagrams are a specialized type of Internal Block
diagram used for modeling mathematics and physics
equations.
Behavioral Models
The behavioral models contain the 'verbs' of the system and
define how the system behaves from several different
viewpoints.
The Behavior diagrams communicate the behavior of the
system and demonstrate how the parts of a system work
together to satisfy behavioral requirements. Behavioral
models have a range of purposes. The engineer must
understand what part of the system's behavior they are
modeling and then choose the appropriate tool feature and
language construct to model this behavior. Systems
Engineers use SysML diagrams to model these behavioral
characteristics.:
· Use Case diagrams - used to narrow a system's scope and
simple technique.
Enterprise Architect provides a solution to this by including
a purpose-built tool called the scenario editor that the
engineer uses to create detailed descriptions of use cases,
including alternate and exception paths listing the steps
performed by the User and the system.
the elements.
Dynamic Simulation
Model Simulation brings your behavioral models to life with
instant, real-time behavioral model execution. Coupled with
tools to manage triggers, events, guards, effects, breakpoints
and Simulation variables, plus the ability to visually track
execution at run-time, the Simulator is a multi-featured
means of 'watching the wheels turn' and verifying the
correctness of your behavioral models. With Simulation you
can explore and test the dynamic behavior of models. In the
Corporate, Unified and Ultimate Editions, you can also use
JavaScript as a run-time execution language for evaluating
sequences
· Auto-fire trigger sets to simulate complex event histories
Simulations proceed
· Create and call COM objects during a Simulation to
Mathematical Simulations
Enterprise Architect provides a wide range of options for
introducing advanced mathematical tools and capabilities
into your simulations.
You can bring the power of integrated external tools such as
MATLAB into your models through the use of Solver
Classes, and can also export your models for execution in
other external tools such as MATLAB Simulink, Stateflow
and Simscape, or OpenModelica.
Enterprise Architect includes an extensive library of
mathematical functions within the JavaScript engine,
providing the benefits of a significantly expanded
Simulation capability.
Enterprise Architect also provides a wide range of Dynamic
Charts; without the need for external tools, you can
configure these Charts to extract and plot information from
Simulations that have been directly executed inside
Enterprise Architect.
Explore the:
· Solver classes in Enterprise Architect that call MATLAB
Project Management
Enterprise Architect has been built from the ground up with
the Project Manager in mind. Systems repositories are
valuable engineering assets and should be managed and
maintained accordingly. Any team can assign themselves as
a resource applied to an item performing particular roles,
and you can conveniently view these in a built-in Gantt
Chart. Risk can be modeled and managed in various
locations, and engineers can determine project effort with
built-in support for Metrics and Estimation. An Audit
function allows changes to be tracked at a fine-grained level,
and a Library facility and Element Reviews and Discussions
enable users to work collaboratively on models.
Kanban Diagrams
Engineers can utilize Kanban diagrams to manage parts or
all of an engineering project more agile and flexible. You
can assign resources to various elements from use cases to
deployment packages, and progress bars show each
resource's percentage completion for each item.
entire repository.
· Diagram Gantt View, which you use to display the
Change Management
Change is inevitable, and the best-run engineering projects
predict that change will occur and plan for it. As an
engineer, project, or product manager, you can use
Enterprise Architect to register a range of maintenance items
against any element in the project, including requirements,
blocks, activities, use cases, and packages. The
Maintenance items are defects, changes, issues, tasks,
features, and documents that apply at the model element
level. They are properties of individual model elements that
the engineer can use to record and capture problems,
changes, issues, and tasks as they arise and document the
solution and associated details.
Software Engineering
Create and Manage Effective and Productive Structural
and Behavioral Models of Software
Facilities
Facility Description
Getting Started
Configuration Settings
Example Diagram
An example diagram provides a visual introduction to the
topic and allows you to see some of the important elements
and connectors that you use to specify or describe classes
for the visualization of software and the forward and reverse
engineering to and from a wide range of programming
languages.
Integrated Development
In this topic you will learn how to use the fully featured
integrated development environment. You will learn how to
create structural and behavioral models of software artifacts
in a rich code editor, generate and reverse engineer code,
customize the way code is generated, run analyzer scripts to
optimize code, use the debugger and set units test and much
more.
Behavioral Models
Behavioral Models
In this topic you will learn how to generate code for
software, system and hardware description languages
directly from behavioral diagrams including: StateMachine,
Sequence and Activity Diagrams. This will add new
dimensions and precisions to the way you work with
software and engineering systems.
Grammar Framework
In this topic you will learn how to create a grammar to
convert an unsupported programming language into a UML
model. Enterprise Architect has built in support for a wide
range of programming languages but if you need to work
with an unsupported language you can use the Grammar
Framework to write your own parser. The grammar is used
to reverse engineer programming code in the form of text
and is the direct compliment of the Code Template
Framework which you would you to specify how a UML
model for an unsupported language is converted to code.
Example Diagram
Software diagrams allow you to model the structure and
behavior of software including User Interfaces. Enterprise
Architect has at its core fundamental support for modelling
software and the tool supports a wide range of programming
languages and paradigms. In the following diagram we see
classes used to model an online shop including Classes that
contain compartments for Attributes, Operations and
Properties. An Enumeration has also been used to model
Order Status.
Integrated Development
Features
Popular · C/ C++
Languages · Java
· Microsoft .NET family
· ADA
· Python
· Perl
· PHP
Feature Overview
Code Engineering with Enterprise Architect broadly
encompasses various processes for the design, generation
and transformation of code from your UML model.
Features
(WSDL)
XSD and WSDL support is critical for the
development of a complete Service
Oriented Architecture (SOA), and the
coupling of UML 2.5 and XML provides
the natural mechanism for implementing
XML-based SOA artifacts within an
organization.
Facilities
Facility Description
· Ada
· ArcGIS
· C
4.0)
· C++ (standard, plus .NET managed
C++ extensions)
· Delphi
Generics)
· JavaScript
· MFQL
· MySql
· PHP
· Python
· Teradata SQL
· Visual Basic
· WorkFlowScript
· VHDL
· Verilog
· SystemC
· Activity diagrams
· Generate a Package
Notes
· Most of the tools provided by Enterprise Architect for
code engineering and debugging are available in the
Professional and higher editions of Enterprise Architect;
Behavioral Code Generation is available in the Unified
and Ultimate Editions
· When security is enabled you require the access
permissions 'Generate Source Code and DDL' and
'Reverse Engineer from DDL and Source Code'
Interface)
· Create Inheritance connectors to parents and Associations
Ste Action
p
Ste Detail
p
Notes
· If any of the elements selected are not Classes or
interfaces the option to generate code is not available
Generate a Package
In addition to generating source code from single Classes
and groups of Classes, you can generate code from a
Package. This feature provides options to recursively
generate code from child Packages and automatically
generate directory structures based on the Package
hierarchy. This helps you to generate code for a whole
branch of your project model in one step.
Access
Keyboard Ctrl+Alt+K
Shortcuts
Ste Action
p
Option Action
file.
Access
Field/Button Action
AND
· There are differences between the
Notes
· Code synchronization does not change method bodies;
behavioral code cannot be synchronized, and code
generation only works when generating the entire file
· In the Corporate, Unified and Ultimate Editions of
Enterprise Architect, if security is enabled you must have
'Generate Source Code and DDL' permission to
Synchronize Items
Button Detail
Namespaces
Languages such as Java support Package structures or
namespaces. In Enterprise Architect you can specify a
Package as a namespace root, which denotes where the
namespace structure for your Class model starts; all
subordinate Packages below a namespace root will form the
namespace hierarchy for contained Classes and Interfaces.
To define a Package as a namespace root, click on the
Package in the Browser window and select the 'Develop >
Source Code > Options > Set as Namespace Root' ribbon
option. The Package icon in the Browser window changes to
show a colored corner indicating this Package is a
namespace root.
Notes
· When performing code generation, any Package name that
contains whitespace characters is automatically treated as
a namespace root
Copyright Ownership
Situations that typically lend themselves to reverse
engineering tend to operate on source code that:
· You have already developed
permission to use
· Is part of a framework that your organization uses
Language
Action Script
C#
C++
Delphi
Java
PHP
Python
Visual Basic
Notes
· Reverse Engineering is supported in the Professional,
Corporate, Unified and Ultimate Editions of Enterprise
Architect
· If security is enabled you must have 'Reverse Engineer
From DDL And Source Code' permission to reverse
engineer source code and synchronize model elements
against code
· Using Enterprise Architect, you can also import certain
types of binary file, such as Java .jar files and .NET PE
files
· Reverse Engineering of other languages is currently
available through the use of MDG Technologies listed on
(c) Sparx Systems 2022 Page 1443 of 2309
Modeling Domains 3 February, 2022
Import Projects
Enterprise Architect provides support for importing software
projects authored in Visual Studio, Mono, Eclipse and
NetBeans. Importing and working on projects in Enterprise
Architect has multiple benefits, not least the immediate
access to Enterprise Architect's renowned modeling tools
and management features, but also the access to
development tools such as simulation, debugging and
profiling.
Access
Import Options
When you select to import a Visual Studio or Mono
Solution, the 'Visual Studio Solution Import' dialog displays.
Complete the fields as directed in this table.
When you select to import an Eclipse or Netbeans solution,
the appropriate Wizard start screen displays. Work through
the screens as directed by the prompts on each screen.
Option Description
Ste Action
p
Notes
· When reverse engineering attributes with parameter
substitutions (templated attributes):
- If a Class with proper template parameter definitions
is found, an Association connector is
created and its parameter substitutions are configured
- An Association connector is also created if a
matching entry is defined as a Collection Class or
in the 'Additional Collection Classes' option (for C#,
C++ and Java); for an example, see Example
Use of Collection Classes
Language Notes
pointer declarations.
To import them into your model you
could create a typedef to define a
function pointer type, then declare
function pointers using that type; function
pointers declared in this way are imported
as attributes of the function pointer type.
Enterprise Architect does not expand
macros that have been used; these must
be added into the internal list of
Language Macros.
Access
Option Action
Resource ID Either:
· Leave the default value 'All' to import
Option Action
Notes
· New dialogs are exported to an existing .rc file
· In an export to an existing .rc file, no dialogs are ever
deleted from the file, even when they are deleted from the
model
· In an import, no dialogs are deleted from the model even
Access
Keyboard Ctrl+Shift+U
Shortcuts
Field Action
Access
Use
Currently the permitted types are:
· Java Archive (.jar)
Access
Facilities
Facility Description
of the results
· Show line numbers
Notes
· For most selected elements you can use the keys F12 or
Ctrl+E to view the source code.
· When you select an element to view source code, if the
element does not have a generation file (that is, code has
not been or cannot be generated, such as for a Use Case),
Enterprise Architect checks whether the element has a
Languages Supported
The Source Code Editors can display code in a wide range
of languages, as listed here. For each language, the editor
highlights - in colored text - the standard code syntax.
· Ada (.ada, .ads, .adb)
· ActionScript (.as)
· C# (.cs)
· Delphi/Pascal (.pas)
· HTML (.html)
· Java (.java)
· JavaScript (.javascript)
· JScript (.js)
· Python (.py)
Access
Actions
For each file type that you would prefer to open in
Enterprise Architect, click on the checkbox to the left of the
file type name. After selecting all of the document types you
require, click on the Save button.
After this, clicking on any corresponding file in Windows®
Explorer will open it in Enterprise Architect.
Notes
· You can change the default programs, or documents
handled by them, directly through the 'Default Programs'
option in Windows ® Control panel.
Compare Editors
Enterprise Architect provides four principal code editor
variants, available through a number of access paths. The
most direct access options are identified in these
descriptions.
The first three code editor variants listed have the same
display format, option toolbar, context menu options and
internal function keys. They differ in their method of access
and display mechanism.
Editor Variants
Variant Details
Internal Ctrl+Alt+O
Editor, 'Execute > Source > Edit > Open Source
External File' ribbon option
Source Code Description: Use this option if you intend
to edit external code, XML or DDL files
(that is, code not imported to or generated
in Enterprise Architect).
Displays an external browser, then opens
the specific selected code file as a tab of
the Diagram View (for C++, not two code
files); otherwise this is identical to the
F12 option.
External Ctrl+Alt+Y
Editor,
(c) Sparx Systems 2022 Page 1481 of 2309
Modeling Domains 3 February, 2022
Toolbar Options
· Language
· Syntax Highlighting Options
· Code Editor Options
· Code Engineering Options
· Code Editor Key Bindings
Notes
· The 'Record Macro' option disables Intelli-sense while the
macro is being recorded
· You can assign key strokes to execute the macro, instead
of using the toolbar drop-down and 'Open Macro' dialog
Access
Options
window toolbar
· 'Search in Files' - Search for the
selected text string in all associated
files (closed or open), and display the
results of the search in the Find in Files
window; you can refine and refresh the
search by specifying criteria on the
Find in Files window toolbar (shortcut
key: F12)
· 'Search in Model' - Perform an
'Element Name' search in the Model
Search facility, and display the results
on the Model Search tab
· 'Search in Scripts' - (Available while
working in the Script Editor) Open the
Find in Files window, set the 'Search
Path' field to 'Search in Scripts' and the
'Search Text' field to the selected text,
then search all scripts for the text string
and display the results of the search;
you can refine and refresh the search
by specifying criteria on the Find in
Files window toolbar
· 'EA User Guide' - Display the
description of the code item in the
Enterprise Architect User Guide
· 'Google' - Display the results of a
Google search on the text
· 'MSDN' - Display the results of a
· Tracepoint
Notes
· The options in the lower half of the 'Search for <string>'
Ste Action
p
1 (If you want to depict the Use Case and its link to the
method in a diagram) click on the diagram name in
the Browser window.
· Bookmarks
· Cursor History
· Brace Matching
· Automatic Indentation
· Commenting Selections
· Scope Guides
· Zooming
· Line Selection
· Intelli-sense
· Find in Files
Function Details
Function Description
operation
You can navigate to an earlier point in the
cursor history by pressing Ctrl+-, and to a
later point by pressing Ctrl+Shift+-.
· Ctrl+keypad -
Intelli-sense
Intelli-sense is a feature that provides choices of code items
and values as you type. Not all code editors use
Intelli-sense; for example, Intelli-sense is disabled while you
record a macro in the Source Code Viewer.
Intelli-sense provides you with context-based assistance
through autocompletion lists, calltips and mouseover
information.
Facilities
Facility Description
Access
controls
In each instance, the 'Find what' field is
populated with the text currently selected
in the editor. If no text is selected in the
editor, the 'Find what' field is populated
with the word at the current cursor
position. If no word exists at the current
cursor position, the last searched-for term
is used.
Command Action
Option Action
Concepts
Concept Description
but not bt
If a single character metasequence is
preceded by a backslash (\) it is treated as
a literal character: c\(at\) matches c(at) as
the brackets are treated literally.
When the 'Use Regular Expressions'
checkbox is selected, a metasequence
helper menu is available to the right of
both of the 'Find what' and 'Replace with'
fields; selecting a metasequence from this
menu inserts the metasequence into the
field, replacing or wrapping the currently
selected text as appropriate.
Search in Files
File Text Searches are provided by the Find in Files window
and from within the Code Editors, to search files for data
names and structures. These files can be external code files,
code files that you have already opened in Enterprise
Architect, internal model scripts or the Help subsystem.
The 'File Search' tab maintains a history of the file paths you
have explored, helping you to quickly return to
frequently-used folders in your file system. You can
similarly select a previously-used search string, if you need
to repeat a search several times. When you are searching
code files, you can also confine the search to files of specific
types, by selecting the file extensions, and to include just the
selected folder or all of its sub-folders as well. Another
useful facility is being able to select to show the results of
the search as either a list of every instance of the string, or a
list of files containing the string with the instances grouped
under the file in which they are found.
For all searches, you can qualify the search to be
case-sensitive and/or to match the search string to complete
words.
Access
Search Toolbar
You can use the toolbar options in the Find in Files window
to control the search operation. The state of each button
persists over time to always reflect your previous search
criteria.
Options
Option Action
Find File
The Find in Files window 'Find File' tab provides a tool that
can help you find files quicker. The tab acts as a file system
explorer and offers a speedy alternative to the common open
file dialog. File searches are quick and simple, allowing you
to look up files of interest without losing your current
workflow. The display can be switched between report and
list view.
Access
Keyboard Ctrl+Shift+Alt+F
Shortcuts
Toolbar
The toolbar provides a search filter and folder navigation
combo box. The toolbar provides options to remember
search locations and alternate between list and report views.
Options
files.
Keyboard Shortcuts
Search Intelli-sense
The Intelli-sense capabilities of Enterprise Architect are
built using Sparx Systems' Code Miner tool. The Code
Miner provides fast and comprehensive access to the
information in an existing code base. The system provides
complete access to all aspects of the original source code,
either 'on the fly' as one might search in a code editor, or as
search results produced by queries written in the Code
Miner mFQL language.
Access
On the Find in Files window, click on the 'Code Miner' tab.
Keyboard Ctrl+Shift+Alt+F
Shortcuts
The 'Result' panel is a tree control that lists the results of the
query grouped by file.
File Search
· Queries can be coded to assist with complex search
criteria
· Queries can take multiple parameters
· All files are indexed based on equivalent UML constructs,
allowing intelligent searches producing meaningful results
in a modeling setting
Keys
Key Description
character
ge Down
Shift+Insert Paste
Ctrl+keypad( Zoom in
+)
Ctrl+Z Undo
Ctrl+Y Redo
Ctrl+V Paste
F2 Go to next bookmark
Notes
· In addition to these keys, you can assign (Ctrl+Alt+<n>)
key combinations to macros that you define within the
Source Code Editor
· Java programs
Access
Generate Models
Option Action
application.
at this path, or
· Edit the path to the compiler location
Notes
· If required, you can publish custom application Patterns
by adding files to the AppPatterns directory where
Enterprise Architect is installed; top level directories are
Behavioral Models
Ste Action
p
Notes
· Software code generation from behavioral models is
available in the Unified and Ultimate Editions of
Enterprise Architect
· Hardware code generation from StateMachine models is
available in the Unified and Ultimate Editions of
Enterprise Architect
· For C(OO), on the 'C Specifications' page of the 'Manage
Project Options' dialog, set the 'Object Oriented Support'
option to True.
See the C Options - Model Help topic.
· To be able to generate code from behavioral models, all
Actions
Action Description
Notes
· To be able to generate code from behavioral models, all
behavioral constructs should be contained within a Class
Actions
Action Description
Notes
· To be able to generate code from behavioral models, all
behavioral constructs should be contained within a Class
· For an Interaction (Sequence) diagram, the behavioral
code generation engine expects the Sequence diagram and
all its associated messages and interaction fragments to be
encapsulated within an Interaction element
Prerequisites
· Select 'Settings > Model > Options > Source Code
Engineering' and, for the appropriate software coding
language (Java, C, C# or ANSI C++), set the 'Use the new
Statemachine Template' option to 'True'
· If working in C++, select 'Settings > Model > Options >
Access
Drag an Executable StateMachine Artifact from the
'Simulation' page of the Diagram Toolbox, onto your
diagram. The 'Simulation' page of the Diagram Toolbox can
be accessed using any of the methods outlined in this table.
Ste Action
p
Ste Action
p
Ste Action
· C/C++
VC_HOME C:\Program Files (x86)\Microsoft
Visual Studio 9.0
· C#
CS_HOME
C:\Windows\Microsoft.NET\Framework\V3.5
%BROADCAST_EVENT("event2")%
Ste Action
p
Notes
· If you are making small changes to an existing
StateMachine model, you can combine the code
generation, build and run operations by selecting the
'Simulate > Executable States > Statemachine > Generate,
build and run' ribbon option
· You can also generate code in JavaScript
Access
Display the 'Manage Project Options' dialog, then show the
'Language Specifications' page for your chosen language,
using one of the methods outlined in this table. If necessary,
expand the 'StateMachine Engineering (for current model)'
grouping and set the 'Use the new StateMachine Template'
option to True (to use the later templates) or False (to use
the Legacy templates).
Notes
· To be able to generate code from behavioral models, all
behavioral constructs should be contained within a Class
}
private enum CommandType
{
Do,
Entry,
Exit
}
private StateType currState;
private StateType nextState;
private TransitionType currTransition;
private boolean transcend;
private StateType ProcessOrder_history;
private void processOrder_Delivered(CommandType
command)
{
switch(command)
{
case Do:
{
// Do Behaviors..
setStatus(Delivered);
// State's Transitions
if((status==Delivered))
{
nextState = StateType.ProcessOrder_Closed;
currTransition =
TransitionType.ProcessOrder_Delivered_to_ProcessOrder_
Closed;
}
break;
}
default:
{
break;
}
}
}
private void processOrder_Packed(CommandType
command)
{
switch(command)
{
case Do:
{
// Do Behaviors..
setStatus(Packed);
// State's Transitions
nextState =
StateType.ProcessOrder_Dispatched;
break;
}
default:
{
break;
}
}
}
private void processOrder_Closed(CommandType
command)
{
switch(command)
{
case Do:
{
// Do Behaviors..
// State's Transitions
break;
}
default:
{
break;
}
}
}
private void processOrder_Dispatched(CommandType
command)
{
switch(command)
{
case Do:
{
// Do Behaviors..
setStatus(Dispatched);
// State's Transitions
nextState = StateType.ProcessOrder_Delivered;
break;
}
default:
{
break;
}
}
}
private void processOrder_New(CommandType
command)
{
switch(command)
{
case Do:
{
// Do Behaviors..
setStatus(new);
// State's Transitions
nextState = StateType.ProcessOrder_Packed;
break;
}
default:
{
break;
}
}
}
private void StatesProc(StateType currState,
CommandType command)
{
switch(currState)
{
case ProcessOrder_Delivered:
{
processOrder_Delivered(command);
break;
}
case ProcessOrder_Packed:
{
processOrder_Packed(command);
break;
}
case ProcessOrder_Closed:
{
processOrder_Closed(command);
break;
}
case ProcessOrder_Dispatched:
{
processOrder_Dispatched(command);
break;
}
case ProcessOrder_New:
{
processOrder_New(command);
break;
}
default:
break;
}
}
private void TransitionsProc(TransitionType transition)
{
switch(transition)
{
case
ProcessOrder_Delivered_to_ProcessOrder_Closed:
{
setStatus(closed);
break;
}
default:
break;
}
}
private void initalizeStateMachine()
{
currState = StateType.ProcessOrder_New;
nextState = StateType.ST_NOSTATE;
currTransition =
TransitionType.TT_NOTRANSITION;
}
private void runStateMachine()
{
while (true)
{
if (currState == StateType.ST_NOSTATE)
{
break;
}
currTransition =
TransitionType.TT_NOTRANSITION;
StatesProc(currState, CommandType.Do);
// then check if there is any valid transition
assigned after the do behavior
if (nextState == StateType.ST_NOSTATE)
{
break;
}
if (currTransition !=
TransitionType.TT_NOTRANSITION)
{
TransitionsProc(currTransition);
}
if (currState != nextState)
{
StatesProc(currState, CommandType.Exit);
StatesProc(nextState, CommandType.Entry);
currState = nextState;
}
}
}
Operations
Operation Description
Notes
· To be able to generate code from behavioral models, all
behavioral constructs should be contained within a Class
· The current code generation engine supports only one
clock Trigger for a component
Access
Ribbon Design > Diagram > Add > Type > User
Interface Win32
Support
The MDG Win32® User Interface Technology is available
in the Enterprise Architect Professional, Corporate, Unified
and Ultimate editions
Default technology
You can set the MDG Win32® UI Technology as the active
default technology to access the Toolbox pages directly.
Modeling UI Dialogs
The Win32 User Interface MDG Technology provides the
tools to help you design a user interface that closely
emulates the visual style and available options for Windows
dialogs.
Win32 Dialog
These user interface components are supported, each
matching the equivalent-named RC resource.
Component Details
Access
In the Browser window, click on the target Package.
Access
Access
Click on the win32Dialog element.
Keyboard F11
Shortcuts
The UI Toolbox
All of the common RC elements can be found on the UI
toolbox
Note
· You can copy and paste dialog Packages
Features Description
ICONIX
The ICONIX process is a proprietary software development
methodology based on UML. The process is Use Case
driven and uses UML-based diagrams to define four
milestones. The main feature of the process is a concept
called robustness modeling, based on the early work of Ivar
Jacobson, which helps bridge the gap between analysis and
design.
This text is derived from the ICONIX entry in the online
Wikipedia:
'The ICONIX Process is a minimalist, streamlined approach
to Use Case driven UML modeling that uses a core subset of
UML diagrams and techniques to provide thorough
coverage of object-oriented analysis and design. Its main
activity is robustness analysis, a method for bridging the gap
between analysis and design. Robustness analysis reduces
the ambiguity in use case descriptions, by ensuring that they
are written in the context of an accompanying domain
model. This process makes the use cases much easier to
design, test and estimate.'
The ICONIX Process was developed by Doug Rosenberg;
for more information on ICONIX, refer to ICONIX
Software Engineering Inc.
Aspects
Aspect Detail
Configuration Settings
You can set the default code options such as the editors for
each of the programming languages available for Enterprise
Architect and special options for how source code is
generated or reverse engineered. These options are defined
according to whether they apply to:
· All users of the current model, set on the 'Manage Project
Options' dialog, or
· All models that you access (other users can define their
Model-Specific Options
These options are defined on the 'Manage Project Options'
dialog.
Access
Types of Option
User-Specific Options
These options are defined on the 'Preferences' dialog.
Access
On the 'Preferences' dialog, click on 'Source Code
Engineering' in the left-hand list.
Preferences
Keyboard Ctrl+F9
Shortcuts
Types of Option
Access
Option Action
Notes
· It is worthwhile to configure these settings, as they serve
as the defaults for all Classes in the model; you can
override most of these on a per-Class basis using the
custom settings (from the 'Code Generation' dialog)
Access
Option Action
Notes
· You can transport these import component types between
models, using the 'Settings > Model > Transfer > Export
Reference Data' and 'Import Reference Data' ribbon
options
Access
On the 'Preferences' dialog, select the 'Source Code
Engineering' option
Keyboard Ctrl+F9
Shortcuts
Field Action
members unspecified.
where
association
direction is
'Unspecified'
suffixes.
Notes
· It is worthwhile to configure these settings, as they serve
as the defaults for all Classes in the model; you can
override most of these on a per-Class basis using the
custom settings (from the 'Code Generation' dialog)
Access
On the 'Preferences' dialog, select the 'Source Code
Engineering > Code Editors' option.
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
Access
In the 'Preferences' dialog, select the 'Source Code
Engineering | Code Editors' option and click on the
button next to 'Syntax Highlighting Options'.
Options
Panel Description
Notes
(c) Sparx Systems 2022 Page 1620 of 2309
Modeling Domains 3 February, 2022
Access
Options
Option Action
Options - Attribute/Operations
Your use of attributes and operations can be configured in a
number of ways. You can set options to:
· Delete model attributes not included in the code during
reverse synchronization
· Delete model methods not included in the code during
reverse synchronization
· Delete code from features contained in the model during
forward synchronization
· Delete model associations and aggregations that
Access
On the 'Preferences' dialog, select the 'Source Code
Engineering > Attribute/Operations' option.
Keyboard Ctrl+F9
Shortcuts
Options
Field Action
in code model.
Modeling Conventions
Supported Languages
Language
Action Script
C#
C++
Delphi
Java
PHP
Python
Visual Basic
Notes
· C - Package (~)
ActionScript Conventions
Enterprise Architect supports round trip engineering of
ActionScript 2 and 3, where these conventions are used.
Stereotypes
Stereotype Applies To
literal Operation
Corresponds To: A literal method
referred to by a variable.
Tagged Values
Tag Applies To
Common Conventions
· Package qualifiers (ActionScript 2) and Packages
(ActionScript 3) are generated when the current Package
is not a namespace root
· An unspecified type is modeled as 'var' or an empty 'Type'
field
ActionScript 3 Conventions
· The Is Leaf property of a Class corresponds to the sealed
keyword
· If a namespace tag is specified it overrides the Scope that
is specified
Stereotypes
Stereotype Applies To
adaPackage Class
Corresponds To: A Package specification
in Ada 2012 without a tagged record.
adaProcedure Class
Corresponds To: A procedure
specification in Ada 2012.
delegate Operation
Corresponds To: Access to a subprogram.
Tagged Values
Tag Applies To
IsAccess Parameter
Corresponds To: Determination of
whether the parameter is an access
variable.
Other Conventions
· Appropriate type of source files: Ada specification file,
.ads
· Ada 2012 imports Packages defined as either
<<adaPackage>> Class or Class, based on the settings in
the Ada 2012 options
· A Package in the Ada specification file is imported as a
Class if it contains a Tagged Record, the name of which is
-- Public Functions
function MyPublicFunction (P: HelloWorld)
return String;
procedure MyPublicFunction (P1: in out
HelloWorld; AFlag: Boolean);
private
-- Private Functions
Notes
· Ada 2012 support is available in the Unified and Ultimate
Editions of Enterprise Architect
C Conventions
Enterprise Architect supports round trip engineering of C,
where these conventions are used:
Stereotype
Stereotype Applies To
Tagged Values
Tag Applies To
bitfield Attribute
Corresponds To: The size, in bits,
allowed for storage of this attribute.
bodyLocation Operation
Corresponds To: The location the method
body is generated to; expected values are
header, classDec or classBody.
typeSynonym Class
UML C Code
Notes
· Separate conventions apply to Object Oriented
programming in C
Stereotypes
Stereotype Applies To
enumeration Class
Corresponds To: An enumerated type.
struct Class
Corresponds To: A 'struct' type.
typedef Class
Corresponds To: A 'typedef' statement,
where the parent is the original type
name.
union Class
Corresponds To: A union type.
Tagged Values
Tag Applies To
bodyLocation Operation
Corresponds To: The location the method
body is generated to; expected values are
'header', 'classDec' or 'classBody'.
define Attribute
Corresponds To: '#define' statement.
in C
· No scope mapping for an attribute: an attribute in a UML
Class is mapped to a structure variable in C code, and its
scope (private, protected or public) is ignored
· Currently an inner Class is ignored: if a UML Class is the
inner Class of another UML Class, it is ignored when
generating C code
· Initial value is ignored: the initial value of an attribute in a
UML Class is ignored in generated C code
C# Conventions
Enterprise Architect supports the round trip engineering of
C#, where these conventions are used.
Stereotypes
Stereotype Applies To
enumeration Class
Corresponds To: An enumerated type.
event Operation
Corresponds To: An event.
extension Operation
Corresponds To: A Class extension
method, represented in code by a 'this'
parameter in the signature.
indexer Operation
Corresponds To: A property acting as an
index for this Class.
partial Operation
Corresponds To: The 'partial' keyword on
an operation.
property Operation
Corresponds To: A property possibly
containing both read and write code.
record Class
Corresponds To: A 'record' type.
struct Class
Corresponds To: A 'struct' type.
Tagged Values
Tag Applies To
const Attribute
Corresponds To: The const keyword.
delegate Operation
Corresponds To: The 'delegate' keyword.
extern Operation
Corresponds To: The 'extern' keyword.
fixed Attribute
Corresponds To: The 'fixed' keyword.
generic Operation
Corresponds To: The generic parameters
for this operation.
Implements Operation
Corresponds To: The name of the method
this implements, including the interface
name.
ImplementsE Operation
xplicit Corresponds To: The presence of the
source interface name in this method
declaration.
initializer Operation
override Operation
Corresponds To: The 'override' keyword.
params Parameter
Corresponds To: A parameter list using
the 'params' keyword.
record PositionalParameters
Corresponds To: The position parameter
in the record definition
sealed Operation
Corresponds To: The 'sealed' keyword.
static Class
Corresponds To: The 'static' keyword.
virtual Operation
Corresponds To: The 'virtual' keyword.
Other Conventions
· Namespaces are generated for each Package below a
namespace root
· The Const property of an attribute corresponds to the
readonly keyword, while the tag const corresponds to the
const keyword
C++ Conventions
Enterprise Architect supports round trip engineering of C++,
including the Managed C++ and C++/CLI extensions, where
these conventions are used.
Stereotypes
Stereotype Applies To
enumeration Class
Corresponds To: An enumerated type.
friend Operation
Corresponds To: The 'friend' keyword.
struct Class
Corresponds To: A 'struct' type.
typedef Class
alias Class
Corresponds to an 'Alias' declaration,
where the parent is the original type
name.
union Class
Corresponds To: A union type.
Tagged Values
Tag Applies To
afx_msg Operation
Corresponds To: The afx_msg keyword.
bitfield Attribute
Corresponds To: The size, in bits,
allowed for storage of this attribute.
bodyLocation Operation
Corresponds To: The location the method
body is generated to; expected values are
header, classDec or classBody.
callback Operation
Corresponds To: A reference to the
CALLBACK macro.
explicit Operation
Corresponds To: The 'explicit' keyword.
initializer Operation
Corresponds To: A constructor
initialization list.
mutable Attribute
Corresponds To: The 'mutable' keyword.
throws Operation
Corresponds To: The exceptions that are
thrown by this method.
typeSynonym Class
s Corresponds To: The 'typedef' name
and/or fields of this type.
volatile Operation
Corresponds To: The 'volatile' keyword.
Other Conventions
· Namespaces are generated for each Package below a
namespace root
· By Reference attributes correspond to a pointer to the type
specified
· The Transient property of an attribute corresponds to the
volatile keyword
· The Abstract property of an attribute corresponds to the
virtual keyword
· The Const property of an operation corresponds to the
const keyword, specifying a constant return type
· The Is Query property of an operation corresponds to the
const keyword, specifying the method doesn't modify any
fields
· The Pure property of an operation corresponds to a pure
virtual method using the "= 0" syntax
· The Fixed property of a parameter corresponds to the
const keyword
Stereotypes
Stereotype Applies To
property Operation
Corresponds To: The '__property'
keyword.
reference Class
Corresponds To: The '__gc' keyword.
value Class
Corresponds To: The '__value' keyword.
Tagged Values
Tag Applies To
Other Conventions
· The typedef and anonymous tags from native C++ are not
supported
· The Pure property of an operation corresponds to the
keyword __abstract
C++/CLI Conventions
These conventions are used for modeling C++/CLI
extensions to C++. In order to set the system to generate
managed C++/CLI you must modify the C++ version in the
C++ Options.
Stereotypes
Stereotype Applies To
event Operation
Description: Defines an event to provide
access to the event handler for this Class.
reference Class
Description: Corresponds to the 'ref class'
or 'ref struct' keyword.
value Class
Description: Corresponds to the 'value
class' or 'value struct' keyword.
Tagged Values
Tag Applies To
generic Operation
Description: Defines the generic
parameters for this Operation.
initonly Attribute
Description: Corresponds to the 'initonly'
keyword.
literal Attribute
Description: Corresponds to the literal
keyword.
Other Conventions
· The typedef and anonymous tags are not used
· The property get/property set stereotypes are not used
· The Pure property of an operation corresponds to the
keyword abstract
Delphi Conventions
Enterprise Architect supports round trip engineering of
Delphi, where these conventions are used:
Stereotypes
Stereotype Applies To
constructor Operation
Corresponds To: A constructor.
destructor Operation
Corresponds To: A destructor.
enumeration Class
Corresponds To: An enumerated type.
metaclass Class
Corresponds To: A metaclass type.
object Class
Corresponds To: An object type.
operator Operation
Corresponds To: An operator.
struct Class
Corresponds To: A record type.
Tagged Values
Tag Applies To
overload Operation
Corresponds To: The 'overload' keyword.
override Operation
Corresponds To: The 'override' keyword.
packed Class
Corresponds To: The 'packed' keyword.
property Class
Corresponds To: A property; see Delphi
Properties for more information.
reintroduce Operation
Corresponds To: The 'reintroduce'
keyword.
Other Conventions
· The Static property of an attribute or operation
corresponds to the 'class' keyword
· The Fixed property of a parameter corresponds to the
'const' keyword
· The value of inout for the Kind property of a parameter
corresponds to the 'Var' keyword
· The value of out for the Kind property of a parameter
corresponds to the 'Out' keyword
Java Conventions
Enterprise Architect supports round trip engineering of Java
- including AspectJ extensions - where these conventions
are used.
Stereotypes
Stereotype Applies To
annotation Interface
Corresponds To: An annotation type.
CompactCon Operation
structor Corresponds to: A compact canonical
constructor for the record.
record Class
Corresponds To: A record type.
default Operation
Corresponds To: The 'default' keyword.
enumeration Class
Corresponds To: An enumerated type.
operator Operation
Corresponds To: An operator.
Tagged Values
Tag Applies To
annotations Anything
Corresponds To: The annotations on the
current code feature.
generic Operation
Corresponds To: The generic parameters
to this operation.
parameterList Parameter
Corresponds To: A parameter list with
the ... syntax.
RecordHeade <<record>>Class
r Corresponds To: The record header of the
record definition.
throws Operation
Corresponds To: The exceptions that are
thrown by this method.
transient Attribute
Corresponds To: The 'transient' keyword.
Other Conventions
· Package statements are generated when the current
Package is not a namespace root
· The Const property of an attribute or operation
corresponds to the final keyword
· The Transient property of an attribute corresponds to the
volatile keyword
· The Fixed property of a parameter corresponds to the final
keyword
AspectJ Conventions
These are the conventions used for supporting AspectJ
extensions to Java.
Stereotypes
Stereotype Applies To
advice Operation
Corresponds To: A piece of advice in an
AspectJ aspect.
aspect Class
Corresponds To: An AspectJ aspect.
pointcut Operation
Corresponds To: A 'pointcut' in an
AspectJ aspect.
Tagged Values
Tag Applies To
Other Conventions
· The specifications of a pointcut are included in the
'Behavior' field of the method
PHP Conventions
Enterprise Architect supports the round trip engineering of
PHP 4 and 5, where these conventions are used.
Stereotypes
Stereotype Applies To
trait Class
Corresponds To: A 'trait'.
Tagged Values
Tag Applies To
e property set
Corresponds To: The name of the
variable behind this property.
Common Conventions
· An unspecified type is modeled as var
· Methods returning a reference are generated by setting the
Return Type to var*
· Reference parameters are generated from parameters with
the parameter Kind set to inout or out
PHP 5 Conventions
· The final Class modifier corresponds to the Is Leaf
property
· The abstract Class modifier corresponds to the Abstract
property
· Parameter type hinting is supported by setting the Type of
a parameter
Python Conventions
Enterprise Architect supports the round trip engineering of
Python, where these conventions are used.
Tagged Values
Tag Applies To
async Operation
Corresponds To: The "async" keyword in
function definition.
Other Conventions
· Model members with Private Scope correspond to code
members with two leading underscores
· Attributes are only generated when the Initial value is not
empty
· All types are reverse engineered as var
SystemC Conventions
Enterprise Architect supports round-trip engineering of
SystemC, where these conventions are used.
Stereotypes
Stereotype Applies To
delegate Method
Corresponds To: A delegate.
friend Method
Corresponds To: A friend method.
property Method
Corresponds To: A property definition.
sc_ctor Method
Corresponds To: A SystemC constructor.
sc_module Class
Corresponds To: A SystemC module.
sc_port Attribute
Corresponds To: A port.
sc_signal Attribute
Corresponds To: A signal.
Tagged Values
Tag Applies To
overrides Method
Corresponds To: The Inheritance list of a
method declaration.
throw Method
Corresponds To: The exception
specification of a method.
Other Conventions
· SystemC also inherits most of the stereotypes and Tagged
Values of C++
SystemC Module
Action: Defines a SystemC Module.
An sc_module -stereotyped Class
element.
SystemC Port
Features Action: Defines a SystemC Port.
Access
VB.NET Conventions
Enterprise Architect supports round-trip engineering of
Visual Basic.NET, where these conventions are used.
Earlier versions of Visual Basic are supported as a different
language.
Stereotypes
Stereotype Applies To
event Operation
Corresponds To: An event declaration.
import Operation
Corresponds To: An operation to be
imported from another library.
module Class
Corresponds To: A module.
operator Operation
Corresponds To: An operator overload
definition.
partial Operation
property Operation
Corresponds To: A property possibly
containing both read and write code.
Tagged Values
Tag Applies To
delegate Operation
Handles Operation
Corresponds To: The 'handles' clause on
this operation.
Implements Operation
Corresponds To: The 'implements' clause
on this operation.
MustOverrid Operation
e Corresponds To: The 'MustOverride'
keyword.
NotOverridea Operation
ble Corresponds To: The 'NotOverrideable'
keyword.
Overloads Operation
Corresponds To: The 'overloads'
keyword.
Overrides Operation
Corresponds To: The 'overrides' keyword.
parameterArr Parameter
ay Corresponds To: A parameter list using
the 'ParamArray' keyword.
Shared Attribute
Corresponds To: The 'Shared' keyword.
Other Conventions
· Namespaces are generated for each Package below a
namespace root
· The Is Leaf property of a Class corresponds to the
NotInheritable keyword
· The Abstract property of a Class corresponds to the
MustInherit keyword
· The Static property of an attribute or operation
corresponds to the Shared keyword
· The Abstract property of an operation corresponds to the
MustOverride keyword
· The value of in for the Kind property of a parameter
corresponds to the ByVal keyword
· The value of inout or out for the Kind property of a
parameter corresponds to the ByRef keyword
Verilog Conventions
Enterprise Architect supports round-trip engineering of
Verilog, where these conventions are used.
Stereotypes
Stereotype Applies To
asynchronous Method
Corresponds To: A concurrent process.
initializer Method
Corresponds To: An initializer process.
module Class
Corresponds To: A module.
part Attribute
Corresponds To: A component
instantiation.
port Attribute
synchronous Method
Corresponds To: A sequential process.
Tagged Values
Tag Applies To
sensitivity Method
Corresponds To: The sensitivity list of a
sequential process.
type Attribute
Corresponds To: The range or type value
of an attribute.
asynchronous-stereotyped method
· Sequential - A
synchronous-stereotyped method
· Initializer - An initializer-stereotyped
method
VHDL Conventions
Enterprise Architect supports round-trip engineering of
VHDL, where these conventions are used.
Stereotypes
Stereotype Applies To
architecture Class
Corresponds To: An architecture.
asynchronous Method
Corresponds To: An asynchronous
process.
configuration Method
Corresponds To: A configuration.
entity Interface
Corresponds To: An entity.
part Attribute
port Attribute
Corresponds To: A port.
signal Attribute
Corresponds To: A signal declaration.
synchronous Method
Corresponds To: A synchronous process.
Tagged Values
Tag Applies To
a generic interface.
Access
To model a VHDL design, drag icons from the VHDL
toolbox pages and drop them on your diagram.
Item Action
Item Action
asynchronous-stereotyped method
· Sequential - A
synchronous-stereotyped method
· Configuration - An
configuration-stereotyped method
Stereotypes
Stereotype Applies To
global Attribute
Corresponds To: The 'Global' keyword.
import Operation
Corresponds To: An operation to be
imported from another library.
Tagged Values
Tag Applies To
New Attribute
Corresponds To: The 'new' keyword.
Other Conventions
· The value of in for the Kind property of a parameter
corresponds to the ByVal keyword
· The value of inout or out for the Kind property of a
parameter corresponds to the ByRef keyword
Language Options
You can set up various options for how Enterprise Architect
handles a particular language when generating and
reverse-engineering code. These options are either specific
to:
· Your user ID, for all models or
Access
Languages Supported
Language
Action Script
ArcGIS
ANSI C
C#
C++
Delphi
Java
PHP
Python
SystemC
Visual Basic
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
Notes
· These options apply to all models that you access
or AS3.0)
· Specify default file extensions
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
locate
· Specify whether the engine should create a reference type
(default is Ref)
· Specify the reference parameter of a Reference / Access
type
· Tell the engine to ignore the name of the reference
parameter
· Indicate the name of the reference parameter to locate
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
Notes
· Ada 2012 support is available in the Unified and Ultimate
Editions of Enterprise Architect
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
· Ada 2012 support is available in the Unified and Ultimate
Editions of Enterprise Architect
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
C Options - User
If you intend to generate C code from your model, you can
configure the code generation options using the 'C
Specifications' page of the 'Preferences' dialog.
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
(fixed as int)
· Whether a #define constant is imported
C Options - Model
If you intend to generate C code from your model, you can
configure the model-specific code generation options using
the 'C Specifications' page of the 'Manage Project Options'
dialog to:
· Specify default file extensions (header and source)
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
C# Options - User
If you intend to generate C# code from your model, you can
configure the code generation options using the 'C#
Specifications' page of the 'Preferences' dialog
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
button)
C# Options - Model
If you intend to generate C# code from your model, you can
configure the model-specific code generation options using
the 'C# Specifications' page of the 'Manage Project Options'
dialog to:
· Specify the default file extension
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
specified by reference
· Specify the default file extensions
connectors
· Define additional Collection Classes - to define custom
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
code
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
Delphi Properties
Enterprise Architect has comprehensive support for Delphi
properties. These are implemented as Tagged Values, with a
specialized property editor to help create and modify Class
properties. By using the 'Feature Visibility' element context
menu option, you can display the 'tags' compartment that
contains the properties. Imported Delphi Classes with
properties have this feature automatically made visible for
your convenience.
Notes
· When you use the 'Create Property' dialog from the
'Attribute' screen, the system generates a pair of Get and
Set functions together with the required property
definition as Tagged Values; you can manually edit these
Tagged Values if required
· Public properties are displayed with a '+' symbol prefix
and published with a '^'
· When creating a property in the 'Create Property
Implementation' dialog (accessed through the 'Attributes'
dialog), you can set the scope to 'Published' if the property
type is Delphi
· Only 'Public' and 'Published' are supported
· If you change the name of a property and forward
engineer, a new property is added, but you must manually
delete the old one from the source file
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
button)
connectors
· Define additional Collection Classes - to define custom
Access
Options
Option Action
Classes
Notes
· These options affect all users of the current model;
however, they do not apply to other models
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
code
· Specify the default editor to use when editing PHP code
Access
Options
Option Action
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
code
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
import
· Define the default editor to use for editing source code
Access
Keyboard Ctrl+F9
Shortcuts
Options
Option Action
connectors
Access
Options
Option Action
Notes
· These options affect all users of the current model;
however, they do not apply to other models
Access
Keyboard Ctrl+F9
Shortcuts
Options
Field Action
Notes
· These options are set in the technology inside the
<CodeOptions> tag of a code module, as shown:
<CodeOption
name="DefaultExtension">.rb</CodeOption>
Reset Options
Enterprise Architect stores some of the options for a Class
when it is first created. Some are global; for example,
$LinkClass is stored when you first create the Class, so in
existing Classes the global change in the 'Preferences' dialog
will not automatically be picked up. You must modify the
options for the existing Class.
Ste Action
p
Ste Action
p
Package
Tasks
Task Detail
roles
· The ordered Collection Class to use for
1..* roles
· The qualified Collection Class to use
become Vector<foo>).
Conversely, when reverse engineering, an
Association connector is also created if a
matching entry (for example, foo if foo is
found in the model) is defined as a
Collection Class.
class Class1
{
public:
Class1();
virtual ~Class1();
CMap<CString,LPCTSTR,Class3*,Class3*> att;
Vector<Class2> *att1;
TemplatedClass<class1,class2> *att2;
CList<Class4> *att3;
};
class Class2
{
public:
Class2();
virtual ~Class2();
};
class Class3
{
public:
Class3();
virtual ~Class3();
};
class Class4
{
public:
Class4();
virtual ~Class4();
};
template<class TParam1, class TParam2>
class TemplatedClass
{
public:
TemplatedClass() {
}
virtual ~TemplatedClass() {
}
};
Local Paths
When a team of developers are working on the same
Enterprise Architect model, each developer might store their
version of the source code in their local file system, but not
always at the same location as their fellow developers. To
manage this scenario in Enterprise Architect, you can define
local paths for each user, on the 'Local Paths' dialog.
You can use local paths in generating code and reverse
engineering, and in Version Control, developing XML
schemas and generating document and web reports.
Local paths might take a little time to set up, but if you want
to work collaboratively on source and model concurrently,
the effort is well worth while.
For example, if:
· Developer A stores her .java files in a C:\Java\Source
JAVA_SOURCE ="D:\Source"
Now, Enterprise Architect stores all java files in these
directories as:
%JAVA_SOURCE%\<filename>
On each developer's machine, the filename is expanded to
the correct local version.
Access
Access
Options
Option Action
Notes
· You can also set up a hyperlink (for an Enterprise
Architect command) on a diagram to access the 'Local
Paths' dialog, to switch, update or expand your current
local path
· If the act of expanding or applying a path for a linked file
will create a duplicate record, the process will skip that
record and display a message at the end of the process
Language Macros
When reverse engineering a language such as C++, you
might find preprocessor directives scattered throughout the
code. This can make code management easier, but can
hamper parsing of the underlying C++ language.
To help remedy this, you can include any number of macro
definitions, which are ignored during the parsing phase of
the reverse engineering. It is still preferable, if you have the
facility, to preprocess the code using the appropriate
compiler first; this way, complex macro definitions and
defines are expanded out and can be readily parsed. If you
don't have this facility, then this option provides a
convenient substitute.
Access
Define a macro
Ste Action
p
Function Macros
RTTI_EMULATION()
Enterprise Architect skips over the token including
everything inside the parentheses.
Function Macros can also include the function body:
RTTI_EMULATION() {}
In this case, Enterprise Architect skips over the token
including everything inside the parentheses and inside the
braces. Note that if the Function Macro includes the
Notes
· You can transport these language macro (or preprocessor
macro) definitions between models, using the 'Settings >
Model > Transfer > Export Reference Data' and 'Import
Reference Data' options; the macros are exported as a
Macro List
Access
Keyboard Ctrl+Shift+P
Shortcuts
Ste Description
new language
· Behavioral Code generation (if this is appropriate)
model
· Synchronization during code generation so that
Transformation
· Generate DDL in database modeling
CTF Templates
Template Detail
Type
Features
Feature Detail
Access
Application of Templates
Action Detail
Base Templates
The Code Template Framework consists of a number of
base templates. Each base template transforms particular
aspects of the UML to corresponding parts of
object-oriented languages.
The base templates form a hierarchy, which varies slightly
across different programming languages. In a typical
template hierarchy relevant to a language such as C# or Java
(which do not have header files) the templates can be
modeled as Classes, but usually are just plain text. This
hierarchy would be slightly more complicated for languages
such as C++ and Delphi, which have separate
implementation templates.
Each of the base templates must be specialized to be of use
in code engineering; in particular, each template is
specialized for the supported languages (or 'products'). For
example, there is a ClassBody template defined for C++,
another for C#, another for Java, and so on; by specializing
the templates, you can tailor the code generated for the
corresponding UML entity.
Once the base templates are specialized for a given
language, they can be further specialized based on:
· A Class's stereotype, or
operation or attribute)
This type of specialization enables, for example, a C#
operation that is stereotyped as «property» to have a
(c) Sparx Systems 2022 Page 1814 of 2309
Modeling Domains 3 February, 2022
Template Description
Declaration
operations.
Template Description
members.
Access
Ste Action
Access
Ste Action
p
Transformation templates.
Synchronize Code
Enterprise Architect uses code templates during the forward
synchronization of these programming languages:
· ActionScript
· C
· C++
· C#
· Delphi
· Java
· PHP
· Python
· VB
· VB.Net
· Attribute Notes
· Operation Notes
· Operation Body
· Inner Classes
· Operations
namespace, or
· If the 'Generate Namespaces' option is set to False in the
Access
Keyboard Ctrl+Shift+P
Shortcuts
Options
Option Action
Notes
· User-modified and user-defined Code Templates can be
imported and exported as reference data (see the Sharing
Reference Data topic); the templates defined for each
language are indicated in the 'Export Reference Data'
dialog by the language name with the suffix
_Code_Templates - if no templates exist for a language,
there is no entry for the language in the dialog
Options
Option Action
Note:
All templates of type "<none>" are treated as functions,
therefore Enterprise Architect will automatically remove all
space characters entered into the Name.
Syntax Elements
Elements Detail
· Variables
· Macros
Literal Text
All text within a given template that is not part of a macro or
a variable definition/reference, is considered literal text.
With the exception of blank lines, which are ignored, literal
text is directly substituted from the template into the
generated code.
Consider this excerpt from the Java Class Declaration
template:
$bases = "Base"
class % className % $bases
On the final line, the word 'class ', including the subsequent
space, would be treated as literal text and thus for a Class
named 'foo' would return the output:
class fooBase
A blank line following the variable $bases would have no
effect on the output.
Notes
String conjunction operators (“+”, “+=”) are not required
but can be used
Variables
Template variables provide a convenient way of storing and
retrieving data within a template. This section explains how
variables are defined and referenced.
Variable Definitions
Variable definitions take the basic form:
$<name> = <value>
where <name> can be any alpha-numeric sequence and
<value> is derived from a macro or another variable.
A simple example definition would be:
$foo = %className%
Variables can be defined using values from:
· Substitution, function or list macros
· Variable references
Definition Rules
These rules apply to variable definitions:
· Variables have global scope within the template in which
Examples
Using a substitution macro:
$foo = %opTag:"bar"%
Using a literal string:
$foo = "bar"
Using another variable:
$foo = $bar
Using a list macro:
$ops = %list="Operation" @separator="\n\n"
@indent="\t"%
Using the addition-assignment operator (+=):
$body += %list="Operation" @separator="\n\n"
@indent="\t"%
Variable References
Variable values can be retrieved by using a reference of the
form:
$<name>
where <name> can be a previously defined variable.
Variable references can be used:
· As part of a macro, such as the argument to a function
macro
· As a term in a variable definition
output
It is legal to reference a variable before it is defined. In this
case, the variable is assumed to contain an empty string
value: ""
Macros
Macros provide access to element fields within the UML
model and are also used to structure the generated output.
All macros are enclosed within percent (%) signs, as shown:
%<macroname>%
In general, macros (including the % delimiters) are
substituted for literal text in the output. For example,
consider this item from the Class Declaration template:
... class %className% ...
The field substitution macro, %className%, would result in
the current Class name being substituted in the output. So if
the Class being generated was named Foo, the output would
be:
... class Foo ...
The CTF contains a number of types of macro:
· Template Substitution Macros
· Substitution Examples
· Class
· ClassBase
· ClassBody
· ClassBodyImpl
· ClassDeclaration
· ClassDeclarationImpl
· ClassImpl
· ClassInherits
· ClassInterface
· ClassNotes
· ClassParameter
· File
· FileImpl
· ImportSection
· ImportSectionImpl
· InnerClass
· InnerClassImpl
· LinkedAttribute
· LinkedAttributeDeclaration
· LinkedAttributeNotes
· LinkedClassBase
· LinkedClassInterface
· Namespace
· NamespaceBody
· NamespaceDeclaration
· NamespaceImpl
· Operation
· OperationBody
· OperationBodyImpl
· OperationDeclaration
· OperationDeclarationImpl
· OperationImpl
· OperationNotes
· Parameter
· Classes
· Attributes
· Operations, and
· Parameters
Project Macros
Substitution Examples
Field substitution macros can be used in one of two ways:
· Direct Substitution or
· Conditional Substitution
Direct Substitution
This form directly substitutes the corresponding value of the
element in scope into the output.
Structure: %<macroName>%
Where <macroName> can be any of the macros listed in the
Field Substitution Macros tables.
Examples
· %className%
· %opName%
· %attName%
Conditional Substitution
This form of the macro enables alternative substitutions to
optional
· <text> is a string representing a possible value for the
macro
· <subTrue> and <subFalse> can be a combination of
Examples
· %classAbstract=="T" ? "pure" :""%
· %opStereotype=="operator" ? "operator" :""%
· %opStereotype=="operator" ? "operator"%
also be omitted.
· %paramDefault ? " = " value : ""%
Notes
· In a conditional substitution macro, any white space
following <macroName> is ignored; if white space is
required in the output, it should be included within the
quoted substitution strings
Attribute Macros
Class Macros
Directory
etPrefix
Connector Macros
· connectorDestElemAuthor
(classAuthor)
attribute's containment
· connectorDestFeatureType="Attribute"
or "Operation"
· connectorSourceElemAuthor
(classAuthor)
Operation's Code
· connectorSourceFeatureInitial -
Attribute's Initial
Constraint Macros
Effort Macros
File Macros
· Association
· Attribute classifier
· Method return type
· Method parameter classifier
· Generalization
· Realization (to interface)
· Template Binding (C++)
· Dependency
otherwise.
Link Macros
Multiplicity.
Metric Macros
operation.
Package Macros
Parameter Macros
Problem Macros
Requirement Macros
riority
Resource Macros
Risk Macros
Scenario Macros
· Conditional Substitution
Direct Substitution
This form of the macro directly substitutes the value of the
named tag into the output.
Structure: %<macroName>:"<tagName>"%
<macroName> can be one of:
· attTag
· classTag
· connectorDestElemTag
· connectorDestTag
· connectorSourceElemTag
· connectorSourceTag
· connectorTag
· linkAttTag
· linkTag
· opTag
· packageTag
· paramTag
Example
%opTag:"attribute"%
Conditional Substitution
This form of the macro mimics the conditional substitution
defined for field substitution macros.
Structure: %<macroName>:"<tagName>" (== "<test>") ?
<subTrue> (: <subFalse>) %
Note:
· <macroName> and <tagName> are as defined here
macro
· <subTrue> and <subFalse> can be a combination of
Examples
%opTag:"opInline" ? "inline" : ""%
%opTag:"opInline" ? "inline"%
%classTag:"unsafe" == "true" ? "unsafe" : ""%
%classTag:"unsafe" == "true" ? "unsafe"%
Tagged Value macros use the same naming convention as
field substitution macros.
Test Macros
Function Macros
Function macros are a convenient way of manipulating and
formatting various element data items. Each function macro
returns a result string. There are two primary ways to use the
results of function macros:
· Direct substitution of the returned string into the output,
signs
· Variable references
· Numeric literals
CONVERT_SCOPE([umlScope])
For use with supported languages, to convert [umlScope] to
the appropriate scope keyword for the language being
generated. This table shows the conversion of [umlScope]
with respect to the given language.
Language Conversions
COLLECTION_CLASS([language])
Gives the appropriate collection Class for the language
specified for the current linked attribute.
CSTYLE_COMMENT([wrap_length])
DELPHI_PROPERTIES([scope], [separator],
[indent])
Generates a Delphi property.
DELPHI_COMMENT([wrap_length])
Converts the notes for the element currently in scope to
Delphi comments.
FIND([src], [subString])
Position of the first instance of [subString] in [src]; -1 if
none.
GET_ALIGNMENT()
Returns a string where all of the text on the current line of
output is converted into spaces and tabs.
JAVADOC_COMMENT([wrap_length])
Converts the notes for the element currently in scope to
javadoc -style comments.
LEFT([src], [count])
The first [count] characters of [src].
LENGTH([src])
Length of [src]. Returns a string.
· Subtraction (x-y)
· $b = %MATH_SUB(10,3)%
· $c = %MATH_MULT(2,3)%
· $d = %MATH_ADD($a,$b)%
· $e = %MATH_SUB($b,$c)%
· $f = %MATH_MULT($a,$b)%
· $g = %MATH_MULT($a,10)%
· $h = %MATH_MULT(10,$b)%
· b = 10 - 3 = $b
· c = 2 * 3 = $c
· d = a + b = $d
· e = b - c = $e
· f = a * b = $f
· g = a * 10 = $g
· h = 10 * b = $h
· b = 10 - 3 = 7
· c = 2 * 3 = 6
· d = a + b = 14
· e = b - c = 1
· f = a * b = 49
· g = a * 10 = 70
· h = 10 * b = 70
· "\t "
· “ “
· “”
template line
Multiple pairs of options are allowed in one call. An
example of the situation where this would used is where one
keyword is always on a new line, as illustrated here:
%PI=" "%
%classAbstract ? "abstract"%
PROCESS_END_OBJECT([template_name])
Enables the Classes that are one Class further away from the
base Class, to be transformed into objects (such as
attributes, operations, Packages, parameters and columns) of
the base Class. [template_name] refers to the working
template that temporarily stores the data.
REMOVE_DUPLICATES([source], [separator])
Where [source] is a [separator] separated list; this removes
any duplicate or empty strings.
RESOLVE_OP_NAME()
Resolves clashes in interface names where two method-from
interfaces have the same name.
RESOLVE_QUALIFIED_TYPE()
RESOLVE_QUALIFIED_TYPE([separator])
RESOLVE_QUALIFIED_TYPE([separator],
[default])
Generates a qualified type for the current attribute, linked
attribute, linked parent, operation, or parameter. Enables the
specification of a separator other than. and a default value
for when some value is required.
RIGHT([src], [count])
The last [count] characters of [src].
TO_LOWER([string])
Converts [string] to lower case.
TO_UPPER([string])
Converts [string] to upper case.
TRIM_LEFT([string]) TRIM_LEFT([string],
[trimChars])
Removes the specified leading characters from <string>.
TRIM_RIGHT([string]) TRIM_RIGHT([string],
[trimChars])
Removes the specified trailing characters from <string>.
VB_COMMENT([wrap_length])
Converts the notes for the element currently in scope to
Visual Basic style comments.
WRAP_COMMENT([comment],
[wrap_length], [indent], [start_string])
Wraps the text [comment] at width [wrap_length] putting
[indent] and [start_string] at the beginning of each line.
$behavior = %WRAP_COMMENT(opBehavior, "40", "
", "//")%
<wrap_length> must still be passed as a string, even though
WRAP_COMMENT treats this parameter as an integer.
WRAP_LINES([text], [wrap_length],
[start_string] {, [end_string] })
Wraps [text] as designated to be [wrap_length], adding
XML_COMMENT([wrap_length])
Converts the notes for the element currently in scope to
XML-style comments.
Control Macros
Control macros are used to control the processing and
formatting of the templates. The basic types of control
macro include:
· The list macro, for generating multiple element features,
List Macro
If you need to loop or iterate through a set of Objects that
are contained within or are under the current object, you can
do so using the %list macro. This macro performs an
iterative pass on all the objects in the scope of the current
template, and calls another template to process each one.
The basic structure is:
%list=<TemplateName> @separator=<string>
@indent=<string> (<conditions>) %
where <string> is a double-quoted literal string and
<TemplateName> can be one of these template names:
· Attribute
· AttributeImpl
· Class
· ClassBase
· ClassImpl
· ClassInitializer
· ClassInterface
· Constraint
· InnerClass
· InnerClassImpl
· LinkedFile
· Metric
· Namespace
· Operation
· OperationImpl
· Parameter
· Problem
· Requirement
· Resource
· Risk
· Scenario
· Test
Example
In a Class transform, the Class might contain multiple
attributes; this example calls the Attribute transform and
outputs the result of processing the transform for each
attribute of the Class in scope. The resultant list separates its
items with a single new line and indents them two spaces
respectively. If the Class in scope had any stereotyped
attributes, they would be generated using the appropriately
specialized template.
%list="Attribute" @separator="\n" @indent=" "%
Special Cases
There are some special cases to consider when using the
%list macro:
· If the Attribute template is used as an argument to the
Branching Macros
Branching macros provide if-then-else constructs. The CTF
supports a limited form of branching through these macros:
· if
· elseIf
· else
· endIf
· !=
signs
· a variable reference
string format.
Branches can be nested, and multiple conditions can be
specified using one of:
· and, or
· or
Example 1
%if elemType == "Interface"%
;
%else%
%OperationBody%
%endIf%
In this case:
· If the elemType is "Interface" a semi-colon is returned
Example 2
$bases="ClassBase"
$interfaces=""%
%if $bases !="" and $interfaces !=""%
: $bases, $interfaces
%elseIf $bases !=""%
: $bases
%elseIf $interfaces !=""%
: $interfaces
%endIf%
In this case the text returned is ':ClassBase'.
Synchronization Macros
The synchronization macros are used to provide formatting
hints to Enterprise Architect when inserting new sections
into the source code, during forward synchronization. The
values for synchronization macros must be set in the File
templates.
The structure for setting synchronization macros is:
%<name>=<value>%
where <name> can be one of the macros listed here and
<value> is a literal string enclosed by double quotes.
Synchronization Macros
· "\t" - Tab
· "" - Null
% endIf %
% if attConst == "T" %
Const
% endIf %
On transforming this, attscope returns the VB keyword
'Private' and attConst returns 'Const' on the same line spaced
by a single space (fitting the earlier VB Class.Attribute
definition example).
Alternatively, when generating a Class you might want the
Class declaration, the notes and Class body all separated by
double lines. In this case the %PI is set to '/n/n' to return
double line spacing:
% PI = "\n\n" %
% ClassDeclaration %
% ClassNotes %
% ClassBody %
PI Characteristics
· Blank lines have no effect on the output
· Any line that has a macro that produces an empty result
does not result in a PI separator (space/new line)
· The last entry does not return a PI; for example,
%Classbody% does not have a double line added after the
body
StmContextStateMachineEnum
StmStateMachineEnum
StmContextStateEnum
StmAllStateEnum
StmContextTransitionEnum
StmTransitionEnum
StmContextEntryEnum
StmAllEntryEnum
StmContextStateMachineStringToEnum
StmStateMachineStringToEnum
StmContextStateEnumToString
StmStateEnumToString
StmContextTransitionEnumToString
StmTransitionEnumToString
StmContextStateNameToGuid
StmStateNameToGuid
StmContextTransitionNameToGuid
StmTransitionNameToGuid
StmContextDefinition
StmStateMachineEnum
StmAllStateEnum
StmTransitionEnum
StmAllEntryEnum
StmAllRegionVariableInitialize
StmStateWithDeferredEvent
StmDeferredEvent
StmTransitionProcMapping
StmTransitionProc
StmTransitionExit
StmTransitionEntry
StmTargetOutgoingTransition
StmTargetParentSubmachineState
StmStateProcMapping
StmStateProc
StmStateEntry
StmOutgoingTransition
StmConnectionPointReferenceEntry
StmParameterizedInitial
StmSubMachineInitial
StmRegionInitial
StmRegionDeactive
StmStateExitProc
StmStateTransition
StmStateEvent
StmStateTriggeredTransition
StmStateCompletionTransition
StmStateIncomingTransition
StmStateOutgoingTransition
StmSubmachineStateExitEvent
StmVertexOutgoingTransition
StmConnectionPointReferenceExitEvent
StmStateExitEvent
StmVertexOutgoingTransition
StmAllRegionVariable
StmStateMachineStringToEnum
StmStateMachineRun
StmStateInitialData
StmStateMachineEntry
StmOutgoingTransition
StmStateMachineRunInitial
StmStateMachineInitial
StmStateMachineRuns
StmContextManager
StmSimulationManager
StmContextInstanceDeclaration
StmContextInstance
StmContextVariableRunstate
StmContextInstanceAssociation
StmContextInstanceClear
StmEventProxy
StmSignalEnum
StmContextJoinEventEnum
StmJoinEventEnum
StmEventEnum
StmSignalDefinition
StmSignalAttributeAssignment
StmSignalAttribute
StmSignalInitialize
StmEventStringToEnum
StmEventEnumToString
StmEventNameToGuid
StmConsoleManager
StmContextInstanceDeclaration
StmContextInstance
StmContextVariableRunstate
StmContextInstanceAssociation
StmContextInstanceClear
StmStateMachineStrongToEnum
StmInitialForTransition
StmVertextOutgoingTransition
StmSendEvent
StmBroadcastEvent
StmContextRef
me asterisks removed.
Context
stmContextV
ariableName
stmContextV
ariableRunsta
teName
stmContextV
ariableRunsta
teValue
StateMachine
Region
stmRegionIni
tial
Transition
stmTransition
SourceVariab
le
stmTransition
TargetVariab
le
stmTransition
FQVariable
stmTargetInit
ialTransition
stmSourcePar
entStateEnu
m
stmTargetPar
entStateEnu
m
stmTargetSu
bmachineEnu
m
stmTargetRe
gionIndex
stmHistoryO
wningRegion
InitialTransiti
on
stmDefaultHi
storyTransiti
on
stmConnectio
nPointRefere
nceEntryCou
nt
stmParameter
izedInitialCo
unt
stmInitialCou
ntForTransiti
on
stmStateHas
ChildrenToJo
in
stmStateIsTra
nsitionTarget
stmThisIsSou
rce
stmThisIsSou
rceState
stmStateCont
ainerMatchTr
ansitionConta
iner
stmVertexRe
gionIndex
stmVertexCo
ntainerVariab
le
stmVertexPar
entEnum
stmStateHas
UnGuardedC
ompletionTra
nsition
stmStateEven
tHasUnGuard
edTransition
stmInitialTra
nsition
Instance Association
stmSourceIns
tanceName
stmTargetInst
anceName
stmSourceRo
leName
stmTargetRol
eName
· EASL_GET
· EASLList and
· EASL_END
EASL_INIT
The EASL_INIT macro is used to initialize an EASL
behavior model. The behavior model code generation is
dependent on this model.
Aspect Description
Syntax %EASL_INIT(<<GUID>>)%
where:
· <<GUID>> is the GUID of the Object
EASL_GET
(c) Sparx Systems 2022 Page 1970 of 2309
Modeling Domains 3 February, 2022
the collection
· "IndexOf", then <<Owner ID>> is the
ID of a collection and <<Name>> is
the ID of the item in the collection; it
will retrieve the index (string format)
of the item within the collection
EASLList
The EASLList macro is used to render each object in an
EASL collection using the appropriate template.
Aspect Description
Syntax $result =
%EASLList=<<TemplateName>>
@separator=<<Separator>>
@indent=<<indent>>
@owner=<<OwnedID>>
@collection=<<CollectionName>>
@option1=<<OPTION1>>
@option2=<<OPTION2>>.........
@optionN=<<OPTIONN>>%
where:
· <<TemplateName>> is the name of
as “\n”)
· <<indent>> is any indentation to be
EASL_END
The EASL_END macro is used to release the EASL
behavior model.
Aspect Description
Syntax %EASL_END%
· Action Switch
· Behavior
· Behavior Body
· Behavior Declaration
· Behavior Parameter
· Call Argument
· Decision Action
· Decision Condition
· Decision Logic
· Decision Table
· Guard
· Property Declaration
· Property Notes
· Property Object
· State
· State CallBack
· State Enumerate
· State EnumeratedName
· StateMachine
· StateMachine HistoryVar
· Transition
· Transition Effect
· Trigger
EASL Collections
This topic lists the EASL collections for each of the EASL
objects, as retrieved by the EASL Code Generation Macros
code generation macro.
Action
Collection Description
Name
Behavior
Collection Description
Name
Classifier
Collection Description
Name
TimedTrigge
(c) Sparx Systems 2022 Page 1977 of 2309
Modeling Domains 3 February, 2022
Construct
Collection Description
Name
Node
Collection Description
Name
State
Collection Description
Name
StateMachine
Collection Description
Name
Transition
Collection Description
Name
Trigger
Collection Description
Name
Vertex
Collection Description
Name
EASL Properties
This topic lists the EASL properties for each of the EASL
objects, as retrieved by the EASL Code Generation Macros
code generation macro.
Action
Property Description
Name
Argument
Property Description
Name
Behavior
Property
(c) Sparx Systems 2022 Page 1984 of 2309
Modeling Domains 3 February, 2022
Name Description
CallEvent
Property Description
Name
ChangeEvent
(c) Sparx Systems 2022 Page 1985 of 2309
Modeling Domains 3 February, 2022
Property Description
Name
Classifier
Property Description
Name
Condition
Property Description
Name
Construct
Property Description
Name
Edge
Property Description
Name
EventObject
Property Description
Name
Instance
Property Description
Name
Parameter
Property Description
Name
Primitive
Property Description
Name
PropertyObject
Property Description
Name
SignalEvent
Property Description
Name
State
Property Description
Name
StateMachine
Property Description
Name
TimeEvent
Property Description
Name
Transition
Property Description
Name
Trigger
Property Description
Name
Vertex
Property Description
Name
Examples
A call statement returning a parameter to a variable:
$sSource = %StateEnumeratedName($Source)%
A call statement to a template that has parameters:
%RuleTask($GUID, $index)%
Using the $parameter statement in the called template:
$GUID = $parameter1
$index = $parameter2
Templates support recursive calls, such as this recursive call
on the template RuleTask:
$GUID = $parameter1
$index = $parameter2
% PI = "" %
$nul = "Initialize condition and action object"
$count = %BR_GET("RuletCount")%
% if $count == "" or $count == $index %
%ComputeRulet($GUID)%
\n
% endTemplate %
%Rulet($index)%
\n
$index = %MATH_ADD($index, "1")%
%RuleTask($GUID, $index)%
Access
Templates Editor
Ste Description
p
Type>__<Template Name>.
Note the double underscore character between the
template type and template name.
Notes
· For a custom language, you must define the File template
so that it can call the Import Section, Namespace and
Class templates, and any other templates that you decide
are applicable
Access
Keyboard Ctrl+Shift+P
Shortcuts
Ste Description
p
Access
Keyboard Ctrl+Shift+P
Shortcuts
Ste Description
p
Notes
· Class and feature stereotypes can be combined to provide
a further level of specialization for features; for example,
if properties should be generated differently when the
Class has a stereotype MyStereotype, then both property
and MyStereotype should be specified in the New
Template Override dialog
Access
Keyboard Ctrl+Shift+P
Shortcuts
Reference
Grammar Framework
Enterprise Architect provides reverse engineering support
for a number of popular programming languages. However,
if the language you are using is not supported, you can write
your own grammar for it, using the in-built Grammar Editor.
You can then incorporate the grammar into an MDG
Technology to provide both reverse engineering and code
synchronization support for your target language.
The framework for writing a grammar and importing it into
Enterprise Architect is the direct complement to the Code
Template Framework. While code templates are for
converting a model to a textual form, grammars are required
to convert text to a model. Both are required to synchronize
changes into your source files.
An example language source file and an example Grammar
for that language are provided in the Code Samples
directory, which you can access from your installation
directory (the default location is C:\Program Files\Sparx
Systems\EA). Two other grammar files are also provided,
illustrating specific aspects of developing Grammars.
Components
Component Description
Grammar Syntax
Grammars define how a text is to be broken up into a
structure, which is exactly what is needed when you are
converting code into a UML representation. At the simplest
level, a grammar is just instructions for breaking up an input
to form a structure. Enterprise Architect uses a variation of
Backus–Naur Form (BNF) to express a grammar in a way
that allows it to convert the text to a UML representation.
What the grammar from Enterprise Architect offers over a
pure BNF is the addition of processing instructions, which
allow structured information to be returned from the parsed
results in the form of an Abstract Syntax Tree (AST). At the
completion of the AST, Enterprise Architect will process it
to produce a UML model.
Syntax
Syntax Detail
"morning";
Grammar Instructions
Instructions specify the key details of how the grammar
works. They are generally included at the top of the
grammar, and resemble function calls in most programming
languages.
Instructions
Instruction Description
caseInsensiti
ve()
keywords.
Grammar Rules
Rules are run to break up text into structure. A rule is made
up of one or more definitions, each of which is made up of
one or more terms.
Types of Rule
Rule Description
Grammar Terms
Terms identify where tokens are consumed.
Types of Term
Type Description
Grammar Commands
Commands, like Instructions, resemble function calls. They
serve two main purposes:
· To process tokens in a specific way or
Commands
Command Description
argument.
This command produces the AST node
attributes that Enterprise Architect
operates on in code engineering.
AST Nodes
In defining a grammar, you would use AST nodes and AST
node attributes that can be recognized in code engineering in
Enterprise Architect, in the AST results that are returned by
the attribute, attributeEx and node commands. The nodes
and attributes are identified in these tables. Any others will
be ignored in code engineering.
FILE Node
The FILE node represents a file. It isn't mapped to anything,
but contains all the required information.
Multiplicity / Description
Nodes
PACKAGE node
The PACKAGE node corresponds to a namespace or
equivalent in the file. When importing with 'package per
namespace', Enterprise Architect will create a Package
directly under the import for this and place all Classes
within it. When not importing namespaces, Enterprise
Architect will look for Classes under this point, but it will
do nothing with this node.
Additionally, if you are generating with namespaces enabled
(see the Code Options topics for generic languages) a
generated Class will not match a Class in code unless they
are under the same Package structure.
(c) Sparx Systems 2022 Page 2026 of 2309
Modeling Domains 3 February, 2022
CLASS/INTERFACE Node
The CLASS (or INTERFACE) node is the most important in
code generation. It is brought in as Class (or Interface)
Objects.
See Class DECLARATION and Class BODY.
Contained in Nodes: FILE, PACKAGE, Class BODY
CLASS Declaration
Contained in Nodes: CLASS/INTERFACE
Multiplicity / Description
Nodes
SCOPE Node
This is an optional feature for languages resembling C++
that have Blocks that specify the scope of elements. The
METHOD Node
Contained in Nodes: Class BODY, SCOPE
Multiplicity / Description
Nodes
Multiplicity / Description
Nodes
ABSTRACT Abstract.
ATTRIBUTE Node
Contained in Nodes: Class BODY, SCOPE
Multiplicity / Description
Nodes
FIELD Node
A field corresponds to multiple attribute declarations in one.
Anything not defined in the Declarators but defined in the
field itself will be set for each declarator. Everything
supported in an attribute is supported in the field. If no
declarators are found then this works in the same way as an
attribute.
Contained in Nodes: Class BODY, SCOPE
Multiplicity / Description
Nodes
PARAMETER Node
Contained in Nodes: Method DECLARATION,
TEMPLATE
Multiplicity / Description
Nodes
NAME Node
Contained in Nodes: PACKAGE, Class DECLARATION
Multiplicity / Description
Nodes
TYPE Node
Contained in Nodes: Method DECLARATION,
ATTRIBUTE, PARAMETER
Multiplicity / Description
Nodes
TEMPLATE Node
Contained in Nodes: TYPE
Multiplicity / Description
Nodes
1 / NAME
PARENT Node
Contained in Nodes: Class DECLARATION
Multiplicity / Description
Nodes
TAG Node
Contained in Nodes: Class DECLARATION, Method
DECLARATION, ATTRIBUTE, PARAMETER
Multiplicity / Description
Nodes
DESCRIPTION Node
Contained in Nodes: Class DECLARATION, Method
DECLARATION, ATTRIBUTE, PARAMETER
Multiplicity / Description
Nodes
Editing Grammars
If you need to write and edit a grammar for code imported in
a new programming language, you can do so using the
built-in Grammar Editor.
Access
Field/Button Action
Field/Button Action
Access
Toolbar Options
Option Action
Access
Toolbar Options
Option Action
Notes
· Because profiling can take a very long time for large files,
the 'Profile Results' tab is not filled if you are not
displaying that tab when you begin parsing
Macro Editor
The macro editor allows a user to supplement the grammar
with a list of keywords and rules to exclude macros during
grammar parse operations. The macro definition list is
particularly useful when developing grammars for languages
that support macros such as C++. It avoids the necessity of
describing these rules in the grammar itself, and can be used
with multiple grammars.
This feature is available from Enterprise Architect Release
14.1.
Access
Editing Macros
Example Grammars
The Code Samples directory set up by the Enterprise
Architect installer contains an example Grammar that you
can load into the Grammar editor to review, and into the
Grammar Debugger to parse and profile.
The Grammar example consists of two files:
· test.ssl - a simple sample language source file, in the style
of C, and
· ssl.nbnf - a grammar for the simple sample language
· Creation of a Package
· Creation of an attribute
· Importing comments
CSV files
Code Analyzer
Access
on your machine.
database.
Once you have completed these steps, you are ready to
begin writing and running queries in the Code Analyzer.
(c) Sparx Systems 2022 Page 2058 of 2309
Modeling Domains 3 February, 2022
Language
In this field, you specify the language used in the source
code from which this Code Miner database is being built.
Available languages are: C++, C#, Java, XML,
MDGTechnology and Custom.
Macro List
When the language selected is 'C++', the 'Macro List'
selection field is displayed . For C++, the success and depth
of information compiled into the database can be
inextricably linked to the use of macros. This field can be
used to select an nBNF macro file that will be used as an
auxiliary grammar component for the compilation.
By default the macro file will default to the macro file in the
Enterprise Architect installation folder. You are free to
modify or extend the content of this file to suit your
requirements - for example, when you need to correct errors
reported in the compilation log file.
Grammar
Sparx Systems has developed grammars for all of the
languages listed in the drop-down selection list; C++, C#,
Java, XML and also MDGTechnology. For these languages
a built-in grammar file is used.
There is also an option to select a 'Custom' language. When
'Custom' is selected, the 'Grammar' field is displayed. This
field is used to specify a file containing the grammar for
your custom language. The Code Miner will then use that
Connecting to a Service
(c) Sparx Systems 2022 Page 2063 of 2309
Modeling Domains 3 February, 2022
Running Queries
Once you have connected to a Code Miner database, you are
ready to start running queries.
To run a query, select the Query tab in the Code Analyzer
window, type in your query, then click on the icon to
execute the query.
In this example, we have run a simple query
node("CLASS"), which will return all 'Class' nodes found in
Formal syntax:
andat( string:rule, set:left, set:right)
Access
On the Execution Analyzer window, locate and double-click
on the required script - the script editor dialog will display.
On that dialog, select the 'Code Miner > Libraries' page.
Updating a Database
From time to time, as you update the source code for a
project, you will want to update the Code Miner database
built from that source code.
To update a single Code Miner database, select it from the
list, right-click and choose 'Update selected' from its context
menu. A dialog similar to the 'Create Database' dialog will
display. Click on the 'Compile' button, the Code Miner will
recreate the database from the updated code base.
Removing a Database
To remove a single Code Miner database, select it from the
list and choose 'Remove Selected' from its context menu.
Access
Field Description
Directory directory.
When this option is selected, the
checkbox 'Process Subdirectories' is
enabled.
Learn more
· Grammar Framework
· Code Analyzer
Query Syntax
The syntax for composing mFQL queries is:
namespace
{
query:name([ $param1 [, $param2 ]])
{
mfql-expression
}
}
where:
· namespace names the collection of queries
substitutions at runtime
· mfql-expression is an mFQL expression
mFQL
mFQL is the query language of the Code Miner. The
language itself is reasonably simple, providing a small
number of commands. Simple as the language is, it supports
queries of arbitrary size and complexity. The design
provides extreme performance for all queries, great and
small.
The language is set-based; it operates primarily on sets of
abstract data obtained through discrete vertical indices. For
our purposes, a set is an ordered array of numbers, each of
which is a pointer to a node in the AST Store. A discrete
(c) Sparx Systems 2022 Page 2087 of 2309
Modeling Domains 3 February, 2022
type(value) type(value)
Extracts a set based upon node name. The
exact name for a node is defined by the
grammar used to parse the original
source. In this example, find all nodes
within the database of type "CLASS".
type("CLASS")
Synonyms:
· node
· byNode
· getByNode
with(name) with(name)
Searches the database for any element
Synonyms:
· name
· byName
· getByName
find(value) find(value)
find([+] find([+] value [+ value] [+])
value [+ Search the database for any element
value] [+]) having an attribute value with the
provided search term. The match is case
sensitive and must match the whole word.
You can extract a set based upon an
attribute value; when extracting nodes by
attribute value, the values of all attributes
for the node are considered.
Synonyms:
· value
· byValue
· getByValue
having("Type","CString",this("PROPER
TY","NAME","m_strName"))
having("Type","CString",this("PROPER
TY","NAME","m_strName")))
"Import Solution":
this("OPERATION","NAME","ImportSo
lution")
Synonyms:
· object
· item
like("NAME","CMapStr",gettype("CLAS
S"))
Synonyms:
· intersect(set, set,...)
Synonyms:
· or(set, set ...)
ancestor("OPERATION",hasParameter("
CString","&",1))
In this example the set is moved up one
rung to its parent. If there is no parent, the
node is dropped from the result.
ancestor(1,hasParameter("CString","&",1
))
In this example the set is moved up three
steps to its parent->parent->parent . If
there is no such node, the node is dropped
from the result.
ancestor(3,hasParameter("CString","&",1
))
Synonyms:
· move
filter("OPERATION",hasParameter("CSt
ring","&",1))
match("NAME",type("CLASS"),"TYPE"
,this("PROPERTY","NAME","m_pLink"
(c) Sparx Systems 2022 Page 2100 of 2309
Modeling Domains 3 February, 2022
))
graph("CLASS","NAME","GENERALIZ
ATION","GENERAL",this("CLASS","N
AME","Car"))
prune(this("PARAMETER","NAME","C
ustomerName"),"PARAMETER",type("P
ARAMETERTYPE"))
prune(this("CLASS","NAME","Custome
r"),2,type("PROPERTY"))
andat("CLASS",type("PROPERTY"),this
("CLASS","NAME","CDiagram"))
Synonyms:
· offsetIntersect
· offx
differ(
"GENERAL",
children("GENERALIZATION",
graph("CLASS","NAME","GENERALIZ
ATION","GENERAL",
this("CLASS","NAME","CMainFrame"))
),
"NAME",
graph("CLASS","NAME","GENERALIZ
ATION","GENERAL",
this("CLASS","NAME","CMainFrame"))
)
children("",this("CLASS","NAME","CM
ainFrame"))
children("REGION",this("CLASS","NA
ME","CMainFrame"))
childCount(2,"PARAMETER",
{
ancestor("OPERATION",hasParameter("
CString","&",1)),
ancestor("OPERATION",hasParameter("
CString","&",2)),
this("OPERATION","NAME","GetFrom
Cache")
}
)
byAddress(n byAddress(num)
um) The byAddress function is used in
applying the results of one query to
another. For example, we might have a
node of particular interest, and want our
query to return only nodes that join (in
some way) to the specified node.
byAddress(node: number)
This example builds a set containing the
single node related to the address
specified:
byAddress(11256)
distinct(set) distinct(set)
The distinct function ensures that a set
has no duplicate values. All duplicate
values are excluded from the result set.
Set Extraction
These procedures extract sets from discrete vertical indices.
There are three indices available, each with a specific
extraction function. String literal parameters to these
functions could be case sensitive. Case sensitivity is defined
by the language of the source code used to populate the
database. If the source language is case sensitive (as C++
is) all string literal parameters are case sensitive. If the
source language is case insensitive (as SQL is) all string
literal parameters are case insensitive.
type
type(value: string)
Extract a set based upon a node name. The exact name for a
node is defined by the grammar used to parse the original
source. In this example, all nodes with the name
"OPERATION" are returned.
type("OPERATION")
with
with(value: string)
Extract a set based upon attribute name. All nodes with one
or more attributes of the specified name are returned. If a
(c) Sparx Systems 2022 Page 2110 of 2309
Modeling Domains 3 February, 2022
find
find([+] value: string [+ value: string] [+])
Extract a set based upon an attribute value. When extracting
nodes by attribute value, the value of all attributes for the
node are considered. Wildcards allow for specifying a
subset of attribute values for a node.
When a single value is provided, all nodes that have a single
attribute with the value specified are returned. If a node has
any other attributes, it is excluded. In this example, all nodes
with exactly one attribute with the value of 'i' are returned.
find("i")
More than one value can be specified by using a
concatenation symbol. When more than one value is
specified, the resulting set will contain all nodes that have
attributes with exactly the values specified, in the order
specified. Any node with extra leading or trailing attributes
is excluded. This example retrieves a set of all nodes with a
set of three attributes with the values “com”, “.” and “sun”,
in that order.
find("com" + "." + "sun")
Wildcards can be used at either the beginning or end of a
(c) Sparx Systems 2022 Page 2111 of 2309
Modeling Domains 3 February, 2022
Set Traversal
ancestor
ancestor(count: number, source: set)
ancestor(value: string, source: set)
ancestor(count: number, value: string, source: set)
filter
filter(count: number, source: set)
For more details on the use of the 'filter' function, see the
'ancestor' function.
Set Joining
and
and(left: set, right: set)
An 'and' join will return a set containing all nodes that exist
in both the left and right set. This join is comparable to a
bitwise AND operation. In set theory, this type of join is
called an 'intersection'.
{1, 2, 3} intersected with {2, 3, 4} results in {2, 3}
This example returns a set that contains all nodes that have a
single attribute with the name of "TYPE" and the value of
"int".
and(
find("int"),
with("TYPE")
)
union
union(left: set, right: set [, right: set])
except
except(left: set, right: set)
'except' joins return sets that contain any nodes from either
set that do not appear in both sets. This join is similar to a
bitwise XOR operation. In set theory, this type of join is
exclude
exclude(left: set, right: set)
'exclude' joins return a set that contains all nodes from the
left set that do not appear in the right set. In set theory, this
type of join is referred to as a relative complement join.
{1, 2, 3} complemented with {2, 3, 4} results in {1}
This sample returns a set of all nodes with a value of “int”
that are not “TYPE” nodes:
Exclude(
find(“int”),
with(“TYPE”)
)
andat
andat(count: number, left: set, right: set)
andat(value: string, left: set, right: set)
andat(count: number, value: string, left: set, right: set)
andat(1,
type(“NAME”),
type(“CLASS”)
)
logoutput=c:\logfiles\intel-service-project
1.log
#-----------------------------------------------------------------------
---------
(c) Sparx Systems 2022 Page 2125 of 2309
Modeling Domains 3 February, 2022
status=ON,
lazyload=TRUE,
allow=localhost,
allow=127.0.0.1,
port=9999,
autoupdate=true,
database=c:\Project1\Project1.cdb
}
macros="c:\ea\ea160\config\CodeMiner\SparxProjectMacro
s.nbnf"
Job Output
As the Code Miner update task runs, output from the
captured SSCodeMiner.exe update process is sent to the 'Job
History' tab of the System Output window, in the same form
as is displayed when performing a manual update of a Code
Miner database in Enterprise Architect. In this illustration
we can see that the Analyzer Script RNO 160 -x64 has
completed successfully.
The Job Queue window shows that the job has completed.
The last task to run was the Code Miner update.
The 'Job History' tab showed that no source code files had
changed. If modified source code changes are detected - that
is, the Code Miner service has detected a new build of
ea.cdb and automatically updated it - this information is
displayed:
Service Configuration
Service program
The name of the service program is SparxintelService.exe.
Configuration File
The service is configured by the file
SparxIntelService.config.
The file must be located in the same directory as the service
program.
The file contains a number of directives and also lists the
Code Miner databases to be served.
The file is read once when the service is started.
Directives Description
Access
Service
Configuration Fields
Geospatial Models
The popularity of the internet, the ever-present mobile
phone and the prevalence of location-based services have
resulted in almost everyone interacting with location-based
information in some form in their daily lives. It has also
become critical for governments and organizations to
embrace this type of information as part of strategic decision
making. Geospatial information can be modeled in
Enterprise Architect and also integrated with other data to
form a single and comprehensive view of information not
possible in other tools.
Enterprise Architect, through the use of MDG Technologies,
supports the Geography Markup Language (GML)
application schemas and the modeling of ArcGIS
geodatabases. The information precursors to these models -
such as community conceptual models - can also be
modeled, and traceability can be used to connect the models
together.
Modeling Tools
Tool Description
Getting Started
Enterprise Architect partitions the tools extensive features
into perspectives this ensures that you can focus on a
specific task and work with the tools you need without the
distraction of other features. To work with the ArcGIS
Geodatabases or Geography Markup Language features you
first need to select the following perspectives:
ArcGIS Geodatabases
Using the ArcGIS features in Enterprise Architect you can
visualize geodatabases with ease. This allows you to unify
teams working in traditional software centric and
engineering systems with your geospatial teams defining
features and domains. Teams defining the strategy business
rules and requirements for a system or the components that
deliver the system functionality can share models with the
ArcGIS Geodatabases
Example Diagram
ArcGIS diagrams allow you to visualize the geographic
features, domains and other elements that make up a
geodatabase schema. In this example a Building has been
sub-typed as a house, the house in turn is sub-typed based
on the material type. The subtypes of the House references a
Coded Value Domain also presented in the diagram with
two Domain Code Values:
· Brick
· WeatherBoard
Access
Click on an ArcGIS stereotyped Package (your ArcGIS
Workspace Package) in the Browser window.
Option Action
Notes
· ArcGIS is available in the Professional, Corporate,
Unified and Ultimate Editions of Enterprise Architect
· In the Corporate, Unified and Ultimate Editions of
Enterprise Architect, if security is enabled you must have
'Export XMI' permission to export to XML
· Before exporting your model to an ArcGIS schema, you
must define at least one Spatial Reference element;
Spatial Reference elements are referred to by other
schema elements via a dynamically linked Tagged Value,
named SpatialReference
· The DefaultSpatialReference tag on an ArcGIS Package is
used to specify a Spatial Reference that can be applied to
all Feature Datasets and Feature Classes in the workspace;
therefore, you do not need to apply a Spatial Reference
element to each Feature Dataset or Feature Class
· If you do not reference a Spatial Reference Class from
any Feature Dataset or Feature Class in your ArcGIS
model, Enterprise Architect by default will generate an
XML schema with Unknown type of Spatial Reference
for these elements
Access
Click on the target Package in the Browser window.
Option Action
· Polyline
· Polygon
· MultiPatch
The 'RequiredField' and 'AttributeIndex'
attributes are also hidden for the Table
(Object Class) Class.
This option is enabled only when the
'Create Diagrams' checkbox is selected.
page.
Notes
· ArcGIS is available in the Professional, Corporate,
Unified and Ultimate Editions of Enterprise Architect
Example Diagram
Using the Geography Markup Language (GML) facility you
can model organization or community based application
schemas. The models can be used to show the relationship
between Features Types that contain any number of
Properties that qualify their characteristics. These can be
based on defined Types, Data Types, Code Lists or
Enumerations. You can collaborate with other geospatial
colleagues or with people working in traditional systems
implementations in disciplines that manage artifacts
including: Strategies, Goals, Requirements, Data Models,
Software Models, Deployment Descriptions and more.
Access
Features
Feature Detail
Notes
· GML is available in the Professional, Corporate, Unified
and Ultimate Editions of Enterprise Architect
More Information
Geospatial modeling can be explored in more detail by
accessing the following two topics:
ArcGIS Geodatabases
Geography Markup Language
· Windows Phones
· Screen dialogs
Access
On the Diagram Toolbox, click on to display the 'Find
Toolbox Item' dialog and specify 'Wireframing', 'Android',
'Apple', 'Dialog', 'Windows Phone' or 'Webpage'.
Keyboard Ctrl+Shift+3
Shortcuts
Notes
· Each of the Wireframing Diagram Toolboxes provides
one or more Patterns that you can drag onto a diagram as
an illustration of what you might achieve, or to act as the
basis of the model you are developing
· The 'Properties' dialog for Wireframe elements
automatically opens to either a top-level 'Wireframe' tab
on which you can edit the element rendering directly, or a
second-level 'Wireframing' Tagged Values tab if you
define the element rendering by editing the XML for the
properties of that element type
· Some of the elements you create from the 'Wireframe'
Toolbox pages are properly rendered after you edit the
Tagged Values that define their characteristics
· As you develop your Interface diagrams you can establish
the positions and layout of the elements freehand by
dragging and 'nudging' the elements, or impose some
regularity using the 'Snap To Grid' diagram options
Getting Started
Example Diagram
An example diagram provides a visual introduction to the
topic and allows you to see some of the important elements
and connectors that are created in specifying or describing
the way a wireframe, dialog or web page is defined
including: Android, Apple and Windows Phones and
Tablets, Dialogs and Web Pages with Buttons, Combo
Boxes and Radio Buttons.
Diagram' dialog
· IFML 'Essential Concepts', 'Core' and 'Extensions' pages
Example Diagram
Access
On the Diagram Toolbox, click on to display the 'Find
Toolbox Item' dialog and specify 'Wireframing' or 'Android'.
Keyboard Ctrl+Shift+3
Shortcuts
Item Description
screen
· NotificationBar - click on the
drop-down button and select to 'Show'
or 'Hide' the Notification bar at the top
of the screen
Composite
Item Description
group
· Expanded - click on the drop-down
Form Widgets
Item Description
numeric keyboard
Text Fields
Item Description
Image_Media
Item Description
Time_date
Item Description
element
· ShowCalendar - defaults to False to
element
You cannot resize this element.
Android Patterns
Item Description
Access
On the Diagram Toolbox, click on to display the 'Find
Toolbox Item' dialog and specify 'Wireframing' or 'Apple'.
Keyboard Ctrl+Shift+3
Shortcuts
Item Description
Controls
Item Description
table
Apple Controls
Item Description
keyboard.
Tagged Values:
· Type - switches the image between a
Apple Patterns
You can use any of these Patterns as examples of how the
elements are used, as basic components of a larger model, or
as the starting point to develop a more detailed model of one
or more of the products.
Item Description
Access
On the Diagram Toolbox, click on to display the 'Find
Toolbox Item' dialog and specify 'Wireframing' or
'Windows Phone'.
Keyboard Ctrl+Shift+3
Shortcuts
Item Description
permit.
Text
Item Description
Controls
Item Description
Tagged Values:
· State: click on the drop-down arrow
Tiles
Tile elements add to the phone screen a panel that,
depending on type, shows an image and/or some text. The
panel cannot be resized, and if it displays text the text
Item Description
date.
Tagged Values:
· Date - if necessary, click on the
password
· Password Character: a character that
way across.
Tagged Values:
· Fill amount - overtype the field with a
Access
Screen Types
Item Description
Controls
Item Description
is just available
- Focused - a highlighted inner
border, indicating, for example,
that the button is the default
selection
- Selected - filled rectangle,
indicating that the button is
selected
- Disabled - pale text and border,
indicating that the button is
not available
Dialog Controls
Item Description
item
· Checked - click on the drop-down
images.
Double-click on the table to display the
element 'Properties' dialog at the
'Wireframe' page, which you can use to
add, remove or change the items and their
icons. For each item, complete these
fields:
· Name - type the name or text of the
item
· 'Expanded' - click on the drop-down
as a three-character
abbreviation
- dddd - display the name of the day
in full
- h - display the hour using either
one or two digits, in 12 hour
clock format
- hh - display the hour using two
digits, digits 1 to 9 preceded by
a 0, in 12 hour clock format
- H - display the hour using either
one or two digits, in 24 hour
clock format
- HH - display the hour using two
digits, digits 1 to 9 preceded by
a 0, in 24 hour clock format
- m - display the minutes using
either one or two digits
- mm - display the minutes using
two digits, digits 1 to 9
preceded by a 0
- M - display the number of the
month using either one or
two digits
- MM - display the number of the
month using two digits, digits
1 to 9 preceded by a 0
- MMM - display the name of the
month as a three-character
abbreviation
Patterns
Item Description
Access
On the Diagram Toolbox, click on to display the 'Find
Toolbox Item' dialog and specify 'Wireframing' or
(c) Sparx Systems 2022 Page 2260 of 2309
Modeling Domains 3 February, 2022
'Webpage'.
Keyboard Ctrl+Shift+3
Shortcuts
Toolbox
Element Features
Image Detail
To extend a list:
· Open the Properties Dialog
(Double-click or Shift+Enter)
· Select the Wireframing tab
Property
· Edit the text in using the [...] option in
(double-click or shift+enter)
· Select the Wireframing tab
· Font Size
· Font Family
· Font Style
· Text Align
· Text Decoration
Mind Mapping
This text is derived from the Mind Map entry in the online
Wikipedia:
"A Mind Map is a diagram used to represent words, ideas,
tasks or other items linked to and arranged radially around a
central key word or idea. It is used to generate, visualize,
structure and classify ideas, and as an aid in study,
organization, problem solving, decision making, and
writing."
"A Mind Map is an image-centered diagram that represents
semantic or other connections between portions of
information. By presenting these connections in a radial,
non-linear graphical manner, it encourages a brainstorming
approach to any given organizational task, eliminating the
hurdle of initially establishing an intrinsically appropriate or
relevant conceptual framework to work within."
"The elements are arranged intuitively according to the
importance of the concepts and are organized into
groupings, branches, or areas. The uniform graphic
formulation of the semantic structure of information on the
method of gathering knowledge, may aid recall of existing
memories."
The use of the term 'Mind Maps' is trademarked in the UK
and the USA by The Buzan Organization, Ltd.
Access
Use any of the methods outlined here to display the Diagram
Toolbox, then click on to display the 'Find Toolbox Item'
dialog and specify 'Mind Mapping'.
Keyboard Ctrl+Shift+3
Shortcuts
Page Description
Appearance
Whiteboards
Scribble and Present Ideas Using an In-Model Electronic
Whiteboard
The Whiteboard Technology provides a set of Diagram
Toolbox pages with a selection of stereotyped element icons
that generate simple shapes suitable for use on hand-drawn
and whiteboard diagrams.
Access
Use any of the methods outlined here to display the Diagram
Toolbox, then click on to display the 'Find Toolbox Item'
dialog and specify 'Whiteboard'.
Keyboard Ctrl+Shift+3
Shortcuts
Page Description
Appearance
Whiteboard Diagram
You can create either a Whiteboard diagram or a
Hand-drawn diagram. Both of these diagrams, when opened,
cause the Whiteboard Toolbox pages to be opened.
Custom Diagram
A Custom diagram is an extended Class diagram that is used
to capture requirements, user interfaces or custom-design
models.
Custom models provide a few extensions to the UML model
and enable some exploratory and non-rigorous
experimentation with model elements and diagrams. You
generate Custom diagram elements and connectors from the
'Custom' pages of the Diagram Toolbox.
Icon Description
Icon Description
This text is derived from the Data Flow diagram entry in the
online Wikipedia.
'A Data Flow diagram (DFD) is a graphical representation
of the 'flow' of data through an information system. A Data
Flow diagram can also be used for the visualization of data
processing (structured design). It is common practice for a
designer to draw a context-level DFD first which shows the
interaction between the system and outside entities. This
context-level DFD is then 'exploded' to show more detail of
the system being modeled.'
'Data Flow diagrams were invented by Larry Constantine ...
based on Martin and Estrin's "data flow graph" model of
computation. (They) are one of the three essential
perspectives of Structured Systems Analysis and Design
Method SSADM. The sponsor of a project and the end users
will need to be briefed and consulted throughout all stages
of a system's evolution. With a Data Flow diagram, users are
able to visualize how the system will operate, what the
system will accomplish, and how the system will be
implemented. The old system's Data Flow diagrams can be
drawn up and compared with the new system's Data Flow
diagrams to draw comparisons to implement a more
efficient system.'
Access
Use any of the methods outlined here to display the Diagram
Toolbox, then click on to display the 'Find Toolbox Item'
dialog and specify 'Data Flow Diagrams'.
Keyboard Ctrl+Shift+3
Shortcuts
Diagram' dialog
· A 'Data Flow Diagram' page in the Diagram Toolbox
· Data Flow element and relationship entries in the Toolbox
'Shortcut Menu' and Quick Linker
Page Description
Appearance
Context Diagram
(c) Sparx Systems 2022 Page 2281 of 2309
Modeling Domains 3 February, 2022
Analysis Stereotypes
Enterprise Architect provides some built in stereotypes that
you can assign to an element during analysis. The effect of
each of these stereotypes is to display a different icon from
the normal element icon, giving a visual key to the element's
purpose. The main types of inbuilt icon for elements created
using the stereotypes include:
· Boundary - for a system boundary (for example, a Login
screen)
· Control - to specify an element is a controller of some
Analysis Diagram
An Analysis diagram is a simplified Activity diagram, used
to capture high level business processes and early models of
system behavior and elements. It is less formal than some
other diagrams, but provides a useful means of capturing the
essential business characteristics and requirements.
Robustness diagrams, which are used extensively in
ICONIX, can also be created as Analysis diagrams.
You generate Analysis diagram elements and connectors
from the 'Analysis' pages of the Diagram Toolbox.
Example Diagram
Example Analysis Diagram
Icon Description
Icon Description
possibilities.
Enterprise Architect allows you to follow any project
methodology, whether it is an Agile process or a formal
military process or one of the standard frameworks such as
TOGAF or Zachman. You are also free to set up your own
modeling process, and Enterprise Architect has built in
features for defining software development processes.
Modeling can start at any point and in real projects it
typically doesn’t follow the sequences described in text
books; Enterprise Architect allows you to work in a flexible
way but supports you with a versatile set of tools.
Enterprise Architect has a flexible feature that helps you to
create Profiles of the UML so even if you cannot find a
suitable modeling solution built into the core product, you
can extend the tool by creating your own profile.
Diagram Detail
Type
Modeling Disciplines
Modelers from all Disciplines and Domains can Create
Industry Standard Models
Web Stereotypes
Enterprise Architect supports a number of stereotypes for
web page modeling, the graphical elements for which
display with a graphical icon instead of the usual
«stereotype» format. These stereotypes are only supported
for Class elements. These are the various graphical icons
and their associated stereotypes:
Ste Action
p
Example Diagram
(c) Sparx Systems 2022 Page 2298 of 2309
Modeling Domains 3 February, 2022
Icon Description
Icons
Icon Description
Notes
· Using stereotyped Classes, you can model the design of a
web page user interface
Screen
A Screen is used to prototype User Interface screen flow. By
using UML features such as Requirements, Constraints and
Scenarios against User Interface diagram elements, you can
build up a solid and detailed understanding of user interface
behavior without having to use code. This provides an
excellent means of establishing the precise behavior of the
system from a user's perspective and, in conjunction with
the Use Case model, defines exactly how a user gets work
done.
Web pages can also be prototyped and specified rigorously
using Enterprise Architect's custom interface extensions.
Example
This example diagram illustrates some features of Enterprise
Architect's screen modeling extensions that support web
page prototyping. By adding requirements, rules, scenarios
and notes to each element, a detailed model is built up of the
form or web page, without having to resort to GUI builders
or HTML.
Toolbox icon
Notes
· The Screen element is the parent of all the UI Control
elements it contains; in the Browser window, expand the
UI Control Elements
A UI Control element represents a user interface control
element (such as an edit box). It is used for capturing the
components of a screen layout and requirements in a
Custom or User Interface diagram.
There are a number of UI Control elements available in the
'User Interface' page of the Toolbox. These include:
· List
· Table
· Text Box
· Label
· Form
· Panel
· Button
· Combobox
· Checkbox
· Radio button
· Vertical Line
· Horizontal Line
Example
Toolbox icon