Magic Draw User Manual
Magic Draw User Manual
version 16.5
All material contained herein is considered proprietary information owned by No Magic, Inc. and is not to be shared, copied, or reproduced by any means. All information copyright 1998-2009 by No Magic, Inc.
CONTENTS
0
20
21
21
MagicDraw Personal Edition 21 MagicDraw Standard Edition 22 MagicDraw Architect Edition 22 MagicDraw Professional Edition 22 MagicDraw Enterprise Edition 23 MagicDraw Community Edition 23 MagicDraw Reader Edition 23
MagicDraw Features
24
Reports Generation 24 Floating License Server 24 Teamwork License Server 24 Code and Database Engineering 25 OpenAPI 25 Integrations 25 MagicDraw Customization 26 MagicDraw Plugins 26 MagicDraw RConverter 27
MagicDraw Welcome Screen 28 MagicDraw News Reader 33 MagicDraw Documentation and Support
Help 35 Other Documentation 35 Support 36
FAQ 36 Newsgroups 36
35
CONTEN TS
E-mail 36 Bug Reports 36 View and submit internal errors 41
2 GETTING STARTED
42
43
Operating System - dependent issues 44 Windows 2000/2003/NT/XP/Vista* 44 Unix 45 MAC OS X 45 All other platforms instructions (no install version) 45
47
3 USING MAGICDRAW
50
50
Customizing MagicDraw Perspectives 51 MagicDraw Startup dialog box 53 Perspectives dialog box 55 Customize Perspectives dialog box 56
58
CONTEN TS
Window menu 79 Help menu 81
Toolbars
82
85
88
Containment tree
Diagrams tree 93 Inheritance tree 95 Model Extensions Tree 96 Search Results Tree 98 Working with Model Elements in the Browser Tree Multiple selection 100 Documentation/Zoom Control/Properties 101
Documentation tab 101 Zoom Control tab 102 Properties tab 103
99
104
CONTEN TS
EMF UML2 (v2.x) XMI Options Pane 132 EMF UML2 (v1.x) XMI Options Pane 133
Look and Feel: Controlling the Interface Assigning Shortcut Keys 137
135
138
Creating a new project 138 Working with multiple projects 139 Creating a new project from the existing source code 141 Creating a new project from a previously created template 142 Creating a new Use Case project 143
Exporting a project as an EMF UML2 (v2.x) XMI 153 Exporting a project as an EMF UML2 (v1.x) XMI 153 Exporting to BPEL 154
Searching
161
Metacharacters 167 Character Sets 167 Grouping 168 Quantifiers 168
CONTEN TS
Boundary Matchers 169 Embedded Flag Expressions 169
Replacing
170
The Package Dependencies dialog box Unresolved dependencies 185 Using the module of a project 186
184
The Use Module Wizard 187 Reusing model parts between models 188
Reloading the module of a project 190 Importing the module of a project 190 Working with partially loaded projects 190 Advanced Concepts 192
Indexing 192 Missing elements for the proxies (orphan proxies) 194
197
Diagram Basics 198 Diagrams Dialog Box 201 Diagram Properties 202 Diagram name and its context name synchronization
205
Diagram Frame 206 Table with diagram information 208 Drawing Shapes 209 Drawing the Shapes of the Diagrams 214 Drawing Relationship Paths 215 Inserting a Shape on the Path 218
CONTEN TS
Creating Relations from the Model 220 Smart Manipulation 221 Selection and Multiple Selections 224 Dragging, Copying, Cutting, and Pasting 227 Changing the diagram type 229 Zooming 231 Using the Grid 232 Layout 233
Orthogonal Layout Tool 234 Hierarchic Layout Tool 235 Tree Layout Tool 237 Organic Layout Tool 240 Circular Layout Tool 241 Orthogonal Path Router 243 Organic Path Router 244 Class Diagram Layout Tool 244 Activity Diagram Layout Tool 246 Business Process Diagram Layout tool 248 Quick Diagram Layout feature 250 Label layout in the diagram 250
Default label positions 250 Labels positions after moving a path, shape or related element 250
Printing 258
Print Range tab 259 Print Options Tab 261 Print Header/Footer Tab 263
265
265
265
CONTEN TS
Documentation/Hyperlinks tab 267 Attributes tab 270 Usage in Diagrams tab 271 Operations tab 272 Template Parameters tab 273 Relations tab 275 Tags tab 276 Constraints tab 279 Buttons available in the Specification dialog boxes 280
Formatting Symbols
283
To set the symbol properties (fill color, text color, and others) 283 Changing symbol properties dialog for multiple symbols 283 To show/hide model element constraints, stereotype and/or tagged values on the diagram pane 284 Displaying icon or image on the symbol or instead the symbol 285
Style Engine
287
Symbol Property Styles Tree 287 Working with Properties Styles 294 Properties extension by diagram 296 Properties Inheritance 299 General Style Properties 299 Shape, Path and Diagram Properties 299 Stereotype properties 301
303
304
Adding a hyperlink to the model element Insert Hyperlink dialog box 308
311
313
Owner display mode 311 Qualified name starting from model library
7 TOOLS
316
317
Model Merge
CONTEN TS
Definitions 317 Introduction to Merging 317
3-way merge 318 2-way merge 319 Model Merge Concepts 320
320
Case Study 1 - 3-way Merge and Analysis 321 Case Study 2 - merging in Teamwork System 327 Case study 3 - Copying changes from branch to Trunk (in Teamwork) with conflict resolution 337 Case Study 4 - Representing DSL elements in the Merged results 350
Pattern Wizard 395 Creating Setters / Getters 404 Implementing or Overriding Operations Model Transformation Wizard 409
407
Types of transformations 409 Model Transformation Wizard 410 Model Transformation Mapping 414 Transformation Mapping Options 415 Model Transformation Update 419
10
CONTEN TS
Analyzing the Check Spelling (the Validation Results window) 429 Solving the spell checking errors 430
433
436
8 MODEL ANALYSIS
Model Visualizer 440
439
446
Package Overview Diagram Wizard 450 Hierarchy Diagram Wizard 455 Realization Diagram Wizard 459 Activity Decomposition Hierarchy Wizard 463 Content Diagram Wizard 468 Sequence Diagram from Java Source Wizard 471
Model Differencing
486
486 491
Models comparison
Diagrams Comparison
Metrics
494
11
CONTEN TS
Starting Metrics 496
Exporting Metrics 500 Comparing metrics 502 Metrics Options 502 Metrics Properties 505
508
Working with a Dependency Matrix Template 515 Dialog boxes in Dependency Matrix functionality 517
Dependency Matrix Templates dialog box 517 The Add / Remove Elements dialog box 520 The Dependency Matrix Specification dialog box, tags group 521
Validation
523
Introduction 523 Constraint Types 523 Predefined Validation Suites 524 Validating 525 Validation Results Window 528 Validation Rules 531
OCL Constraints 536 Binary Constraints 537
12
CONTEN TS
Handling incorrect model 556 Changing the Active Validation Options 557 The Active Validation Suites 558
Validating Parameters and Arguments Synchronization 558 Shape Ownership 559 UML model correctness 563 Validating the Orphaned Proxies (OP) 563
Customizing the Active Validation 564 Validate element that has no representation in diagram
564
Usage in Diagrams
566
Searching for symbol usage in diagrams from the element specification dialog box 567 Searching for symbol usage in diagrams from the element shortcut menu 568
9 UML DIAGRAMS
569
Class Diagram
572
573 582
Sequence Diagram
587
Activity Diagram
607
13
CONTEN TS
Activity Diagram elements 609 Smart Activity Diagram layout 618
Dynamic centerlines 618 Diagram orientation 619
629
632
Composite Structure Diagram elements 630 Displaying existing Parts on the Composite Structure diagram creation
634
10 EXTENSION DIAGRAMS
General Information 637
Common Elements 639
637
Content Diagram
641
642 647
Web Diagram
648
654 655
Generic DDL Diagram Elements Oracle DDL Diagram Elements WSDL Diagram Elements 659
664
665
665
14
CONTEN TS
Struts Diagram Elements 666 669
Networking Diagram
668
11 MODEL ELEMENTS
Note, Comment 688 Anchor 688 Constraint path 689 Image Shape 689 Separator 689 Documentation 690
685
690
Stereotype Specification dialog box 695 Assigning a stereotype 697 Changing the stereotype display mode 698
Tags
700
Editing Tagged Value 701
Constraint
703
The Time and Duration Constraints 704 Working with Constraints 704 The Constraint Specification dialog box 706 OCL 707
Profiles 710
Profiles 711 Working with profiles 712 Creating Profiles 712 Using and Importing Profiles 712 Exporting Profiles 713
Action 713
Accept Event Action 714 Call Behavior Action 716 Call Operation Action 717
15
CONTEN TS
Opaque Action 719 Send Signal Action 719 Working with actions 720
Advancing actions: applying duration constraint 721
725
728
Association End
Collaboration 749 Combined Fragment Component 753 Connector 757 Containment 761 Data type 761
Enumeration 763 Primitive 766
752
16
CONTEN TS
Extend 774 Flow Final Node Fragment 777
776
780
The formal gate and actual gate usage in the sequence diagram 784
786
Include 793 Information Flow 795 Information Item 796 Instance 797 Instance Specification 802 Interaction Use 803 Interface 804
Provided and Required Interfaces 805 Provided and Required Interfaces in the Composite Structure diagram Provided/required interfaces in the Component diagram 809 807
Internal transition 809 Lifeline 810 Lifeline in the Sequence Diagram 812 Link 813 Manifestations 813 Message 814
Assigning/Creating operation for message 819 Assigning/Creating signal reception for message Predecessors and activators 821 820
822
17
CONTEN TS
Expansion Region and Expansion Nodes 830 If, Loop and Sequence Conditional Nodes 830
Object 831 Object Flow 832 Object Node 832 Opaque Behavior 834 Operation 835 Package 842
Working with packages 843 844
Parameter
844
Rules of synchronization between parameters and arguments 846 Synchronization between Operation parameters and Behavior parameters 847 Synchronization between Activity parameters and Activity Parameter Nodes 851 Synchronization between Operation parameters and pins on Call Operation Action 853 Synchronization between Behavior parameters and pins of Call Behavior Action 854 Synchronization between Interaction parameters and Interaction Use arguments 857 Synchronization between Operation parameters and Message arguments 857 Synchronization between Interaction Parameters and Lifelines 860 The Parameters Synchronization dialog box 863
874
Initial 875 Final state 876 Terminate 876 Entry Point 876 Exit Point 876 Deep History 876 Shallow History 877 Junction 877 Choice 877 Fork/Join 877
883
18
CONTEN TS
Changing State to Composite/submachine/orthogonal State 889 Composite State 890 Submachine 891 Adding connection point reference 891 Defining State Invariant 892 Assigning behavior to state 892
899
904
Use Case 904 Use Case Extension 907 Value Specification 908
Diagram Icons 923 Icons of general elements 925 Icons of relationships 939 Icons from Modules and Profile mechanism
945
Index 946
19
INTRODUCING MAGICDRAW
20
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Editions and Features Today, visual modeling tools provide many features that replace some of the more tedious tasks for the designer, programmer, and documentation writer. Some of the leading tools provide so-called round-trip code engineering capabilities the structure of reverse engineered code is changed in the modeling tool and is generated back without the implementation of specific information (e.g. method bodies, comments) being lost. MagicDraw is a visual UML modeling and CASE tool with teamwork support. Designed for Business Analysts, Software Analysts, Programmers, QA Engineers, and Documentation Writers, this dynamic and versatile development tool facilitates analysis and design of Object Oriented (OO) systems and databases. It provides the industry's best code engineering mechanism (with full round-trip support for Java, C#, C++, WSDL, XML Schema, and CORBA IDL programming languages), as well as database schema modeling, DDL generation and reverse engineering facilities.
MagicDraw Editions
MagicDraw Personal Edition
MagicDraw Personal Edition contains powerful UML diagramming capabilities, including full UML 2 support and extensibility features, basic reporting functionality, and image export. Exported files are stored in XMI format. All model elements can be accessed via the MagicDraw Open API. In this edition, you will find everything you need to draw, edit, and publish your UML models. Personal Edition is available only in a standalone version and is not designed for use with MagicDraw Teamwork Server.
21
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Editions and Features
Professional Edition is ideal for anyone who wants to generate code from an existing model or create a UML model from an existing project.
22
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Editions and Features
23
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Editions and Features
MagicDraw Features
Reports Generation
You will find a complete description of the MagicDraw Report Wizard, related OpenAPI, and tutorial in MagicDraw ReportWizard UserGuide.pdf.
With MagicDraw Teamwork Server, you can assign as many developers as needed to work simultaneously on the same project using multiple workstations. The resulting Teamwork project is saved on the server for sharing by other MagicDrawTM applications. Users with administrator rights can create new users by giving them their own login name and various permissions to work on projects. Depending on permissions, users can update, commit, edit, create, and delete model elements, diagrams, and projects. To enable Teamwork support, you should install and run the MagicDraw Teamwork Server software. Each MagicDraw application acts as a client in the Teamwork system. Teamwork Server functionality is available with MagicDraw client Standard, Professional, and Enterprise Editions only. MagicDraw Reader Edition is allowed to open and review teamwork projects. For more information about Teamwork License Server, see MagicDraw Teamwork UserGuide.pdf.
24
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Editions and Features
The tool may generate code from models and create models out of code (reverse). Changes in the existing code can be reflected in the model, and model changes may also be seen in your code. Independent changes to a model and code can be merged without destroying data in the code or model. MagicDraw UML code engineering supports Java, Java Bytecode, C++ (ANSI, CLI, Managed), C#, CIL, CIL Disassembler, CORBA IDL, DDL (Cloudscape, DB2, Microsoft Access, Microsoft SQL server, MySQL, Oracle, Pervasive, Pointbase, PostreSQL, Standard SQL, Sybase), XML Schema, WSDL, and EJB 2.0 notation. For more information on working with code engineering and databases, see MagicDraw Code&DatabaseEngineering UserGuide.pdf.
OpenAPI
This document describes the MagicDraw Open Java API and provides instructions on how to write your own plug-ins, create actions in the menus and toolbars, change UML model elements, and create new patterns. For more information on working with OpenAPI, see MagicDraw OpenAPI UserGuide.pdf.
Integrations
MagicDraw supports the following integrations:
Eclipse RAD BEA Workshop IntelliJ
25
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Editions and Features
JBuilder NetBeans OAW AndroMDA ProActivity CVS CaliberRM
For more information about MagicDraw integrations, see MagicDraw Integrations UserGuide.pdf.
MagicDraw Customization
MagicDraw introduces several advanced customization engines, based on UML Profiles:
Custom Diagram Wizard allows creating your own diagram types for custom profile. You may include your own toolbars, stereotyped elements, symbol styles, and custom smart manipulators. Such customization is saved in the special diagram descriptor that could be exchanged between users. This allows others to use your custom diagrams. Domain Specific Language Customization Engine (DSL customization engine) allows tuning domain specific profiles, customizing multiple GUI, model initialization, and semantic rules, creating your own specification dialogs. DSL customization is model-driven approach, based on UML profiling. Customization is saved as a UML model. Advanced UML Profiling allows the use of some profiling enhancements that are not defined in UML, but helps to solve some common problems like tag grouping, unwanted stereotypes, tags hiding, etc.
For more information about MagicDraw customization see UML Profiling and DSL UserGuide.pdf.
MagicDraw Plugins
For the full MagicDraw plugins list, see the following website: www.magicdraw.com/plugin. DoDAF This document describes all DoDAF artifacts, their forms (diagram, report, matrix, and table), mapping to MagicDraw UML model, implementation details, and useful tips. This information is provided for every type of DoDAF product.
26
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Editions and Features For information on how to install, set up, and use the DoDAF plugin, see DoDAF Plugin UserGuide.pdf. SySML SysML (Systems Modeling Language) supports the specification, analysis, design, verification and validation of a broad range of complex systems. The SysML plugin for MagicDraw supports all SysML diagrams, including Requirements, Block Definition, Internal Blocks, Parametric, and others. With SysML, MagicDraw adds support for additional specification, analysis, design, and validation of a broad range of systems and system integrations. For information on how to install, set up, and use the SysML plugin, see SysML Plugin UserGuide.pdf. MagicRQ MagicRQ plugin is the MagicDraw integration with IBM/Rational RequisitePro and Telelogic DOORS requirements and use case management tools. For information on how to install, set up, and use the MagicRQ plugin, see MagicRQ Plugin UserGuide.pdf.
NOTE
For information about MagicDraw and Plugins compatibility see the following website: http://www.magicdraw.com/compatibility The table shows which versions of MagicDraw and MagicDraw Plugins can work together.
MagicDraw RConverter
MagicDraw RConverter generates data files in Rational Roses (*.mdl) to MagicDraws (*.xml). By obtaining information from Rational Rose via Rational Rose API (REI) and using VB6.0 to calculate the change, the resulting file is saved in the MagicDraw file (xml file extension) format. For information on working with RConverter, see NM_MagicDraw_RConverter_UserManual.pdf.
27
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Welcome Screen
28
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Welcome Screen Manage Projects Click Create New Project, to create a blank project. Click Open Project, to open existing project. The Recent Projects list contains list of the recently opened projects. Latest News Click on the particular news to read more detailed description. The news will be displayed in the MagicDraw News Reader. For more information, see MagicDraw News Reader on page 33. Whats New tab Click the description to open the following items:
Introduction to MagicDraw. The introductory MagicDraw sample is opened. New and noteworthy. The www.magicdraw.com/newandnoteworthy webpage is opened. See the list of a new MagicDraw features for the newest version. MagicDraw news. The MagicDraw News Reader is opened. For more information, see MagicDraw News Reader on page 33. MagicDraw updates. The Updates Information dialog box opens, with a list of the latest updates. Here you will be able to see what updates are available and update to a newer version. MagicDraw home page. Click this link to navigate to the www.magicdraw.com webpage.
29
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Welcome Screen
30
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Welcome Screen
Online demos. The www.magicdraw.com/viewlets webpage is opened. View demos, which introduces MagicDraw and MagicDraw features. MagicDraw eSchool. The http://school.nomagic.com/ webpage is opened.
31
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Welcome Screen Samples Quick navigation to MagicDraw samples. All samples from <MagicDraw installation folder> \samples directory are accessible in this page.
32
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw News Reader
When some news is available, a small envelope icon will be displayed at the right of MagicDraw status bar. Click on this icon to invoke the MagicDraw News Reader (see Figure 6 on page 35). Reading news in the MagicDraw News Reader Select the news channel at the left side of the MagicDraw News Reader and then select one of the news in the list. Bellow the title of the selected news, the description is presented. Unread messages are displayed in bold. Click the Open in Browser link to read description on www.magicdraw.com website.
Setting options of the MagicDraw News Reader To change the checking period, change the Check for MagicDraw News property in the Environment Options dialog box, General section. Property provides the following options:
Once a day Once a week Once a month Do not check.
33
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw News Reader
34
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Documentation and Support
Help
The integrated help within MagicDraw is based on JavaHelp. MagicDraw help provides detailed descriptions of all MagicDraw dialog boxes, commands, and shortcut menus. You will also find a How-to list, as well as main descriptions and examples of all UML model elements.
Other Documentation
The main readme.html and notes.html files are located in the main MagicDraw installation directory. Readme documents are also available for MagicDraw integrations. In the notes.html file you will find the main information about MagicDraw features.
35
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Documentation and Support
Viewlets. View online demos introducing MagicDraw and particular functionalities. You may find online demos at www.magicdraw.com/viewlets. Samples. In the MagicDraw installation directory (samples directory), you will find the samples of MagicDraw projects.
Support
FAQ
Before you call or write an email, look into our FAQ (Frequently Asked Questions) list. It is constantly updated and perhaps it contains an answer to your question.
Newsgroups
Discuss and get answers about MagicDraw in newsgroups.
E-mail
Professional e-mail support is provided for registered MagicDraw users. [email protected] - private questions about product installation, and more. [email protected] - questions regarding academic and site discounts and/or quotes. [email protected] - e-mail for other contacts. Get an answer in 24 hours!
Bug Reports
Submit notifications of software errors by submitting a bug directly from MagicDraw (Help menu>Submit a Bug) or by sending an email to [email protected]. These reports help us address issues in a more timely manner, as well as speeding up maintenance releases that are free of known defects.
36
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Documentation and Support When sending your report by email, please include (if applicable):
MagicDraw UML version number and name of the edition (Reader, Community, Personal, Standard, Enterprise, Professional Java, Professional C++, Professional C#, Demo, or Academic). demo CD, our homepage download. Version distribution (Standard/Professional, Windows/Java bytecode). Your OS name and version. JDK version, JVM vendor. CLASSPATH settings.
If you do not have this information, you can find it by opening the About dialog from the MagicDraw Help menu. If MagicDraw is unable to load your file, and the file is not confidential, please attach it to your submission. This will assist us in our analysis of your problem.
37
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Documentation and Support To open the Submit a Bug dialog box
Select Submit a Bug from the Help menu.
38
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Documentation and Support
Figure 8 -- Submit a Bug dialog box, Attachments tab Tab name Submit Form Box Your Name Your E-Mail Bug Name Bug Category Bug Description Function
Type your name. Type your e-mail address. Give a name to the bug. Select a bug category, or create a new category that is more fitting. Describe the bug or suggestion.
Fill in the information about yourself and describe the bug or suggestion.
39
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Documentation and Support
Tab name Attachments Box Attach log file Attach project file Attach used modules Attach diagram images Image format Function
Attach MagicDraw log file with included errors. Attach currect MagicDraw project and send it to the support team. Attached modules used in the project. Attach images of selected diagrams. Select format of the diagram images, which will be sent to the support team. To specify image options click the Options button. Select the Overwrite existing files check box, to overwrite existing files with the current one. Select all diagrams displayed in the Select Diagrams list. Remove all previously selected diagrams from bug report. Loads all diagrams of the project. By default only open diagrams are shown in the Select Diagrams list. Send the bug. RECOMMENDATION: You may submit a bug by mailing to [email protected], but it is recommended that you submit a bug directly from within the MagicDraw tool. This assures that the MagicDraw team will receive the description of the bug along with your system information.
Overwrite existing files Select All Clear All Load All Diagrams
Buttons
Send
Cancel Help
Exits the dialog box without saving changes. Displays MagicDraw Help.
To submit a bug when application is unresponsive If MagicDraw becomes unresponsive, a separately executable tool is provided for analyzing the status of the process to aide in bug submission. In these situations, manually start the submitbug.exe file (located in the <MagicDraw installation directory>\bin folder) and follow directions. After submit-
40
1 I N T R O D U C I N G M A G I C D R AW
MagicDraw Documentation and Support bug.exe is started, the Submit a Bug dialog box opens. For more information about the Submit a Bug dialog box, see To open the Submit a Bug dialog box on page 38.
Note: The View and Submit internal errors command is only active in the Help menu and the red button at the bottom of the status bar only exists if the Submit errors dialog box contains errors.
To submit an error
1. Open the Unhandled Errors dialog box. 2. Click the Submit button in the Unhandled Errors dialog box. The Submit Error dialog box appears. 3. Fill in Your name, Your e-mail and Bug description fields and click the Send button. The error will be sent to the MagicDraw support team.
41
GETTING STARTED
In Getting Started, you will find information about how to install, update, and configure MagicDraw.
1. "System requirements", on page 42 2. "Java Virtual Machine (JVM)", on page 43 3. "Installation Procedure", on page 44 4. "MagicDraw Configuration Files Location", on page 47 5. "Updating", on page 48
System requirements
To run MagicDraw UML, your system must meet the following requirements:
Resource type CPU Memory Minimum PentiumTM 3, 800 MHz Recommended PentiumTM 4, 1.4 GHz or higher 1 GB RAM recommended; more memory generally improves responsiveness. 2 GB RAM is recommended for MicrosoftTM Windows Vista and for very large projects 400 MB or more 1280*1024 @ 64k Colors
768 MB
All that have Java compatible JVM 1.5 or 1.6: Windows 95/98/NT/2000/XP/Vista, Linux, Mac OS X (most testing procedures and debugging were performed on these platforms)
42
2 GETTING STARTED
Java Virtual Machine (JVM)
43
2 GETTING STARTED
Installation Procedure
Add argument into the JAVA_ARGS line in the mduml.properties file (this file is in <MagicDraw installation directory>/bin folder): APP_ARGS =-verbose
Installation Procedure
First, obtain the MagicDraw installation files. You can download the latest version from the MagicDraw homepage (http://www.magicdraw.com/.) Because MagicDraw is a Java application, you will need more than the installation files to run the tool successfully. You can also install JVM together with MagicDraw or you may already have it installed. Information about the latest Java ports is available at http://www.magicdraw.com/jvm_list.htm.
NOTE If an installation is for Windows, and has a JVM you do not need anything else.
Windows 2000/2003/NT/XP/Vista*
After downloading, double-click MD_UML_<version>_win.exe.
44
2 GETTING STARTED
Installation Procedure The Setup Wizard automatically adds MagicDraw UML shortcuts to the start menu and the desktop. You may also execute the shortcuts from the installation directory.
NOTE MagicDraw is working on Vista OS since MagicDraw 12.5 version.
Unix
After downloading, open a shell and go to the directory where you downloaded the installer. At the prompt type: sh ./MD_UML_<version>_unix.sh.
MAC OS X
Recommended Mac OS X v10.4 (Tiger), Mac OS X v10.5 (Leopard), and Java 1.5. After downloading, double-click MD_UML_<version>_mac.dmg and install the application by dropping the launcher to the Applications folder (or somewhere else). We suggest to create additional folders for different MagicDraw versions in MAC OS X Applications folder in case do not overwrite old client with the new one. After installing MagicDraw to several folders you will be able to import the old MagicDraw version configuration. To install MagicDraw to newly created folder:
1. In the Applications folder create folder named as MagicDraw version. For example, MagicDraw UML 16.0. 2. Drag MD_UML_<version number>_mac.dmg content to the Applications/MagicDraw UML 16.0.
45
2 GETTING STARTED
Licensing Information Display
Launch ./mduml in bin directory to start MagicDraw.
The Remove Unused Licenses button Press button Remove Unused Licenses in the About screen, Licensing tab to remove licenses of not installed plugins. NOTE
If you have any questions or issues, please submit a bug using the Submit a Bug dialog box. For more information, see View and submit internal errors on page 41.
46
2 GETTING STARTED
47
2 GETTING STARTED
Updating You may check the exact path to the configuration files in the MagicDraw About screen, Environment tab, Configuration files line (invoke the About screen from the Help main menu, About MagicDraw command). To store MagicDraw configuration files in the MagicDraw installation directory
Add argument to JAVA_ARGS line in the file mduml.properties file (this file is in <MagicDraw installation directory>/bin):
JAVA_ARGS=-DLOCALCONFIG=false
To store MagicDraw configuration files to your chosen location You may define custom path for configuration files in two ways:
In the mduml.properties file, JAVA_ARGS line add the property
-Dlocalconfig.location=<custom path>
1. In the <User home directory>/.magicdraw/<version> folder, create a file named magicdrawredirect. 2. In the created file, type the absolute path where the MagicDraw configuration and auxiliary files will be saved, for example: C:\<directory name>. NOTE If MagicDraw is configured to store files in the MagicDraw installation directory (see the topic To store MagicDraw configuration files in the MagicDraw installation directory above), files will not be stored to your chosen location.
Updating
An automatic updates feature is implemented in MagicDraw. Notification and update of all the patches can be done automatically. To enable an automatic checking for MagicDraw updates
1. Open the Environment Options dialog box, Update pane. For a detailed description of this dialog box, see Update pane on page 119.
48
2 GETTING STARTED
Updating
2. Select a period when MagicDraw should check for updates from the Check for Updates dropdown list box: Manually, On startup, Once a day, Once a week, Once a month. It is recommended to check for updates once a month. NOTE You may also manually check for updates: go to the Help menu and select the Check for Updates command.
49
USING MAGICDRAW
In Using MagicDraw, you will find information about how to define MagicDraw according to perspective, an introduction to the MagicDraw User Interface, and defining your environment.
"Perspective Selection and Customization", on page 50. "MagicDraw User Interface", on page 58. "Menu System", on page 60. "Toolbars", on page 82. "Using the Browser", on page 85. "Setting Environment Options", on page 104. "Look and Feel: Controlling the Interface", on page 135 "Assigning Shortcut Keys", on page 137.
50
3 U S I N G M A G I C D R AW
Business Analyst - this perspective provides features for the Business Analyst. This role is responsible for defining business architecture. Code engineering, transformations, extensions, and other features are hidden. Software Architect - this perspective provides features primarily involved in designing and implementing projects. It is a set of roles consisting of Software Architect, Designer, Interface designer, and Database designer. This is the default MagicDraw configuration. All functionalities are available for expert mode. System Analyst - this perspective provides features primarily dedicated to obtaining requirements and modeling the system. Analysis features are highlighted. Configuration is modeling oriented. Code engineering, transformations and other features are hidden.
MagicDraw has six customizable areas in three different perspectives. Each of these areas has a set of commands, which can be shown in standard/expert mode, or hidden:
Main menu; Main toolbars; Diagram toolbar; Diagram modeling elements toolbar; Context menu actions;
51
3 U S I N G M A G I C D R AW
Reports.
From the diagram buttons toolbar menu, select/clear Expert Mode check box.
52
3 U S I N G M A G I C D R AW
MagicDraw Startup dialog box
Launch MagicDraw for the first time. The MagicDraw Startup dialog box will appear with the possibility to switch between perspectives.
Figure 11 -- MagicDraw Startup dialog box Element Name Business Analyst Full Featured Software Architect System Analyst Expert Function Possible perspectives to set, which will load a predefined MagicDraw configuration.
If not selected, a simplified MagicDraw interface with the most popular items and features will be opened and the specification properties will be shown in Standard Mode.
53
3 U S I N G M A G I C D R AW
Element Name Integrate OK Help Function
Opens the Integrations dialog box for quick integration with the selected tool. Loads MagicDraw with the selected perspective. Displays MagicDraw Help.
54
3 U S I N G M A G I C D R AW
Perspectives dialog box
From the Options main menu, choose Perspectives and then Perspectives.
Figure 12 -- Perspectives dialog box Element Name Business Analyst Software Architect System Analyst Customize Expert Function List of possible perspectives, which will load a predefined MagicDraw configuration.
Opens the Customize Perspective dialog box. If not selected, a simplified MagicDraw interface with the most popular items and features will be opened and the specification properties will be shown in Standard Mode. The selected perspective will be applied for current MagicDraw mode. Closes the dialog box without saving changes.
Apply Cancel
55
3 U S I N G M A G I C D R AW
Element Name Help Function
Figure 13 -- Customize Perspectives dialog box Element Name Clone Selected Perspective Function Copies the selected perspective to a new one.
56
3 U S I N G M A G I C D R AW
Element Name Rename Selected Perspective Function
The Enter Perspective Name dialog box opens. Change name of the perspective and click OK. Renaming can also be performed using the F2 shortcut key. Deletes the selected perspective from the list.
The Open dialog box appears. Select *.umd extension file and click Open to import the perspective into the MagicDraw environment.
The Save dialog box opens. Type a name for the created perspective and click Save to store it as *.umd extension file.
Business Analyst Software Architect System Analyst MagicDraw Area Edit Description Reset to Defaults
List of possible perspectives, which will load the predefined MagicDraw configuration.
List of customizable toolbars and command sections. Click the Edit button to open the Customize Main Menu dialog box in which a commands mode could be changed by selecting radio buttons. Displays short description about each selected area. Resets changes back to the default configuration.
57
3 U S I N G M A G I C D R AW
MagicDraw User Interface
Nearly all MagicDraw commands can be accessed from multiple places within MagicDraw;
58
3 U S I N G M A G I C D R AW
MagicDraw User Interface
Main menu Main toolbar Browser Diagram toolbar Shortcut menus (accessible by right-clicking) Shortcut keys Smart manipulators (accessible by selecting a symbol on the diagram pane).
The table below shows how several commands are accessible in various ways:
Function Main operations of editing (copy, cut, paste, delete) Accessibility
Edit menu. Main toolbar buttons. Shortcut keys. Shortcut menu commands from Browser.
By double-clicking the model element. Specification command from the element shortcut menu on the
diagram or Browser.
When adding one model element to another model element from
NOTEs
The Symbol shortcut menu is also accessible from the Edit menu, Symbol. The toolbar of a particular diagram presents the paths and shapes available for the corresponding diagram. If an arrow is placed on the diagram toolbar button, select a button representing the corresponding model element by right-clicking the button.
59
3 U S I N G M A G I C D R AW
Menu System
Menu System
File menu
Command New Project Button / Hot keys Function
Creates a new project. Choose an icon to create a new Blank Project, create a Project from an Existing Source, or create a Project from a Template. CTRL+N A project is nameless until you close or save it by choosing the Save Project or Save Project As commands. You may simultaneously create as many new projects as you wish, without saving and closing the previously created or open projects. You may work on only one open or created project at a time. If you wish to work with another project, select the project name in the Projects list on the main window toolbar.
Open Project
Opens an existing project. The Open dialog box appears. Select a project you wish to open. You may open as many projects as you wish. If you wish to work with another project, select the project name in the Projects list on the main window toolbar. Saves the open project. To save the current project for the first time, type the name of the project and select the format of the file you wish to save. CTRL+S
CTRL+O
Save Project
Save Project As
Saves the project giving it a name. Use this command to save the current project for the first time or under a different name, the Save dialog box appears. Type the name of the project and select the format of the file you wish to save.
60
3 U S I N G M A G I C D R AW
Menu System
Command Close Project Button / Hot keys Function
Closes an open project. If the open project has unsaved changes, MagicDraw displays a dialog box asking whether the changes should be saved before the project is closed.
Closes all open projects. If the open projects have unsaved changes, MagicDraw displays a dialog box asking whether the changes should be saved before the each project is closed.
The Import dialog box appears. Select the project you wish to import. You may import as many projects as you wish. Imports an existing project to a previously open project. This is the recommended command for importing an existing project to the teamwork server.
The Use Module dialog box appears. Choose profile or module for use in the project.
Module - saves the content of the selected objects in
a separate file.
Template - saves the current project as a template
project.
EMF UML2 (v1.x) XMI - exports the MagicDraw
Saves the package as a separate module. Saves the open diagram as an image of in the selected formats. The Save As Image command is used for saving any item or group of items selected in the diagram pane, in one of the various image file formats.
61
3 U S I N G M A G I C D R AW
Menu System
Command Print Button / Hot keys Function
CTRL+P
Print Preview
The Print dialog box appears. Printing of active diagram, selected symbols, or selected diagrams is available. Select the printer, set the options for the printer, specify the number of copies, and select the specific pages to be printed. Preview the diagram before printing. The Print Preview screen opens.
The Print Options dialog box opens. The Project Properties dialog box opens. This dialog box contains the following information: project location, file size, date created, date modified for the last time, and number of diagrams in the project. In the Description tab, type the description of the project or other important information. The Modules tab shows a list of modules the project is using. The list shows a specified number of recent project files. Specify the number of files in the Recent Files List Size property in the Environment Options dialog box.
A list of open projects. Exits the application. All open projects are closed. If an open project has unsaved changes, the MagicDraw displays a dialog box asking whether the changes should be saved before closing the project.
The File menu contains a list of recent projects. The shortcuts with numbers to recent projects are displayed. If the shortcut is selected from the File menu, the recent project will open instantly.
62
3 U S I N G M A G I C D R AW
Menu System
Edit menu
MagicDraw allows you to use the Edit menu commands while drawing the diagrams on the Diagram pane. The commands allow selecting, cutting, copying, and pasting of items and entire diagrams, reversing the actions you have taken while drawing, and finding an item in the current project.
Button/ Shortcut keys
Command Undo
Function
CTRL+Z
Reverses the last action you have performed while drawing the diagram on the Diagram pane (moving, dragging, resizing, cutting, copying, pasting, deleting, selecting, editing shapes, setting project and shape properties, etc.). Actions are reversed in the opposite order you have performed them, starting with the most recent. By default, the limit of the undo mechanism is 100 steps backwards. To change the limit, choose Environment from the Options menu. The Environment Options dialog box appears. Change the Undo List Size property. The Undo command is unavailable until you perform any action after loading an the existing project or creating a new project. Each command has an easily recognized name. You will be able to see the command history and undo or redo one action or a group of actions. The main window will have two lists of commands: one for the undo commands, another one for the redo commands.
Redo
Reverses the action of the Undo command (moving, dragging, resizing, cutting, copying, pasting, deleting, selecting, etc.). The Redo command is unavailable until you use the Undo command. CTRL+Y
63
3 U S I N G M A G I C D R AW
Menu System
Command Cut Button/ Shortcut keys Function
Cuts the selected items or group of items on the Diagram pane. The cut items are placed in the clipboard. Later they can be pasted back to the Diagram pane of the current or to another project. The Cut command is unavailable until you select any item or any group of items on the Diagram pane of the current project.
CTRL+X
Copy
Copies the selected items or group of items on the Diagram pane. The copied items are placed in the clipboard. The cut items can be pasted back to the Diagram pane or to another project. The Copy command is unavailable until you select any item or any group of items on the Diagram pane of the current project.
CTRL+C
Paste
Pastes the cut or copied items or group of items from the clipboard to the Diagram pane of the current project. MagicDraw creates shapes for items, or a group of items, in the current project. You will see the data and shapes of the pasted items and diagrams in the Browser window. Pastes the cut or copied items or groups of items from the Clipboard to the Diagram pane of the current project. MagicDraw creates new data and data shapes in the current project. Deletes data together with symbol. It is unavailable until you select any item or group of items in the current project.
CTRL+V
Paste With New Data
CTRL+E
Delete
CTRL+D
64
3 U S I N G M A G I C D R AW
Menu System
Command Delete Symbol(s) Select All Select All of the Same Type Copy as EMF Button/ Shortcut keys Function
Deletes a symbol of model element from the diagrams, by leaving it in the model. Selects all items on the Diagram pane of a particular project. Selects all shapes of the selected types in active diagram. Enabled, when one or more shapes are selected in active diagram. Copies the selected model elements to the system clipboard. If no model elements are selected, the active diagram is copied. NOTE Copying as EMF is available only under Windows system.
CTRL+SHIFT +E
Copy as JPG
CTRL+SHIFT +J Copies the selected model elements to the system clipboard as a JPG image. If no model elements are selected, the active diagram is copied. NOTE Copying as JPG is available only under Windows system.
+P
Copies the selected model elements to the system clipboard as a PNG image. If no model elements are selected, the active diagram is copied. NOTE
Copying as PNG is available only under Windows system.
Find
CTRL+F
Quick Find Find TODO
CTRL+ALT+F
Performs a quick search of class/interface, classifier, or diagram. Performs a search for the TODO tagged value. Results are displayed in the Browser, Search Results tab.
65
3 U S I N G M A G I C D R AW
Menu System
Command Paths Button/ Shortcut keys Function
Path Style - choose the line style for drawing a path. Rectilinear drawing rectilinear lines. Oblique - drawing free form lines. Bezier - in computer graphics, a curve that is calculated
All commands that are available through the shortcut menu for a particular symbol.
66
3 U S I N G M A G I C D R AW
Menu System
View menu
Command Fit In Window Button / Hot keys Function
CTRL+W
Zoom In
Reduces the size of the whole diagram to fit in the Diagram pane. To change the zoom step size choose Environment from the Options menu and set the Zoom Step Size property in the Environment Options dialog box. Decreases the size of the selected objects in the diagram pane by x percent.
To change the zoom step size, choose Environment from the Options menu and set the Zoom Step Size property in the Environment Options dialog box. Restores the original size of the selected diagram symbols.
Zoom 1:1
Increases the size of the selected model element on the Diagram pane to the maximum visible size. Repaints all diagram shapes.
Refresh
67
3 U S I N G M A G I C D R AW
Menu System
Command Grid Button / Hot keys Function
Set grid options. Every diagram may have its own grid settings:
Show Grid - show/hide grid Snap Paths to Grid - use/do not
F12
Opens a list of diagrams that were last closed. Clear the check boxes of the toolbars you want to hide or select/clear check boxes to rearrange toolbar modes.
68
3 U S I N G M A G I C D R AW
Menu System
Command Diagram Toolbars: Symbol Editing
Path Editing Edit View Layout Rearrangable Hidable Floatable Expert Mode Customize
Function
Clear the check boxes of the toolbars you want to hide or select/clear check boxes to rearrange toolbar modes.
Status Line
Select the check box of Show Status Bar or Show Memory Monitor to display this info on the status line.
Layout menu
Use the commands of the Layout menu for managing the layout of the shapes on the current Diagram pane. You must select more than one shape for other Layout menu commands. A class diagram should be open and activate before using the Class Diagram command in this menu.
Command Layout Options Quick Diagram Layout (CTRL+Q) Layout Class Diagram Style Layout Activity Diagram Style Layout Business Process Diagram Style Function
Opens the Diagram Layout Options dialog box. Layout options for the diagram can be set. Applies recommended layout with default options on the active diagram. Applies layout, which uses specific layout algorithms to improve class diagram readability. Applies layout, which uses specific layout algorithms to improve activity diagram readability. Applies layout, which uses specific layout algorithms to improve business process diagram readability.
69
3 U S I N G M A G I C D R AW
Menu System
Command Layout Hierarchic Style Function
Applies layout that portrays the main direction or flow of directed graphs. It is ideal for many application areas, especially for Workflow, Software Engineering, Customer relationship management, Configuration management, Process modeling, Database Modeling, and Bio informatics. Applies layout, which specializes in the layout of treestructured graphs. The need to visualize directed or undirected trees arises in many application areas, e.g. Dataflow analysis, Software Engineering, Network management, Bio informatics. Applies layout that is well suited for medium sized sparse diagrams. It produces compact drawings with no overlapping shapes, few crossings, and few bends. All edges will be routed in an orthogonal style, i.e. only rectilinear style links will be used. Applies layout of the organic style graph. Applies layout of the algorithm that portrays interconnected ring and star topologies. It is excellent for applications in social networking (criminology, economics, ...), network management, WWW visualization, and eCommerce. only vertical and horizontal line segments, while keeping the positions of the shapes in the diagram fixed. The routed links will usually not cross through any shapes and not overlap any other links.
Route Paths Orthogonal Style Applies layout, which routes the links of a diagram using
Applies layout, which routes the links of a diagram using oblique link style, while keeping the positions of the shapes in the diagram fixed. The routed links will usually not cross through any shapes and not overlap any other links. Applies layout to the selected shapes according to their width. After the layout, the width of the shapes is equal (according to the widest).
70
3 U S I N G M A G I C D R AW
Menu System
Command Make Same Height Function
Applies layout to the selected shapes according the their height. After the layout, height of the shapes is equal (according to the tallest). Aligns the selected shapes:
Aligns the selected shape(s) vertically, starting with the
Align Right
Left Top Bottom
rightmost shape(s).
Aligns the selected shape(s) vertically, starting with the
leftmost shape(s).
Aligns the selected shape(s) across from the uppermost
shape(s).
Aligns the selected shape(s) across from the lowermost
Center Horizontally
Vertically
a horizontal line.
Spaces between the selected shapes becomes even on
a vertical line.
71
3 U S I N G M A G I C D R AW
Menu System
Diagrams menu
Command Diagrams Customize Diagram Wizards Hot keys Function
Select the required diagram in the list, to create it. The Customize Diagrams dialog box opens. Wizards for creating diagrams may be opened:
Class Diagram Wizard Package Dependency Diagram Wizard Package Overview Diagram Wizard Activity Decomposition Hierarchy Wizard Hierarchy Diagram Wizard Realization Diagram Wizard Sequence Diagram from Java Source
Wizard
Content Diagram Wizard
Previous Diagram
CTRL+0
Next Diagram
CTRL+9
Load All Diagrams
If there are unloaded diagrams in the project, this command loads all diagrams.
72
3 U S I N G M A G I C D R AW
Menu System
Options menu
Command Project Modules Environment Perspectives Look and Feel Function
The Project Options dialog box opens. The Modules dialog box opens. The Environment Options dialog box opens. Choose a command from the submenu - to switch to different Perspective or to Customize. Changes MagicDraw graphic user interface style. Styles: Metal, CDE/Motif, Vsnet (Windows XP), Office 2003 (Windows XP), Eclipse (Windows), Xerto. The Look and Feel Themes command allows you to personalize the graphical user interface: set your favorite colors and fonts.
Interface Style
Tools menu
Command Apply Pattern Hot key Function
The Pattern Wizard dialog box appears. Create the design pattern for the selected class, interface. Opens the Model Transformations Wizard dialog box with a list of all available transformations. Opens the Hyperlink dialog where you can add hyperlinks to any model elements.
Model Transformations
Hyperlinks
73
3 U S I N G M A G I C D R AW
Menu System
Command Report Wizard Hot key Function
The Report Wizard is the new report engine for MD 14.0 and above. It is designed to solve the several problems of the old engines (XSL/XSLT and JPython). It supports text based templates to generate the output file. The format of output file depends on the type of the template file. The type of template files that the Report Wizard supports are normal text, RTF, HTML, Spreadsheet template (need to be saved as HTML format), and XML template (DocBook or FO). All commercial MagicDraw editions will have full use of all features within the Report Wizard. MagicDraw Community edition will allow the user to generate output with watermarks. For more details, see the MagicDraw ReportWizard UserGuide.pdf, which is located in the MagicDraw installation directory, Manual folder.
Software Design Model Enrichment Use Case Model Enrichment Quick Reverse
Opens the Software Design Model Wizard dialog box. Opens the Use Case Model Wizard dialog box. Choose the language you need (Java, Java Bytecode, C++, C#, CIL, CIL Disassembler, IDL, CORBA IDL, DDL, EJB, EJB 2.0, XML Schema, WSDL). Opens the Round Trip Set dialog box. (For more details, see Code Engineering Users Guide).
CTRL+G
Generates code for the selected items in the current diagram. Opens the Message Window with the information appears (For more details, see Code Engineering Users Guide). Checks syntax in the model according to the default code engineering language. Opens the Message Window with the information.
Check Syntax
CTRL+T
74
3 U S I N G M A G I C D R AW
Menu System
Command Set empty tags to defaults Hot key Function
Set default tag value to tag with empty value. This functionality is needed when the stereotype is already assigned to an element and the new mandatory tag definition with default value is created for the stereotype. After creating such a tag definition, the model elements that have the modified stereotype applied will have newly created tags unset. For more information see To create default tag values on page 702.
Integrations CaliberRM
Login Logout Launch CaliberRM Client CaliberRM Requirements
Opens the Integrations dialog box with a list of tools for possible integration with MagicDraw. Integration with CaliberRM. Opens the Login dialog box for login to CaliberRM server. Logs out from CaliberRM server. Launches CaliberRM Client application.
CTRL+ SHIFT+R
75
3 U S I N G M A G I C D R AW
Menu System
Command CVS
Command Line
Hot key
Function
Performs operations with CVS (for detailed description of integration with CVS, see MagicDraw Integrations Users Guide)
Allows the user to enter a CVS command line
(like checkout -c) whenever the CVS command is not available through the menus. The Command Line dialog box opens.
to CVS dialog box opens. NOTE: You can add, update or commit projects to CVS only if they are saved in some checked out directory or subdirectory.
76
3 U S I N G M A G I C D R AW
Menu System
Command ProActivity Import Hot key Function
The Import ProActivity Files dialog box opens. Specify ProActivity files to start the import process. The UML diagrams will be generated depending on the input files. The Export to ProActivity wizard guides the MagicDraw model export process to ProActivity. For more information about C# code engineering, read MagicDraw Code&DatabaseEngineering UserGuide.pdf For more information about C++ code engineering, read MagicDraw Code&DatabaseEngineering UserGuide.pdf
Export
Analyze menu
Hot key
Function
Opens the Model Visualizer dialog box with a list of all available wizards. Metrics functionality allows the measurement of a project by different viewpoints. Specify the metrics scope in the Metrics Options dialog box. Opens the Compare Projects dialog box, where you can choose projects to perform model differencing.
Compare Projects
77
3 U S I N G M A G I C D R AW
Menu System
Command Dependency Matrix Hot key Function
Dependency Matrix is a method of visualizing and representing dependency criteria. Diagrams, UML, and extended UML elements serve as row and column entries. The cells in the matrix show where these elements are associated - related. Choose the Create Blank Matrix command to open the Matrix Dependency View Choose the Matrix Templates command to open the Dependency Matrix Templates dialog box.
For more information about validation, read Validation section. Validates if the symbol owner on the diagram matches the actual element owner in the model. Using the symbol ownership validation feature, shape ownership problems will be highlighted on the diagram pane and you will be able to easily see and resolve them. For more information about shapes checking on diagram see Resource Manager on page 420. Validates if a symbol owner on the diagram matches the actual element owner in the model. Using the symbol ownership validation feature, shape ownership problems will be highlighted on the diagram pane and you will be able to easily see and resolve them. For more information see Resource Manager on page 420. Displays paths among shapes that are already created in the model data. Displays elements related to the selected element.
78
3 U S I N G M A G I C D R AW
Menu System
Command Used By Depends On Go To Hot key CTRL+ALT+U CTRL+ALT+D Function
Finds a list of all elements that reference the current element. Finds a list of the elements that depend on the current element. This is a feature that allows you to find model elements associated with the selected model element. Enabled when a selected element is related to another model element.
Teamwork menu
For a detailed description about Teamwork Server, see MagicDraw Teamwork System Users Guide.
Window menu
You may use commands of the Window menu to manage the layout of the windows.
Command Containment Inheritance Diagrams Model Extensions Search Results Documentation Zoom Hot key Function
Opens the Containment Tree tab in the Browser window. Opens the Inheritance Tree tab in the Browser window. Opens the Diagrams Tree tab in the Browser window. Opens the Model Extensions Tree tab in the Browser window. Opens the Search Results tab in the Browser window. Opens the Documentation tab in the Browser window. Opens the Zoom tab in the Browser window
79
3 U S I N G M A G I C D R AW
Menu System
Command Properties Messages Window Hot key Function
Opens the Properties tab in the Browser window CTRL+M Opens the Messages Window. The Messages Window is used for displaying the warnings and errors that may appear in the project. It appears automatically and is intended to display the warnings and errors after saving, loading, exporting and importing the project. All Browser tabs are placed in their default position. Displays a list of open diagrams. CTRL+ SHIFT+ F4 Closes all open diagrams except the one you currently being used.
Reset Windows Configuration List of opened diagrams Close All Diagrams But Current
CTRL+ ALT+F4
The Window menu contains a list of open diagrams in the project. The list shows the specified number of the recent diagrams. This number can be customized in the Recent Windows List Size property in the Environment Options dialog box. For a detailed description on this dialog box, see the Section Setting Environment Options on page 104.
80
3 U S I N G M A G I C D R AW
Menu System
Help menu
Command Help Contents User Manual Tip of the Day View and Submit Internal Errors Function
Displays a table of contents for the MagicDraw Help. Opens the MagicDraw User Manual. Displays the Tip of the Day screen. View errors received during work with MagicDraw. Send a bug report to the MagicDraw support team. For more information about submitting a bug see Bug Reports on page 36.
Submit a Bug
The MagicDraw team always welcomes your initiative. Submit bugs, suggestions, and new feature requests in the Submit a Bug dialog box. Opens The HTTP Proxy Server Connection dialog box. Set the data for connection to start the MagicDraw UML update. Change/enter the unlock key in the MagicDraw Unlock Key dialog box. Check for available updates and new resources in the Resource/Plugin Manager window. The WWW pages where you can find additional information about MagicDraw and UML. Get online support.
Unlock MagicDraw/Plugin Key Resource/Plugin Manager MagicDraw on the Web Online Support
Online Demo New and Noteworthy MagicDraw Home Page UML Stuff No Magic Home Page
tries as possible.
Puzzle game. Transpose the separate parts to get the
whole picture.
About MagicDraw
81
3 U S I N G M A G I C D R AW
Toolbars
Toolbars
In MagicDraw, you can hide different toolbar parts: right-click the toolbar and select/clear toolbar check boxes you want to be displayed/hidden. You may also save your own toolbar configuration and set it as a default one.
Customizing toolbars
Toolbars configuration shortcut menu has the following commands:
Function
If selected, it is possible to change the toolbar position by selecting the dotted line in front of the desired toolbar group and dragging it to a new location. If selected, there is no possibility to close a separately opened toolbar group (for example, dragged diagram pane) with the X button on the right top corner.
Hidable
82
3 U S I N G M A G I C D R AW
Toolbars
Check box Floatable Expert Menu Mode Function
If selected, the toolbar group can be dragged to any desirable position inside the MagicDraw borders. If selected, all menu commands will be listed on the menu. Otherwise, the command list will be shortened and you can expand it by clicking the arrow on the bottom. If selected, displays all toolbar buttons, which were marked to be shown in the Expert mode perspective. Opens the Customize Main Toolbars dialog box.
To customize toolbars
1. From the toolbars configuration shortcut menu, select Customize. The Customize
section. 3. If add button was selected, the Add Button dialog box opens. Choose the desired command from the tree and click OK. The button will be added in the selected main toolbar section.
83
3 U S I N G M A G I C D R AW
Toolbars
If the choice was made to add a toolbar, the Enter Toolbar Name dialog box opens.
Type the name and click OK to create a new toolbar section, to which a new button group can be added.
Figure 16 -- The Customize Main Toolbars dialog box Button Add Edit Remove Up Down Reset to Defaults Function
Adds new button or toolbar. The Edit Icon dialog box opens. Click the ... button to add an icon to the selected toolbar button. Removes the selected button from the toolbar section. Moves the selected button up the toolbar list. Moves the selected button down the toolbar list. Resets changes made to the toolbar back to the default settings.
84
3 U S I N G M A G I C D R AW
Using the Browser
Main Toolbar
NOTE To scroll diagram items in the toolbar, select the scrollable toolbar buttons on the diagram toolbar. Using these buttons, you may scroll down or up through the toolbar in order to select the item of the diagram.
The Main Toolbar contains a Projects list box with all open and created project names. MagicDraw UML supports multiple projects, so you may open and create as many projects as you wish. However, you can only work with one project at a time. If you wish to work with another open or created project, select it from the Projects list box.
To configure external tools, go to the Options main menu, select Environment, then select the External Tools pane. For more information, see the section External Tools on page 130.
The Browser provides a visual representation of the hierarchy of your model elements. The items in this hierarchy are either:
Compressed - a plus sign next to an icon indicates that the icon is compressed, which means that it contains other model elements. This is the default setting when you start your application. Click the plus sign to expand the icon and view its subordinate items. Expanded - a minus sign next to an icon indicates that the icon is fully expanded. Click the minus sign to collapse the item.
If there is no sign next to an icon, it does not contain other model elements.
85
3 U S I N G M A G I C D R AW
Using the Browser The Browser is a hierarchical navigation tool that allows you to manage your model data, including packages, components, classes, all UML diagrams, extension mechanisms, and other data. The Browser may be used as an alternative tool to the menus and toolbars that are in MagicDraw. It is easier to work with project diagrams and data elements using the Browser. The Browser performs the following operations:
Creation and specification of model elements without viewing them. Copying, cutting, and pasting of model elements. Opening and deleting of model elements. Dragging and dropping of model elements to the Diagram pane and inside the Browser. Dragging and dropping of data in the Code engineering sets (you may create data in the Data branch, drag it to the Code Engineering sets, and then the round trip object is created automatically). Hierarchical viewing of all model elements. Trace viewing for the selected model element. Symbol creation for the selected model element in the current diagram. Managing diagrams. Managing extension mechanisms such as constraints, stereotypes, and tagged values. Java reversing of a class directly from the classpath. Adjusting the code engineering sets. Code generation for particular sets. Filtering of the visible items, by any model type,(e.g. class, package, operation, component, state and others - for both views and dates), when the Filter from the Browser shortcut menu is selected. Sorting of the visible items for the selected model element. Sorting of all model elements. Displaying search results.
86
3 U S I N G M A G I C D R AW
Using the Browser
The Inherence tree tab represents the class hierarchy of the project. The Model Extensions tree tab represents all predefined and created constraints and stereotypes. The Search results tab displays search results.
Documentation/Zoom Control part. The Documentation tab shows documentation associated with the selected item. The Zoom Control tab is responsible for zooming the current diagram.
Figure 17 -- Browser
87
3 U S I N G M A G I C D R AW
Using the Browser When at least one Project is open, the Browser is placed to the left side of the main window. Beginning with MagicDraw version 7.5, it is possible to move the Browser to any place on the the MagicDraw application. Also, all tabs can be viewed separately and you may set up the Browser according to your needs by hiding the desired tabs. To change the size of either part of the Browser
Drag the bar that separates the two parts.
Containment tree
The Containment tree displays model data, grouping it in logical sets. To open the Containment tree
Click the Containment Tree tab at the top of the Browser.
88
3 U S I N G M A G I C D R AW
Using the Browser
If the Containment tree is hidden, from the Window menu, select Containment Tree.
To show full information of operations, attributes, and relationships in the Containment Tree
In the Containment Tree tab, click the Show Full Types in Browser button
1. Choose Environment command from the Options menu. The Environment Options dialog box appears. 2. In the Browser tab, set the Show Full Types in Browser check box to true (default false).
1. Select Environment from the Options menu. The Environment Options dialog box opens. 2. In the Browser tab, set the Show Stereotypes in Browser check box to true (default false).
89
3 U S I N G M A G I C D R AW
Using the Browser To show/hide Code Engineering sets branch
In the Containment Tree tab, click the Show Code Engineering Sets button
1. Select Environment from the Options menu. The Environment Options dialog box opens. 2. In the Browser tab, set the Show Code Engineering Sets check box to true (default true).
To show/hide Modules
In the Containment Tree tab, click the Show Modules button
1. Select Environment from the Options menu. The Environment Options dialog box opens. 2. In the Browser tab, set the Show Modules check box to true/false (default true).
Data branch
The Data branch represents the model and structure of a project. All model elements are stored in packages. This helps you distribute data into logical groups. By default, all new model element data (inner structure) are stored in the Data package. You may create your own packages for storing your model element data. The Data branch also contains the File View package, UML Standard Profile with stereotypes and data types, and Relations package (appears only when at least one path is drawn on the diagram pane). The File View package is where the components are placed during code engineering. The UML Standard Profile contains a list of stereotypes, data types, and elements from the UML 2 metamodel. To create a new element
1. Select New Element from the package in the Browser shortcut menu and then select the desired element from the list. 2. Type the name of the element directly in the Browser tree.
90
3 U S I N G M A G I C D R AW
Using the Browser For more information about managing model elements from the Browser, see Working with Model Elements in the Browser Tree on page 99.
91
3 U S I N G M A G I C D R AW
Using the Browser To generate code from the selected set
1. Select Generate from the set shortcut menu. The Code Generation Options dialog box opens. 2. Adjust the code generation options. 3. Click OK. The Messages Window dialog box opens. Information about generated files is shown.
To check syntax
Select Check Syntax from the set shortcut menu. If no errors are found, then a message box opens stating there are no syntax errors in the model.
92
3 U S I N G M A G I C D R AW
Using the Browser
Diagrams tree
The Diagrams tree in the Browser represents the external structure of a diagram.
In the Diagrams tree, with the selected diagrams, you can perform the operations listed below. To group diagrams according to their diagram type
Click the Group by Diagram Type button
From the shortcut menu, select the Group by Diagram Type check box.
93
3 U S I N G M A G I C D R AW
Using the Browser To open the selected diagram from the Browser
Select Open from the item shortcut menu or double-click the item in the diagram.
94
3 U S I N G M A G I C D R AW
Using the Browser
Inheritance tree
The Inheritance tree represents classifiers, packages, data types, and stereotypes hierarchy within your project. Inheritance according to the UML Specification is shown using the generalization relationship.
For more information about managing model elements from the Browser, see Working with Model Elements in the Browser Tree on page 99. To show stereotypes in the Inheritance tree
In the Inheritance Tree tab, click the Show Stereotypes in Browser button
1. Select Environment command from the Options menu. The Environment Options dialog box opens.
95
3 U S I N G M A G I C D R AW
Using the Browser
2. In the Browser tab, set the Show Stereotypes in Browser check box to true (default false).
1. Select Environment command from the Options menu. The Environment Options dialog box opens. 2. In the Browser tab, set the Show Only Hierarchies check box to true/false (default false).
1. SelectChoose Environment command from the Options menu. The Environment Options dialog box opens. 2. In the Browser tab, set the Invert Tree check box to true/false (default false).
96
3 U S I N G M A G I C D R AW
Using the Browser It is mainly used for the work of a team using Teamwork server for locking for edit/unlocking extension mechanisms.
From the Model Extensions Tree shortcut menu, select the Group by Profiles check box.
From the Model Extensions Tree shortcut menu, select the Group by Metaclasses check box.
97
3 U S I N G M A G I C D R AW
Using the Browser
For information about how to perform a search, see Searching on page 161. To open the Find dialog box from the Search Results Tree
Click the Find button , or press CTRL+F keys.
98
3 U S I N G M A G I C D R AW
Using the Browser
To copy/cut and paste the selected model element in the Browser tree
1. Select Copy or Cut from the item shortcut menu. 2. Select the item where you wish to put the model element. 3. Select Paste from the item shortcut menu.
To copy/cut and paste the selected model element among different projects
1. Select Copy or Cut from the item shortcut menu. 2. Change the project name in the Projects list on main window toolbar. 3. Select where you wish to put the element. 4. Select Paste from the item shortcut menu.
99
3 U S I N G M A G I C D R AW
Using the Browser
3. The Items Filter dialog box opens. Clear the check boxes of those model elements that you would not like to appear in the Browser tree.
Multiple selection
A group of model elements can be selected within the Browser tree and you can edit all the selected model elements at the same time. To make multiple selections
Hold down the SHIFT key and click the last element you wish to include in the multiple selection. For more precise selection, hold down the CTRL key and click (while holding the key down) with the mouse on the elements you wish to select.
100
3 U S I N G M A G I C D R AW
Using the Browser
Documentation/Zoom Control/Properties
Documentation tab
The Documentation tab shows information associated with the selected model element in the Browser tree or diagram.
101
3 U S I N G M A G I C D R AW
Using the Browser
To zoom in for a close-up view of your diagram, or to zoom out and see more of the diagram at a reduced size
1. Click the Zoom tab in the Browser window. 2. Drag the rectangle. NOTE By default the zoom slider is not visible. To display the zoom slider in the Zoom tab, in the Environment Options dialog box, Browser tab, select the Show Diagram Zoom Slider check box.
Quickly access any part of the diagram using the Zoom tab
Drag the blue square to the desired part of the diagram. The desired diagram part will be displayed in the diagram window.
102
3 U S I N G M A G I C D R AW
Using the Browser
Properties tab
Since MagicDraw version 8.0, you can edit model elements and diagram properties such as data, symbol properties, or language properties directly from the Browser, Properties tab. The Properties tab has two modes - Standard and Expert. Choose the mode that best suits your needs.
103
3 U S I N G M A G I C D R AW
Setting Environment Options
104
3 U S I N G M A G I C D R AW
Setting Environment Options Buttons available in the Environment Options dialog box
Reset to Defaults OK Cancel Help Resets all properties to the default settings. Saves changes and exits the dialog box. Exits the dialog box without saving changes. Displays MagicDraw Help.
105
3 U S I N G M A G I C D R AW
Setting Environment Options
General pane
Change the appropriate fields according to your preferences. If the check box is selected, the description False changes to True.
Property name Use icons in dialogs Function Icons are shown on the button of dialog boxes.
106
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Language Function Select the language for the MagicDraw GUI:
Default according to your application. It is set by default. English French German Italian Japanese Korean Portuguese Brazil Spanish Thai NOTE Restart MagicDraw to apply changes to the language property.
Show font face in font list Mark elements with active hyperlink Show status bar Show memory monitor Create backup file Save project recovery data on idle Idle time to activate recovery save Open last project on startup Diagrams load mode
Font names that are listed in the Font drop-down list box on the main toolbar will be displayed in the original font. Shows active hyperlink arrow on the element symbol. Shows status bar line at the bottom of the MagicDraw window. Shows the project memory usage line at the bottom of the MagicDraw window. Backup files of your projects will be created. Backups are saved with the name pattern old_name.xml.bak or old_name.xml.zip.bak. Saves AutoRecovery file of the open project(s) when a system is not in use. Enter the system idle time (in minutes). This is the amount of time until the file recovery save is activated. The last project of your previous session will be opened next time you start MagicDraw. Select how to load diagrams after opening a MagicDraw project.
Load all Diagrams opens all diagrams that are in the project. Load Only Open Diagrams (default) opens only diagrams that
the project.
Save rich XMI Saves maximum additional information to an xmi file, which is not required for MagicDraw load but may be needed when using other tools.
107
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Save UUID Check dependency on module export/share Possible choices:
Do not check Allow dependencies (default) Do not allow dependencies
Function
Save settings on exit Show tip of the day Recent files list size
The altered settings within the current MagicDraw session will be stored and applied for all future sessions. Shows the Tip of the Day dialog box every time you start MagicDraw. Type the number of projects to appear in the File menu. Click the file name to open it. The maximum file list size is 10. The file name list shows files that were used in MagicDraw. Type the number of recently used windows that are listed in the Window menu. Click the window name to make it active. The maximum windows list size is 10. Type the number of actions that will be available for undo/redo operations. They will be listed in undo/redo drop down lists on the main toolbar. The maximum undo/redo list size is 500. Saves the diagram with background. By default, the diagram background is white after saving as image. This is a JPEG format option. This is an SVG format option. This property is DPI property value with numeric value range from 1 to 4800. Default value is 72. Define image size in percent. Default value is 100%. For example; if 200% is defined, then the view is enlarged (zoomed) before generating an image. Raster image will not loose quality as additional pixels are introduced. This is a TIFF format option. This is a TIFF format option. Choose the font that will be used in the Help window.
Save diagram background in image JPEG Compression Quality Use SVG <text> tag for text output Image resolution (DPI) Exported image size [%] TIFF Color Space TIFF Compression Help font
108
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Help server port Use model enrichment wizard Function The default Help server port is 1111. Change it if some other server is using this port. The Use Case Model Wizard dialog and the Software Design Model Wizard dialog are model enrichment wizards. To invoke the Use Case Model Wizard dialog from the Tools main menu, choose the Use Model Enrichment Wizard command. To invoke the Software Design Model Wizard dialog from the Tools main menu, choose the Software Design Model Enrichment command. For more information about reports generation see "MagicDraw ReportWizard UserGuide.pdf" which is in <MagicDraw installation directory>\Manuals folder. Show model enrichment suggestion dialog Specification opening mode For more information about reports generation see "MagicDraw ReportWizard UserGuide.pdf" which is in <MagicDraw installation directory>\Manuals folder. Possible choice:
In the same window In a new window
Recent specifications list size Specifications history size Opaque Expression default language
Specify the list size for specifications. Possible range 1 to 20. Specify the history size for open element specifications. Possible range 1 to 20. Possible choices:
English OCL
Possible choices:
1 2 3 4 5 All Lines
The main toolbar is hidden when the diagram full screen mode is turned on. To display the main toolbar, clear the Hide toolbars in full screen mode check box in the Environment Options dialog box, General pane, General group.
109
3 U S I N G M A G I C D R AW
Setting Environment Options
Diagram pane
110
3 U S I N G M A G I C D R AW
Setting Environment Options
Figure 25 -- Environment Options dialog box. Diagram pane Property name Text antialiasing Graphics antialiasing Grid style Validate Shape Ownership Function Smooths the jagged edges of text. Smooths the jagged edges of graphics. Select one of the following styles of the grid: Dense or Sparse.
Validates if the symbol owner on the diagram matches the actual element owner in the model. Using the symbol ownership validation feature, shape ownership problems will be highlighted on the diagram pane and you will be able to easily see and resolve them.
For more information see Resource Manager on page 420. Type the period in seconds to check diagram for symbol ownership problems.
Shape Ownership Validation Period (seconds) Edit name with stereotypes Show manipulation highlighting
Allows the management of stereotypes by editing the stereotype name directly on the Diagram pane. Enable error highlighting of the modeling process. This helps you to see the errors in the model at drawing time. The valid and invalid actions will be highlighted in different colors (defaults are red for invalid actions, blue for valid actions). Operations and attributes can be selected, then dragged & dropped to another class. When a path is drawn in various directions, this option removes loops from the path. Applies the created stereotype style to a symbol when adding the stereotype to an element. Applies the stereotype style in teamwork for unlocked diagrams.
Allow class members selection Optimize paths Apply stereotype style for all symbols Apply stereotype style for symbols in unlocked diagrams Mark selected labels Display paths on element drop
Mark path labels after a path is selected. When dragging and dropping an element from the Browser or executing a Create Symbol action, the path to the existing symbols is created.
111
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Insert Element Function Splits the path into two paths by drawing a symbol on it and inserts this symbol according to the choice. Possible choices:
Before path After path Do not insert Ask where to insert NOTE: This is valid only in state and activity diagrams.
Specifies if shape size shall be set to preferred after one of shapes compartments is supressed in the diagram. Possible choices:
Never; Always; If no connected paths (default).
Auto completion includes metaclasses Auto completion includes elements from profiles and modules
If selected, the list of available elements to choose , element types, or stereotypes includes metaclasses (in MagicDraw metaclasses are placed in the UML Standard Profile. Default value is false. When selected, the list of available elements to choose, element types, or stereotypes includes elements, which are placed in profiles and modules. Default value is true. NOTE: This option toggles all profiles except UML Standard Profile.
Zoom step size Center on the mouse location when zooming Show Smart Manipulations Mouses Left Button Action
Type in the step value of zooming your diagram views. Step value should be in the range from 0.1 to 1.0. Centers zooming according to mouse arrow. Set smart manipulator visibility. For a detailed description about the smart manipulation feature, see Smart Manipulation on page 221 Possible choices: Create element - target element is created during the creation of a path after a mouse click on the diagram pane. Make a break point - set a break point for the path after a mouse click.
112
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Smart Manipulator appearance Function Possible choices:
Mouse Over Shift
Shows element names in toolbars near icon. Change toolbar appearance near diagram pane. Possible choices:
Right Left
113
3 U S I N G M A G I C D R AW
Setting Environment Options
Browser pane
114
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Browser position Function In the drop-down list, select Left if you wish the browser to appear on the left side of the workspace. Select Right if you wish the browser to appear on the right side of the workspace. Shows code engineering set items in the browser. Shows the full attributes, operations, and relationships data. Shows/hides the profiles, modules with applied <<auxiliaryResources>> stereotype in the Browser. If Show Auxiliary Resources option is false and profiles/modules are not displayed in the Browser, while exporting module, a message will appear. Always sort browser items alphabetically. Shows stereotypes that are assigned to the model elements. Highlight edited or added model elements and diagrams in the Browser. Shows hyperlinks that are assigned to the model elements. Groups diagrams according to diagram type in the Diagrams tree. When selected, classifiers without hierarchies are not displayed in Inheritance tree. In this case, Inheritance tree displays only classifiers connected with the generalization relationship. When selected, hierarchies are inverted so that at the top of the hierarchy, the specific element is displayed. Displays warning when element was not found in the Inheritance tree.
Show code engineering sets Show full types in browser Show Auxiliary Resources Show message on auxiliary modules visibility during use Sort always Show stereotypes in browser Show changes in browser Show hyperlinks in browser Group by diagram type Show Only Hierarchies Invert Tree Display warning when element is not found in inheritance tree Group by Profiles Group by Metaclasses Show diagram zoom slider
Stereotypes, tagged values, and constraints are grouped by profiles in the Model Extensions Tree. Groups stereotypes by Metaclass in the Model Extensions Tree. Shows zoom slider in the Zoom Control tab.
115
3 U S I N G M A G I C D R AW
Setting Environment Options
Teamwork pane
Figure 27 -- Environment Options dialog box. Teamwork pane Property name Auto login to server Teamwork server name Show commit warning Show modules versions conflict warning Function The user automatically logs on to the Teamwork Server when MagicDraw starts. Shows the name of your teamwork server. The warning appears while committing a project to the Teamwork Server. The warning appears when two modules (or module and a project) use the same submodules.
116
3 U S I N G M A G I C D R AW
Setting Environment Options
Floating pane
This pane is available only if you use MagicDraw Floating License.
Figure 28 -- Environment Options dialog box. Floating pane Property name Floating license server name Floating license server port Auto login to floating license server Function Specify the name of the Floating License Server. Enter the port number of the Floating License Server. The server may be started on many different ports. If selected, automatically logs in to the Floating License Server when MagicDraw starts.
117
3 U S I N G M A G I C D R AW
Setting Environment Options
CVS pane
Figure 29 -- Environment Options dialog box. CVS pane Property name Add project to CVS after saving Commit project to CVS after saving Update project from CVS before loading Location of .cvspass Local folder Function When a new project is saved, it will be added to the CVS checked out directory. The Add Project to CVS dialog box appears. Commits project to CVS after saving it. The Commit Project to CVS dialog box opens. Updates the project from CVS before loading. The Update CVS Project dialog box opens. The path where the .cvspass is located. You may type it or choose the path from the Open dialog box. The path where the module will be saved on checkout action. You may type it or choose the path from the Open dialog box.
118
3 U S I N G M A G I C D R AW
Setting Environment Options
Update pane
119
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name
Function
Use HTTP proxy server If selected, uses the HTTP Proxy Server when MagicDraw is checking for updates. HTTP proxy server address HTTP proxy server port HTTP proxy server user Authenticate HTTP proxy server Type the HTTP Proxy Server name or IP address. Type the port of the HTTP Proxy Server. The default number is 8080. Type the name of the HTTP Proxy Server user. Authenticates the HTTP Proxy Server.
120
3 U S I N G M A G I C D R AW
Setting Environment Options
Keyboard pane
Figure 32 -- Environment Options dialog box. Keyboard pane Property name Category Function The list of all available categories of the keys (File, Edit, Tools, etc.). The default item in this choice is always All Categories. Selecting the category opens its content in the Commands list. The list of commands from the selected category. If All Categories is selected in the Categories list, all commands of an application are shown in this list. Commands are sorted alphabetically. Selecting the command shows the preset shortcut keys in the Current keys list. The list of keys assigned to the selected command. The field for entering a new shortcut key. Puts a human representation of any key pressed in the field. If the key pressed is already assigned to another command, the Currently Assigned To label appears with the current command name using that key.
Commands
121
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Currently assigned to Assign Remove Remove All Function Shows the name of the command for the new key entered when this key is already assigned to some other command. By default is hidden. This label is only visible if the entered key is already assigned to another command. Assigns the key entered to the selected command. The key entered is added to the Current Keys list. Removes the selected keys from the selected command. Removes all keys from the selected command.
Plugins pane
122
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Name Provider Version Loaded Enabled Disable/Enable Function The name of the plugin. The name of the company which provides the plugin. Version number of the selected plugin. Indicates if the plugin is correctly loaded. Shows the status of the plugin. If True, the selected plugin is activated in MagicDraw. Disables or enables the selected plugin.
123
3 U S I N G M A G I C D R AW
Setting Environment Options
Resources pane
Displays the external resources such as dtd, xsd, etc. that are used in MagicDraw.
Function Define external resources that will be used in XML parsing. The location of the external resource. The URI of the external resource.
124
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Edit Add Remove Configure Ignored Resources URI Edit Add Remove The URI of the external resource that will not be ignored in MagicDraw. Edit the URI of the ignored external resource in the External Resource dialog box. Add a new external resource that will be ignored. Remove the selected ignored resource from the list. Function Edit the location and the URI of the resource in the External Resource dialog box. Add a new external resource. Remove the selected resource form the list.
125
3 U S I N G M A G I C D R AW
Setting Environment Options
Figure 35 -- Environment Options dialog box. Path Variables pane Property name Name Value Description Edit Add Remove Function Any name for a path variable. Path to the folder. Description of the path variable. In the list, select an existing path variable. Double click on the item in the list, or click the Edit button. The Path Variables dialog box opens. Edit the path variable. The Path Variables dialog box opens. Specify a name, value, and description for the new path variable. Remove the selected path variable.
126
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Show suggestion to use path variables Function In all places where path variables can be used, after specifying absolute path is suggested to use proper path variables. For this, the Use Path Variables dialog box will open.
Launchers Pane
Figure 36 -- Environment Options dialog box. Launchers pane Property name Default Launcher Default Browser Defined Launchers Edit Add Opens the Launcher Properties dialog box for editing launcher information. Adds a launcher in the Launcher Properties dialog box. Function The Launcher Properties dialog box opens. The Launcher Properties dialog box opens.
127
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Remove Function Removes a launcher from the list.
Experience Pane
Figure 37 -- Environment Options dialog box. Experience pane Property name Main Menu Expert Mode Context Menu Expert Mode Main Toolbar Expert Mode Diagram Main Toolbar Expert Mode Function Toggles visibility of the main menu by adding/removing arrows to expand menus. Toggles visibility of the context menu actions by adding/hiding them, depending on which mode they were set to appear. Toggles visibility of the toolbar menu buttons by adding/hiding them depending on which mode they were set to appear. Toggles visibility of the diagram toolbar menu buttons by adding/hiding them depending on which mode they were set to appear.
128
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Diagram Elements Toolbar Expert Mode Properties Mode Function Toggles visibility of the diagram elements toolbar menu buttons by adding/ hiding them depending on which mode they were set to appear. Possible choices:
Standard Expert All
Toggles visibility of buttons in the smart manipulators menu depending on which mode they were set to appear. Toggles visibility of the report templates.
129
3 U S I N G M A G I C D R AW
Setting Environment Options
External Tools
Figure 38 -- Environment Options dialog box. External tools pane Property name Name Command line Function Name of the command, which will appear in the external toolbar. The command line is executed upon selection. The command line can include the project file name variable, $project_file$, if it depends on the MagicDraw project file name.
130
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Save before run Function Actions, which can be made with a project (save/export) before starting external tools that use a MagicDraw project file. Possible choices:
Save project Do not save EMF UML2 (v1.x) XMI EMF UML2 (v2.x) XMI
The External Tool dialog box opens. You may change the name, icon, command line text , and project save/export options here. The External Tool dialog box opens for new external tool configuration. Removes the selected external tool from the list.
131
3 U S I N G M A G I C D R AW
Setting Environment Options
Figure 39 -- Environment Options dialog box. EMF UML2 (v2.x) XMI Options pane Property name Export Saved Model to EMF UML2 XMI Function Exports MagicDraw models (without diagrams) to UML2 format. Possible choices:
Do not Export Ask Before Export Always Export
If true, a message is displayed requesting confirmation to overwrite previously exported files. If selected, ID of the same exported element will not be changed when performing export several times.
132
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Apply MagicDraw UML Standard Profile Stereotypes Apply EMF UML Profile Stereotypes Show 'Stereotypes from the same profile' warning Display warnings in Message Window Function MagicDraw contains standard UML stereotypes and EMF has standard UML stereotypes as well. If selected, exported elements will have stereotypes from the MagicDraw UML Standard Profile applied. If selected, exported elements will have stereotypes from the EMF UML profile applied. If true, warnings that the stereotype will not be applied to the element, if this element is in the same profile with the stereotype, will appear when exporting. If selected, warnings related to project export, will be listed in the Message Window.
Figure 40 -- Environment Options dialog box. EMF UML2 (v1.x) XMI Options pane
133
3 U S I N G M A G I C D R AW
Setting Environment Options
Property name Export Saved Model to EMF UML2 XMI Function Exports MagicDraw models (without diagrams) to UML2 format. Possible choices:
Do not Export Ask Before Export Always Export
Ask to overwrite exported files Preserve Exported IDs Apply MagicDraw UML Standard Profile Stereotypes Apply EMF UML Profile Stereotypes Show 'Stereotypes from the same profile' warning Display warnings in Message Window Export Element Tag as
If true, a message is displayed for requesting confirmation to overwrite previously exported files. If selected, ID of the same exported element will not be changed when performing export several times. MagicDraw contains standard UML stereotypes and EMF has standard UML stereotypes as well. If selected, exported elements will have stereotypes from the MagicDraw UML Standard Profile applied. If selected, exported elements will have stereotypes from the EMF UML profile applied. If true, warnings that the stereotype will not be applied to element, if this element is in the same profile with the stereotype, will appear when exporting. If selected, warnings related to project export will be listed in the Message Window. Possible choices:
Qualified Name ID
134
3 U S I N G M A G I C D R AW
The chosen style will not look exactly like the applications in those operating systems because every style of graphical interface is implemented within a Swing library, but it will look quite similar.
135
3 U S I N G M A G I C D R AW
Depending on which operating system you use, some choices might be unavailable to you. For example, Windows9x/NT users may not switch to the Mac interface style. Look and Feel Themes themes listed in Look and Feel Themes are valid only for the metal style. Choose from any of the following themes:
Aqua Contrast Big Contrast Green MagicDraw Big MagicDraw Khaki Ocean Custom set your own options in the Properties dialog box.
136
3 U S I N G M A G I C D R AW
Assigning Shortcut Keys To make the Browser tab a separate window From the Browser tab title shortcut menu, select Floating, and move the window to any desired position
If the Dockable check box is selected, the floating tab window will appear in a fixed edge position after trying to move it outside the MagicDraw window borders.
the dialog box. For more information about the Keyboard pane, see Keyboard pane on page 121.
137
The term project is used to describe the problem that must be solved, including all the possible solutions for how the problem can be resolved and finally developed. All work in MagicDrawTM UML is organized into projects. Project is the top entity where all model-related data (the set of diagrams) is held. Project data is organized by object orientation, which makes its management intuitive and in accordance with the problem that is being solved. In this Section, you will find the following chapters:
1. "Creating a Project", on page 138. 2. "Saving a Project", on page 145 3. "Opening a Project", on page 147 4. "Importing a Project", on page 148 5. "Exporting a Project", on page 148 6. "Setting Project Options", on page 158 7. "Searching", on page 161 8. "Project Partitioning", on page 172
Creating a Project
View Online Demo MagicDraw Basics
138
You can also create your own packages for holding the model elements. By default, packages cannot be deleted or renamed in a project (except for the File View package). To start a new project, you must create a new workspace for it. To create a new workspace for a blank project
From the File menu, select New Project. On the main toolbar, click the New Project button. Press shortcut key CTRL+N.
In all cases, the New Project dialog box opens. 1. Select the Blank Project icon. 2. Specify the file name in the Name text box. 3. Click the ... button to select the location to store a newly created project in your computer. Click OK.
139
NOTE
Data may only be exchanged between projects that are currently open within MagicDraw. You may not copy/paste elements between instances of different tools that are currently running or to other applications.
140
In all cases, the New Project dialog box opens. 1. Select the New Project from Existing Source icon. 2. Specify the file name in the Name text box. 3. Click the ... button to select the location to store a newly created project in your computer. 4. Select a code engineering language from the list by clicking the ... button and click OK.
Figure 43 -- New Project dialog box - New Project from Existing Source 5. The Round Trip Set dialog box opens. Add the source files to enable code engineering to reverse them into a newly created project.
141
C++, CIL, Java, C#, DDL, EJB, WSDL, XML Schema, Metamodeling, RUP extensions, CORBA IDL, and UMLWebExtension templates are available in the New Project dialog box. To create a new project from a specified template
From the File menu, select New Project. On the main toolbar, click the New Project button. Press shortcut key CTRL+N.
In all cases, the New Project dialog box opens. 1. Select the New Project from Template icon. 2. Specify the file name in the Name text box. 3. Click the ... button to select the location to store a newly created project in your computer.
142
Figure 44 -- New Project dialog box - New Project from Template The newly created project from a template will contain specific model elements and stereotypes. TIP! All MagicDraw templates are located in the <MagicDraw installation directory>/ templates folder so you can import the desired template into your previously created project using the Import MagicDraw Project command from the File menu.
143
In all cases, the New Project dialog box opens. 1. Select the Use Case Project icon. 2. Specify the file name in the Name text box.
Click the ... button to select the location to store a newly created project in your computer.
Figure 45 -- New Project dialog box - Use Case Project The newly created project will automatically load the UseCase Description Profile. Also Actor, High-Level Use Case and System-Level Use Case packages will be created in the Data tree. Additional properties will be displayed in the newly created use cases Specification dialog box.
144
Saving a Project
IMPORTANT! The native MagicDraw format is *.mdzip and *.mdxml. Saving in *.xml, *.xml.zip format will also be allowed.
To save changes for later sessions, revised projects must be saved. While saving, you can edit the name of the project and the file format. To save the project
1. From the File menu, select the Save Project or Save Project As command. Alternatively, you can click the Save button on the main toolbar or press the shortcut keys CTRL+S. The Save dialog box opens. 2. Select the destination directory (where you wish to save the project) and type the chosen file name. 3. Select the format for saving a project: Packed MagicDraw File Format (*.mdzip) (default) or MagicDraw File Format (*.mdxml)
145
Figure 46 -- Save dialog box NOTE If the Create Backup File check box is selected in the Environment Options dialog box, MagicDraw always creates a backup file of the previously saved project. The backup is held in a file with a name identical to that of the project. For a detailed description of the Environment Options dialog box, see Setting Environment Options on page 104.
Autosave
After you stop working with MagicDraw, an idle time passes and the current project is saved to a special file called the AutoRecovery file.
146
Opening a Project
IMPORTANT! The native MagicDraw format is *.mdxml, or *.mdzip. To edit or review previously created projects
1. From the File menu, select Open Project or click the Open Project button on the main toolbar. 2. In the Open dialog box, select the project you wish to open and click Open. Drag-and-drop the project you wish to open directly from the open window to MagicDraw and the project is started immediately. Double-click a project file with the *.mdxml or *.mdzip extension, it will open a new MagicDraw application window. NOTES: If the Open Last Project on Startup check box in the Environment Options dialog box is selected, the last project you worked with will be opened right after MagicDraw starts. XMI v2.1 is the native MagicDraw file format for model storage. But this format does not specify how to store diagrams. So, if you use MagicDraw to open an XMI file exported from another tool, only the model will be loaded (not diagrams or views). MagicDraw can not "import" XMI, it can only open it. For model interchange you should use the RConverter. For more about RConverter, See Reusing model parts between models on page 188.
TIP:
You may load more than one project within the same MagicDraw session. A separate workspace will be created for each project that is opened.
147
Importing a Project
To import a previously created project to an open project
1. From the File menu, select Import. 2. The Import dialog box opens. Select the project you want to import and click OK. The diagrams of the imported project are placed in the open project.
Exporting a Project
Exporting a module of a project
You can export part of a project as a module and share it with other users/projects. For more information about data partitioning, see Project Partitioning on page 172.
You can save (export) the created project as a template and use the same project for creating other new projects. To export project as template
1. Open a project you want to export as a template. From the File menu, select Export and then Template. 2. The Export Template dialog box opens. 3. Type the name and a description of the template.
148
Figure 47 -- Export Template dialog box Box Template Name Description OK Cancel Help Function Type a template name. Type information about the template. Exports the template and the description to the Templates folder. Closes the dialog box without exporting the template. Displays MagicDraw Help
149
MOF export
Under File->Export->MOF group there are 2 items MOF Whole Model, MOF Selection. Exporting the whole MOF model To export the whole model into the MOF, from the File main menu, select Export, MOF, and then MOF Whole Model. The Select Target File dialog box opens (see Figure 48 on page 151).
150
Select directory to export the file, type the file name. At the right side of dialog box you can choose to export EMOF or CMOF. The extension of file is by default .cmof or .emof correspondingly. After this the whole model is exported except the model parts marked as auxiliary resources (UML standard profile, Metamodeling profile, etc). Select or clear the Validate check box for validating the MOF model export. When export runs, the exported model is also checked using the appropriate (CMOF/EMOF) validation suite. For more information about MOF model validation, see Validation constraints on page 152. Exporting the selected part of the MOF model To export the selected part of the model into the MOF, from the File main menu, select Export, MOF, and then MOF Selection. The Select Packages to Export dialog box opens (see Figure 49 on page 152). Select one or multiple packages to choose the model part to be exported. After this the selected model part (package granularity level) is exported to CMOF or EMOF correspondingly.
151
Metamodeling template
You can create a new project using a Metamodeling template. Template contains Metamodeling profile usage. It can be used as a starting point for developing your own metamodels. Also look at the Ecore Metamodel Example in the samples directory for a larger example of how to use the profile. For more information about templates usage, see "Creating a new project from a previously created template", on page 142.
Validation constraints
There are 2 new validation suites for testing the model being exported to MOF (1 each for CMOF and EMOF). These suites contain batches of rules, which display warnings about elements not being exported. Rules are run together with model export (if the Validate checkbox is checked).
152
153
Exporting to BPEL
The Business Process Execution Language (BPEL) is an XML schema language for specifying the automated business processes bidirectionally between multiple enterprises using Web Service technology. The BPEL is suitable for all technical staff to manipulate data of process and execute the business process. The MagicDraw UML BPEL Export exports the Business Process diagram to the valuable BPEL, based on BPEL specification v.1.1. The Business Process Diagram (BPD) is a helpful tool for business analysts/users to generate a model for business processes. Different from other UML diagrams such as an Activity Diagram or a Use Case Diagram, the BP diagram allows technical staff to easily understand and implement business diagrams. To optimize the valuation of BPD, converting BPD to the execution form (BPEL), which can use the benefit of Web Service, is quite a challenge. To export a BP diagram to BPEL
1. Create Business Process diagram. 2. From the File menu, select Export and then BPEL. The BPEL Export dialog box opens. 3. Select the existing Business Process diagram in the tree and click the Export button. The Save dialog box opens. 4. Save the BPEL file in the selected location. A message stating the export was successful will appear.
If the BPEL export can not be performed, a Message Window appears with a detailed description of problems.
154
End Event
At lease one End Event notation must be present in the diagram.
155
Intermediate Event
Intermediate Event notation must be between Start Event and End Event notations. Only Message, Timer, Error, and Rule Intermediate Event can be used in normal flow. Intermediate Message, Timer, Error, and Rule must have only one incoming Flow. Intermediate Event must have only one outgoing Sequence Flow. Intermediate Event Link will not be mapped because the methodology of mapping needs to track the flow to the element. Therefore, if the Intermediate Event Link does not have a flow to it, it will not be recognized.
An exception to this is the End Event None can be used in the Expanded Sub-Process. All notations inside the Expanded Sub-Process cannot have an incoming Sequence Flow or an outgoing Sequence Flow linked directly to notations outside the Expanded Sub-Process.
Gateway
If a Gateway has only one incoming and one outgoing Sequence Flow, the gateway is not needed in the BP Diagram. A Gateway cannot have both multiple incoming Sequence Flows and multiple outgoing Sequence Flows. If it has multiple incoming Sequence Flows, it must have only one outgoing Sequence Flow. If it has multiple outgoing Sequence Flows, it must have only one incoming Sequence Flow.
156
EventBased XOR
For an EventBased XOR Gateway, the outgoing Sequence Flow can only target a Task, with the TaskType set to Receive or an Intermediate Event with a Trigger attribute set to Message, Timer, or Rule. If there is only one incoming Sequence Flow to an Event-based XOR Gateway and more than one outgoing Sequence Flow, the Event-based XOR Gateway will act as a convergence. The only outgoing Sequence Flows from an Event-based XOR Gateway must be a normal Sequence Flows and not a Condition Sequence Flow or Default Sequence Flow. If there are more than one incoming Sequence Flows to an Event-based XOR Gateway and only one outgoing Sequence Flow, the Event-based XOR Gateway will act as a divergence. The only outgoing Sequence Flow from an Event-based XOR Gateway must be a normal Sequence Flow and not a Condition Sequence Flow or Default Sequence Flow. If the outgoing Sequence Flow targets a Receive Task, then an Intermediate Event with a Trigger Message cannot be a target of the other outgoing Sequence Flow of this Event-based XOR Gateway.
Inclusive OR
If there is only one incoming Sequence Flow to an Inclusive OR Gateway and more than one outgoing Sequence Flow, the Inclusive OR Gateway will act as a convergence. An Inclusive OR Gateway must have one outgoing Default Sequence Flow and at least one outgoing Conditional Sequence Flow with condition expression. The normal Sequence Flow cannot be an outgoing Flow from an Inclusive OR, which acts as a convergence. If there are more than one incoming Sequence Flows to an Inclusive OR Gateway and only one outgoing Sequence Flow, the Inclusive OR Gateway will act as a divergence. The only outgoing Sequence Flow from an Inclusive OR Gateway must be a normal Sequence Flow and not a Condition Sequence Flow or Default Sequence Flow.
Parallel AND
If there is only one incoming Sequence Flow to a Parallel AND Gateway and more than one outgoing Sequence Flow, the Parallel AND Gateway will act as a convergence (Parallel AND
157
Sequence Flow
All notations, except Start Event must have an incoming Sequence Flow All notations, except End Event, must have an outgoing Sequence Flow. Isolate notation is prohibited in the diagram. This means that any notations without any incoming and outgoing flow are not allowed in the diagram. All notations, except Gateway, must not have more than one incoming Sequence Flow. Default Sequence Flow and Condition Sequence Flow are only allowed to be used with the Gateway notation.
158
159
default modules will be stored. Define the default packages where the extension elements will be stored. Also, if desired, you can select the package every time when creating a new extension element, the dialog box asking about the storage place will open. In the Modules Path text box, enter the path where, by default, modules will be stored. If the Auto synchronize Parameters and Arguments check box is selected, arguments will be created on parameters creation and they will be synchronized. After Auto synchronize Parameters and Arguments check box is cleared parameters and arguments are not synchronized anymore. By default the Auto synchronize Parameters and Arguments check box is selected. For more information about parameters and arguments synchronization see Parameters synchronization with Arguments on page 844. The Qualified name display style option: - Absolute. - Model Library relative (Model Library is a package with modelLibrary stereotype). - Model relative means that element's qualified name shown on its symbol (not property) should be cropped from the nearest model found in hierarchy without its name. - Model or model library relative option combines two options "Model relative" and "Model Library relative" in one option.
Customize how and what information will be displayed in the Diagram Info table. Expands the tree hierarchy of all the styles defined within the project. You can create as many of these styles as you like.
NOTE To apply the changed project options to an open project, click the Apply button. For more information about the style engine, see Style Engine on page 287.
160
You may define model element properties in the Project Options dialog box, in the Default model properties branch. Select the exact element in the tree and change the property value in the right side pane. To reset the element properties to the default value, click the Reset to Defaults button. To reset the property values for all elements select the Default model properties branch and click the Reset to Defaults button. For more information about setting the default element property values, see Default Property Values on page 280.
Code Engineering
Define general code engineering options, as well as options specific to languages. For more information, see Code Engineering users guide.
To find elements to change, browse the options tree in the Project Options dialog box. The items in this hierarchy are either:
Compressed - a plus sign next to an icon indicates that the icon is compressed,and contains other model elements. This is the default setting when you start your application. Click the plus sign to expand the icon and view its subordinate items. Expanded - a minus sign next to an icon indicates that the icon is fully expanded. Click the minus sign to collapse the item.
If there is no sign next to an icon, it does not contain other model elements.
Searching
The MagicDraw search mechanism enables searching within model elements data, symbols, and extensions. You may also search for usages and dependant elements of the selected elements. This functionality is described in the Changing the diagram type on page 229.
161
Filters in the autocompletion dialog allow the filtering of rarely used items, such as "metaclasses" and "elements from modules". This allows comfortable and clear usage of the autocompletion dialog for modeling, without active usage of the elements from profiles and it increases modeling speed. At the bottom of the drop-down list box, you will find buttons to perform filtering:
The Auto completion includes metaclasses button. When pressed, the list of available elements, element types, or stereotypes includes metaclasses (in MagicDraw metaclasses are placed in the UML Standard Profile) appears. The Auto completion includes elements from profiles and modules button. When pressed, the list of available elements, element types or stereotypes includes elements, which are placed in modules appears. (Note! This option toggles all profiles except the UML Standard Profile.) The Auto completion uses camel case button. When pressed, you may search for elements via the capital letter patterns. For example, instead of typing ArrayIndexOutOfBoundsException you may type AIOOBE.
162
NOTE
TIP!
-or Press the Shift+F key. The Find dialog box opens. Press the Ctrl+Shift+F key to open the Quick find dialog.
163
164
165
NOTE:
You may define wildcards <*> and <?> for the search. For example, if you define the following input string <a*b>, the system looks for items with <a> at the beginning and <b> at the end of the string. If you define the string as <?agicDraw>, all strings containing <agicDraw> will be found.
Select an element type from the proposed items, or leave the default value of <any>. Specify a package where the content search will be performed. The search scope is limited to the symbols of active diagrams. The Check box is disabled if all diagrams are closed or if the active diagram is empty. The default value is false. If the Find dialog box is opened from the diagram shortcut menu, the Limit results to active diagrams check box is selected. NOTE: The Limit results to active diagrams check box does not exist in the Find dialog box when it is opened from the model comparing dialog.
Value
Select or input a value of the Tagged Value or Constaint Value. NOTE: Only available for Search Element by Tagged Value and Constraint Value tab.
If the model has diagrams or modules that are not loaded, select this check box to load all elements to be included in the search. NOTE: Elements will not be included in the search if the module load mode is set to Manual load. Search for items that have capitalization exactly as defined in the string entered in the Item to Find box. When the check box is cleared, MagicDraw does not distinguish between uppercase and lowercase characters of the item name entered in the Name box while searching.
Search for items with names that exactly match the string entered in the Item to Find box. When the check box is cleared, MagicDraw searches for items with names matching the first part of the string entered in the Name field.
166
Character Sets
[abc] [^abc] [a-z] [a-z[A-Z]] [a-z&&[r-z]] [a-z&&[^r-z]] Any character of a, b, or c. Any character except a, b, or c (negation). All characters from a to z (range). All characters from a to z and A to Z (union). Characters from r to z (intersection). Characters from a to q (subtraction).
167
Example:
Regular expression: [ABC][^\s]\d Matched text: any sequence starting with an "A", "B", or "C" symbol, followed by any non white space character and any digit.
Grouping
Capturing groups helps to treat multiple characters as a single unit. Example:
Regular Expression: ABC|(\dABC) Matched text: any text containing ABC symbol set or ABC symbol set beginning with any digit symbol.
Quantifiers
Quantifiers allow specify a number of character (X) appearances.
X? X* X+ X{n} X{n,} X{n,m} Match X zero or one time. Match X zero or many time. Match X one or many time. Match X exactly n times. Match X at least n times. Match X exactly n times, but not more than m times.
Example:
Regular expression: Cla(s{2}) Matched text:any sequence starting with "Cla" symbols, followed by "s" symbol two times. It will match any text containing the string "Class".
168
Boundary Matchers
Boundary matchers help to match strings more precisely. Boundary matchers help by matching a particular word, beginning or end of line, or beginning or end of the input.
^ $ \b \B \A \z Beginning of the line. The end of the line. A word boundary. A non word boundary. Beginning of the input. End of the input.
Example:
Regular expression: \bCla(s{2})\b Matched text:any sequence starting with "Cla" symbols, followed by "s" symbol two times. It will match any text containing string "Class" as whole word ("Classs" won't be matched).
Example:
Regular expression: (?m)^\bCla(s{2})\b Matched text: any sequence from a new line, starting with "Cla" symbols, followed by "s" symbol two times.
169
Replacing
The Find and Replace functionality allows replacing one specified model value with another value. You can change the values for the following properties:
Names Documentation Tag values Text included to Notes Text included to Text Boxes Expressions.
To replace a value:
170
Figure 52 -- Find and Replace dialog box 2. Type the value to be replaced into the Find What field. 3. In the Replace With field, type the value that will replace the value of the found ele-
ment. 4. Specify the search criteria. For more information about the search criteria, see Searching on page 161.
171
question appears. You may choose to replace value, replace all values or not replace.
NOTE
You will see the error when changing value to not valid:
For example, if value type is boolean, you may replace values from true to
false or from false to true, but if you will try to replace the value true or false to other, for example, to Motor, an error message will be displayed.
You will not be allowed to change the Integer value to String when it is a part
of the value. For example, if you have the 120 value and trying to replace 20 with AB, an error message will be displayed.
Project Partitioning
View Online Demo Shared Packages
172
Usually programmers are very adept at splitting large code bases into libraries. The very same criteria should be applied to splitting the large models into modules. MagicDraw module functionality allows two important posibilities:
possibility to work without all modules loaded; read-write modules.
Modules are often used for profile storing, however a module is not a profile and it is important not to mix the two. Any model part can be stored in the module.
Using the Export Module dialog box, you can partition the model and save the content of a selected package as a separate module. Once exported, the package and its containing elements are readonly and the module name is displayed in brackets next to the package name in the Browser tree.
173
Figure 53 -- The Select Package dialog box for module exportation 2. In the All Data list, select the package you want to save as a separate module. Click Add. The package is added to the Selected Objects list. 3. If desired, type a description of the module in the Profile Module Description window. This description is displayed in the documentation of the package. 4. Click OK.
174
MagicDraw will check for dependencies from the exported part of the model to the part of the model not. You will have to resolve them. The dependency resolution process is the same as for dependency resolution between shared and parts of the module not shared. When dependencies are resolved, MagicDraw will ask for the file and export the module. This action can be thought as consisting of 3 elementary steps:
Saving model elements into the module file. Sharing the entire contents of the module. Using the module in the main project.
Alternatively, if you have several small, related projects, you can join them together into a larger, partitioned project to work with all the information from one place. This is achieved by using the Use Module command that was previously mentioned.
NOTE: Only packages can be exported as modules. To export the created diagram, you must move it to a package containing elements to export.
Not all module contents are visible in the project being used. The Module has a shared part and private part. Only contents of the shared part are visible in the project being used. The concept is similar to the public/private parts of modules in programming languages (e.g. Pascal). To designate packages of the module as shared
From the File main menu, select Shared Packages.
175
Only the package selected is shared and everything else is not shared. When the module with shared package(s) is used in the project, the shared part(s) is mounted into the module of the project. Each shared package can have a different mount point. Modules of profiles are typically mounted directly under the top level Data element of the package being used, however this can be changed. Example:
Shared package "util" from the module can be mounted on the "com::company" path in the main project - to form the "com::company::util" path. The Preferred Path of the Shared Package (can be tuned in the Shared Packages dialog box) of the module, serves as a hint for MagicDraw on where to mount the package.
Modules form a recursive data structure - the main project uses one or several modules; these modules in turn can use other modules; those other modules can use yet another set of modules and so on. All model pieces from these modules are gathered and connected into the integral model, which is shown in the model Browser when the main project is opened.
176
Figure 54 -- The Modules dialog box Box name Module Accessability Function Specifies the way a module can be used in a project:
read-only modules are not editable within the project using
it.
read-write modules can be edited in place - directly in the
177
loaded. However, MagicDraw monitors user activities in the project and tries to anticipate guess when the user might want to use the model piece from the unloaded module. Autoload with prompt - mode is similar to Autoload. However, MagicDraw will ask the user before loading the module. Manual load - module is not loaded when the project using it is loaded.
Use Module Index If selected, uses the indexing scope specified in the Project Options dialog. For more information about indexing, see Indexing on page 192. Name of the shared package. Carries the information about the path where the shared package should be placed in the project using it. Holds the packages of the project on which the corresponding module share is mounted. Click the ... button to change package or create a new one. Enabled, when the module is selected as read-write. Allows the use of the module in the selected module. Removes module from the project. Imports module to the project. Reloads module in the project. Unloads module from the project. Opens the selected project as a module. The Project Options dialog box opens.
178
179
In this situation, MagicDraw can suggest moving the relationship into the parent package of this external element. For example, package1 is a parent of class B, so the relationship can be moved from the module into package1:
Some movements can be achieved by clicking Solve in the Package Dependencies dialog box. For a detailed description of this dialog box, see The module package can now be exported into an independent module. on page 183. You can also drag-and-drop the relationship from one package to another in the Browser tree.
180
In this case, the dependency on an external element is displayed in the Browser tree:
Figure 60 -- Legal module dependency on an external element in the data model browser
The package can be exported as a module because the relationship is contained in an external package.
181
Figure 61 -- Example of a relationship when the module does not depend on an external element
Dependencies by reference
The module depends on external elements when the model elements from the module packages have references to external elements.
Diagram dependencies
The diagram depends on all model elements displayed within it.
182
For more information about the package dependencies on external elements, see The module depends on external elements on page 179. In this case, if the diagram is not important to the module, it can be moved from the module package into any external package by dragging and dropping it within the Browser tree:
Figure 64 -- Diagram is moved from the module package to the package1 package.
The module package can now be exported into an independent module. MagicDraw Teamwork Server is an ideal solution for group work on the same project. For more information about the Teamwork Server, see the MagicDraw Teamwork System Users Guide.
183
Figure 65 -- The Package Dependencies dialog box Box name Status Function Status of the problem. It can be Error or Warning.
184
Unresolved dependencies
When a model part is exported to a separate module, if there are dependencies from the module back to the project, you are asked to resolve them (dependencies in the opposite direction - elements in project depending on elements in module - are OK). The same situation occurs when you edit the module inside the project (when the module is mounted read-write on the project) and introduce dependencies from the module back to the project. In this case, you will be asked to resolve these dependencies on module save. However, it might be inconvenient to resolve these dependencies at that moment (perhaps you have finished work for today and you will resolve dependencies tomorrow, and now you just want to save the project and leave; perhaps the particular dependency resolution is not a trivial task, which will take some time).
185
186
Figure 66 -- The Use Module Wizard, Step1 - Select Module Box name Modules path Module description Next Finish Cancel Help Function Displays the path, from which the modules list can be displayed. Displays the module description. Proceeds to the next step. Saves changes and closes the dialog box. Cancels the dialog box without saving changes Displays MagicDraw Help.
187
For more information about the options in this step, see Managing modules (the Modules dialog box) on page 177.
188
The usage mode can be specified in the Use Module Wizard, Step 2. By default, the module is used in the project in read-only mode. To change module accessability mode
1. From the Options main menu, select Module. The Module Options dialog box opens. 2. Select module in the tree and change the Module Accessability option from read-only to readwrite or vice versa. Click OK.
You can change content of a module and make its inner elements editable by selecting Open Module As Project (from the module shortcut menu, Modules submenu). The module opens as a separate project. When to use read-only module? The decision to use a module as read-only or read-write depends on the maturity of the module and the organization ownership/responsibility rules for the projects, developing modules. If the library in the module is mature (changes to it are not expected/likely/possible) it should be used in read-only mode. If the module is owned by a team, working on one project, and this team is responsible for this module and the module is reused in another project, the module should be used in the other project as readonly. This prevents inadvertent changes to the library. When to use read-write module? In the case where a module is actively developed and evolves together with the projects that are using it, a module should be used read-write.
189
190
When the module is unloaded, there are some model elements left in the place where the module was mounted. These elements are not editable, and they have a small M in the upper right corner of their icon. These are the so-called "proxy" elements of the real elements from the module. Instead of the real model elements, the proxy carries only the name and kind of the model element information - it is a lightweight surrogate for the real model element. The proxies are left in the place of those module elements, which are referenced from the main project. These proxies are normal and necessary to maintain project integrity (so that there are no dangling ends of relationships, types of properties do not disappear, etc.). There are 4 module loading modes:
Always load (default) - this mode of operation closely mimics the pre-v11.5 MagicDraw functionality. In this mode, modules are always loaded when the project is opened. They can be unloaded if the user deems it necessary. Autoload - module is not loaded when the using project using it is loaded. However, MagicDraw monitors user activities in the project and tries to anticipates when the user might want to use the model piece from the unloaded module. E.g. if the user does the search, finds usages/ dependencies, reports, metrics, transformations, or code engineering actions with a scope that touches the unloaded module, MagicDraw will load the module.
191
Modules, which are used very frequently, should be set in the Always load mode. Modules, which are used only occasionally, should be set in the Autoload mode (or Autoload with prompt if you like to have more control on the loading behavior). Modules, which are used only very rarely, can be put in the Manual load mode. Another frequent case where modules can be set into Manual load mode is when modules represent some software library, which is not expected to change. See the paragraph 1.6.1 Indexing below.
Advanced Concepts
Indexing
Indexing can be considered as an intermediate form of work, between working with a fully loaded module and working with the module unloaded. When a module is unloaded/not loaded in the project, only necessary proxy elements are shown in the place of the module. However, there is a possibility to retain more proxies from the unloaded module than is kept by default. There is one case, where this functionality is particularly useful. Consider the large software library module in a project. Lets say, only the various classes are used in the main project - some library classes are set as types of properties in the model classes, some model classes inherit from the library classes, etc. In this case, structural information of the library classes (their properties and methods) is not important. If proxies of all classes could be retained when the module is unloaded, this library module could be used in the main project in the unloaded state (saving a considerable amount of computer resources). The indexing feature allows achieving this functionality.
192
3. Select the Common Indexing radio button. This enables indexing of the module and determines what information will be indexed. 4. When common indexing is chosen, classifiers and their inheritance relationships will be indexed. If you want more elements to be indexed, select the Custom Indexing option and fine-tune what element types (properties, methods, etc) should be indexed. The more elements you select, the more elements will be accessible in the project using them as proxies. However, your gains in performance from the module unloading will also diminish. Hence, a balance is needed when customizing the index. It is usually better to use the common indexing variant. Click OK. 5. In the project using the indexed module, go to the options of this module (Options menu >Modules) and select the Use Module Index checkbox for that module.
193
194
Which one of them to choose depends on wherever these missing elements are necessary or are they unnecessary. If they are necessary (i.e. you want these elements to exist; they must be there), this means that they were deleted by mistake at some point in the past. Maybe MagicDraw can not find the required module? Or elements were moved to some other module? Or maybe the old version of the module is used, which hasn't got these elements? The causes may be numerous. You have to find where these elements are in your modules/main project.
If they were moved to some other module, you have to use that module into your main project (File>Use module). If elements were in the part of the module which was unshared, share this module part again. If MagicDraw can not find the module on disk, it should ask you to provide path to it on project load. If elements were deleted from the module/main project, you have to roll back to the previous version of the module/project (in your version control system or Teamwork server, or wherever you back your files up into) which still had these elements.
Creating New Substitute As the last resort, if you have no version saved, where these elements still exist, you can try to "resurrect" them. Right-click each proxy>Orphaned Proxy Resolution>Create New Substitute. MagicDraw will recreate the missing element from the bits of information it still has (which is not much - ID, name and kind of the element).
NOTE:
This action might be disabled if the substitute to be created must be in the module, but this module read-only. In this case simply change module to readwrite in the Module Options dialog (Options>Modules) and the action will be enabled.
195
NOTES:
Note that if references to these non existing elements are in the modules, which are mounted read-only, this action can not clear them. Clear Proxy Usages or Del button resolution method works temporarily only- when project is loaded next time orphan proxies will reappear. To delete proxies fully you have to open each module as project and clean orphan proxies there.
196
This chapter offers an overview of working with diagrams. In general, the topics discussed apply to all supported diagram types. When working with diagrams it is helpful to keep in mind the following concepts:
A shape refers to a notation of a model element, such as a package, class, state, use case, object, or others. A path refers to the notation for the various kinds of relationships such as associations, aggregations, dependency, message, and links. Both paths and shapes are defined as symbols.
197
Diagram Basics
To create a new diagram
From the toolbar: Click the desired diagram button on the toolbar. The Create Diagram dialog box opens. Enter the name of the diagram and select or create a package where you wish to create your diagram. From the Diagrams menu: From the Diagrams menu, select the desired diagram. The corresponding Diagrams dialog box opens. Click Add. The Create Diagram dialog box opens. Enter the name of the diagram and select or create a package where you wish to create your diagram. From the Browser: Right-click the desired model element in which you would like to create a diagram and, from the shortcut menu, select New Diagram. Type the name for diagram directly in the Browser. From the model element Specification dialog box: Open the Package, Profile, Model Specification or other elements Inner Elements tab. Click Create. The corresponding Diagram Specification dialog box opens. In this dialog box, you can define the diagram name, enter documentation, define stereotypes, and add tagged values and/or constraints.
From the Browser: Select Open from the diagram item shortcut menu or double-click the diagram item. From the Diagrams menu: From the Diagrams menu, select the desired diagram. The corresponding Diagrams dialog box opens. Click the Open button. From the Content Diagram (available in the Standard, Professional, Architect, and Enterprise editions only), if a diagram is added to the table of contents or a symbol of a diagram is drawn on the Diagram Pane.
198
TIP 1!
To load all diagrams that have been created in the project, from the Diagrams menu, select Load All Diagrams. To open the list of diagrams that were most recently closed, from the View menu, select Recently Closed Diagrams and double-click the diagram you want to open. The F12 key also activates this command. In the General pane of the Environment Options dialog box, you can select a method for loading diagrams while opening a project. Three options are available:
Load all Diagrams loads all diagrams that exist in the project. Load Only Open Diagrams loads only diagrams that were not closed in earlier usages of the project. Do not Load Diagrams all diagrams are not loaded and closed after opening a project.
TIP 2!
TIP 3!
To close a diagram Click the Close Diagram button on the diagram pane or select Close Diagram from the diagram shortcut menu. Define a diagram in the corresponding Diagram Specification dialog box. To split diagrams in new horizontal or vertical group
1. Select the open diagram tab and drag it to the diagram pane. The shortcut menu with
commands appears.
2. Select New Horizontal Group or New Vertical Group to split diagram pane and
199
Refer to Specification dialog boxes on page 265 for information on these specification elements. To rename a diagram In the corresponding Diagram Specification dialog box, type a new diagram name. To change diagram context
In the corresponding diagram Specification dialog box, near the Context box, click the ... button. Then, the Select Element dialog box appears. Select the diagram context.
200
To open the corresponding Diagrams dialog box From the Diagrams menu, select one of the diagrams. Depending on the type of diagram, the dialog box that opens has a corresponding title.
The Diagrams dialog box contains the following elements: Element name Name Owner
Function The names of all created corresponding diagrams in the open project. The name of the package that owns the diagram.
201
Diagram Properties
Customize the diagram style (color, grid) in the Diagram Properties dialog box. To open the Diagram Properties dialog box
Select Diagram Properties from the diagram shortcut menu. The Properties dialog box opens. From the Edit menu, select Symbol, and then select Diagram Properties.
202
The Diagram Properties dialog box contains the following elements: Element name Pen Color Text Color Font Function Change the color of paths or diagram frame line. Change the text color of the diagram frame name. Change the font style of the text.
203
Use Gradient Fill 3D Shadow Show Grid Grid Size Snap Paths to Grid Snap Shapes to Grid Show Message Numbers (Available only for Activity, Communication, and Sequence diagrams) Use Advanced Numbering (Available only for Activity, Communication, and Sequence diagrams) Show Diagram Info
Displays a table on the diagram that contains information about the diagram (Diagram name, Author, Creation date, Modification date, etc.). You can specify what information you want to include in the Project Options dialog box (Options menu->Project). Displays diagram owner on the diagram tab. Displays stereotypes on the diagram symbol. Utilizing the Use Stereotype property, you may choose to display context stereotype or diagram stereotype in the diagram frame and on the diagram shape. For more information about the Use Stereotype property, see To display the context stereotype instead of the diagram stereotype on the diagram frame on page 208. Changes the color of the stereotyped text label.
Stereotype Color
204
To turn off the synchronization clear the Synchronize the diagram name with its context name check box in the Environment Options dialog box, General branch, and Editing group. NOTE If the second diagram will be created in the branch, diagram names will not be synchronized.
205
Diagram Frame
According to UML specifications, the diagram may have a diagram frame. The frame is primarily used in cases where a diagrammed element has graphical border elements (like ports, gates). Beginning with MagicDraw version 12.0, each UML diagram has a contents area. The diagram frame is primarily used in cases where the diagrammed element has graphical border elements (like ports for classes and components, entry/exit points on statemachines). By default, the diagram frame is displayed in the diagram pane when a new diagram is created. The frame is rectangle for all diagrams, except State and Activity. State machine and Activity diagram frames have rounded corners. The frame can be resized manually by selecting and dragging the corners or borders. To show/hide the diagram frame From the diagram pane shortcut menu, select/clear the Show Diagram Frame check box.
opens. 2. Select the Diagrams group and change the properties in the right window, Diagram Frame properties group.
206
Property name Show Diagram Frame Show Abbreviated Types Show Diagram Name Show Parameters Show Context Name Show Context Type Show Diagram Type Show Context Kind
Function Displays the diagram frame on the diagram pane. Shows full/abbreviated diagram keyword type on the diagram frame header. Shows the diagram name and icon in the diagram frame header. Diagram context element parameters are displayed in the diagram frame header. Diagram context element name is displayed in the diagram frame header. Diagram context element type is displayed in the diagram frame header. Shows the diagram type in the diagram frame header. Shows context kind, which is a keyword predefined in UML (e.g. package, class, activity) in the diagram frame header. Adjusts the size of the diagram frame to the contained information so that it uses minimum space.
Autosize
207
To display the context stereotype instead of the diagram stereotype on the diagram frame
In the diagram Properties dialog box, Diagram Frame properties group, select one of the Use Stereotype property options:
Diagram. Diagram stereotype is displayed in the diagram frame and on
208
Creation date, Modification date, and all other tag definitions that can be assigned to the diagram. In the Custom Mode field, you may create your own table or any other object in HTML. 5. Preview the selected table or other created object in the Preview pane.
Drawing Shapes
View Online Demo MagicDraw Basics
for the shape you wish to draw (the button remains pressed). For a detailed description of diagram toolbars, see Toolbars on page 82.
209
for the shape you wish to draw (the button remains pressed.)
2. Click the Sticky button on the diagram toolbar (shortcut key is Z.) 3. Click the desired location on the diagram pane. The new shape is placed on the dia-
pane. Repeat this until you draw the desired number of shapes. 5. To undo the shapes, click the Sticky button on the diagram toolbar (shortcut key is Z). To draw a shape for the selected item in the Browser tree
1. Activate a diagram on which you wish to draw a shape. 2. From the Browser tree, select an item you wish to draw. 3. From the item shortcut menu, select Create Symbol or drag and drop the selected
model element onto the diagram pane. To specify the name of the shape (when it is allowed)
1. Double-click the shape or select Specification from the shape shortcut menu. The
corresponding Specification dialog box opens. 2. Type the shape name in the Name text box and click Close.
Type the shape name directly on the selected shape on the Diagram pane. Type the shape name after slowly double-clicking the shape in the Browser tree.
210
1. Specify a shape name. 2. Draw another shape of the same kind on the Diagram pane. 3. Click the shape in the name area. The list of existing shape names appears. 4. Select a name for the shape from the list.
These shapes will contain identical data. Auto completion for entering names is available for all elements.
NOTES
IMPORTANT
If you attempt to enter an existing name in the corresponding Specification dialog box, an error message alerts you to the existence of the current name of the shape. You may not specify a name for a new shape if another shape of the same name and kind is already present in the package.
211
You can also press the Ctrl+Space or Ctrl+Backspace to invoke the autocompletion list. Filters in the autocompletion dialog allow the filtering of rarely used items as "metaclasses" and "elements from profiles". This allows comfortable and clear usage of the autocompletion dialog for modeling without active usage of elements from profiles and it increases modeling speed. At the bottom of the drop-down list box, you will find buttons to perform filtering:
The Auto completion includes metaclasses button. When pressed, the list of available elements, element types, or stereotypes includes metaclasses (in MagicDraw metaclasses are placed in the UML Standard Profile) appears. The Auto completion includes elements from profiles and modules button. When pressed, the list of available elements, element types or stereotypes includes elements, which are placed in modules appears. (Note! This option toggles all profiles except the UML Standard Profile.) The Auto completion uses camel case button. When pressed, you may search for elements via the capital letter patterns. For example, instead of typing ArrayIndexOutOfBoundsException you may type AIOOBE.
212
2. On the diagram pane in the element name area type ":" and press Ctrl+Space or
Ctrl+Backspace. The list of possible elements to assign opens. To find the element in the list by name, type its name.
213
NOTE
When deleting paths by pressing the DELETE key, the Delete Data? message appears. To delete the relationship data from the model, click Yes. When you use other methods to delete relationships, the relationship data is automatically deleted.
on the diagram pane. The diagram type is written in the diagram heading - class, use case, etc.
boxes. In the diagram heading you cannot display the full diagram type name, but an abbreviated diagram name.
214
The list of abbreviated diagram types is presented in the following table: Diagram name Use Case Communication Sequence State Machine Activity Implementation Composite Structure Abbreviation uc comm sd stm sct impl cs
to draw. For a detailed description of the diagram toolbars, see Toolbars on page 82. 2. Click the first (source) shape of the path. 3. Drag the path to the second (target) shape of the path and drop it there. To create a number of paths
1. Click the appropriate path button on the diagram toolbar.
215
the two shapes. Repeat this until you create the desired number of paths of that type. 7. Click the Sticky button on the Diagram toolbar (shortcut key is Z.) To change a path appearance style
1. Select the path. 2. Right-click the path or select Path from the Edit menu, and select the commands you
need:
To set the path as rectilinear, oblique, or bezier, select Path Style. To select a path style, select Change Path Style (shortcut keys CTRL+L.) To reset path labels to the default position, select Reset Labels
Positions.
To remove all angles of the path, select Remove Break Points.
NOTES
drawing a path between two model elements, you will see that those shapes are bordered with a red or blue rectangle. The red color indicates that the path may not be drawn between these shapes. Blue rectangle allows a path to be drawn.
Remove the manipulation highlighting in the Environment Options
dialog box, Diagram section, Edit group. For more information, see Setting Environment Options on page 104.
For drawing a path, you can use smart manipulations menu, which
appears near the element symbol. Select a path and drag it to the target shape. To make the path corners rounded
1. Select the path. 2. From the paths shortcut menu, select the Rounded Corners check box. Right-click the path and select Symbol(s) Properties and in the Properties dialog box, set the Rounded Corners property to true
216
217
Changing the Add Line Jumps To property for a particular diagram from within the diagram Properties dialog box, will change line jumps for the current diagram only. For more information about how to change line jumps for the whole project, seeStyle Engine on page 287 .
new one.
2. Drag it on the path. The path is highlighted in blue. 3. Drop the symbol. A Message dialog box appears asking if you want to insert the sym-
218
After <path type>. Symbol is inserted before path. It means, the existing path is created, then the dropped element symbol is drawn, and then a new path is drawn. For example: Name read transition is drawn from Read Name state to Verification state. If you want to insert the Read password state after the Name read transition, drop the Read password state on the transition and in the open dialog, click the After Transition button.
219
the desired link from the group of Outgoing or Incoming relations. The Create New <relation name> To (From) dialog box opens. 2. In the model element tree, select an element to (from) which you want to create a relation. Click OK. The link will appear in the Browser. Type the name or leave it unnamed. -or-
220
The Create New <relation name> To (From) dialog box opens. 3. In the model element tree, select an element to (from) which you want to create a relation. Click OK. The link will appear in the Relations group. -or1. On the diagram pane, select an element and then select the desired link from the
mand. The Create New <relation name> To dialog box opens. 3. In the model element tree, select an element to which you want to create a relation. Click OK. The link will be drawn on the diagram pane.
Smart Manipulation
View Online Demo Smart Manipulators
Smart Manipulation is a feature designed to make working with MagicDraw even easier. Use Smart Manipulation to suppress attributes and operations, set an auto-size option, reset a label position on a path, and draw relationships with most commonly used elements. MagicDraw offers varying smart mechanisms depending on the shapes involved. There are two types of Smart Manipulators:
221
2. Smart Manipulator toolbar, which appears when elements are selected on the dia-
gram pane.
In the Smart Manipulator toolbar, smart manipulators are divided into standard and extra modes. You can toggle between these two modes by clicking the Expand button - the arrow symbol - located at the bottom of every Smart Manipulator toolbar. The program remembers your mode choice and displays it for all elements. Use the Smart Manipulators toolbar to quickly perform simple actions and create new elements. To create a new element connected to a particular element
1. Select a symbol on the diagram pane. The Smart Manipulator toolbar appears. In the
toolbar, select the relationship you want to draw. The drawing of the selected relationship is initiated and the mouse cursor displays the new element which will be created.
222
other end of relationship. In the toolbar, select the relationship and then click the right mouse button. The list of elements available for creating appears. Select the element from the list and it will be created. TIP! To create a path breakpoint use the following keyboard combination: Ctrl key + Mouse click. To cancel the drawing of an element, press Esc.
TIP!
The Autosize option is automatically added for all shapes. To hide smart manipulation
1. From the Options menu, select Environment. The Environment Options dialog
box opens.
2. In the Diagram pane, Smart Manipulators group, clear the Show Smart Manipula-
tion check box and click OK. To solve the detected symbol ownership problem
1. Select the element from the diagram pane, which is drawn on an incorrect ownership
223
To deselect the selected shape Click outside the shape on the Diagram pane. To select all shapes of the same type Press ALT and click the shape. All shapes of the same type are selected. To select all shapes on the diagram
From the Edit menu, select Select All (shortcut keys CTRL+A.)To make multiple selections
1. Click the shape on the Diagram pane. 2. Hold down the SHIFT key and click another shape. Repeat until you select the
To select a group of shapes To select a group of shapes drag the cursor diagonally across the area you wish to select. This is a simple and fast way to select a group of shapes on the diagram.
224
After the selection process represented in the Figure 1, the following shapes are selected, as shown in Figure 2.
are selected. See Figure 2. After the selection process represented in Figure 1, the class Shipment is selected by therectangular selector, even though it was only partially covered. 2. Complete coverage. Only those symbols that are fully covered by the rectangular selection process will be selected. See Figure 3. For example, after the selection pro-
225
Default selection mode is Partial coverage. To quickly change the group selection mode from Partial coverage to Complete coverage mode or conversely:
Press the Ctrl key and then drag the cursor diagonally across the area you want to
select. To change the group selection mode for the whole project:
In the main diagram toolbar press the Complete coverage mode for group selection button (see Figure 78 on page 227).
OR
1. From the Options main menu, select Environment. The Environment Options dia-
226
227
NOTES
NOTE:
You may copy/paste many (but not all) model elements among various diagrams.
To paste one or more copied model elements by creating new data and symbols From the Edit menu, select the Paste With New Data command (shortcut keys CTRL+E.) To copy the whole diagram and paste it to MS Office or other application
1. Select or deselect all model elements on the diagram. 2. From the Edit menu, select Copy as EMF Image, Copy as JPG Image, or Copy as
To copy the selected model elements and paste to MS Office or other application
1. Select the desired model elements on the diagram pane. 2. From the Edit menu, select Copy as EMF Image, Copy as JPG Image, or Copy as
PNG Image (shortcut keys CTRL+SHIFT+E, CTRL+SHIFT+J, or CTRL+SHIFT+P). 3. Open the desired application and paste the copied model elements. TIP! You can drag and drop source code files from the native file manager to a MagicDraw Code Engineering Set.
228
grams tree).
2. From the shortcut menu, choose command Change Type To and select desired dia-
gram type from the list (see Figure 79 on page 230). You can also convert multiple the same type diagrams select them in the Browser and choose command Change Type To.
229
230
Zooming
Zooming allows you to select a particular part of a diagram, zoom into it, and make changes while working with a finer level of detail. You can also gain an overview of a diagram by zooming out from it. To fit the current diagram in the window
From the View menu or from the diagram shortcut menu, select Fit in Window (shortcut keys CTRL+W.) In the Browser Zoom tab, click Fit in Window
TIP!
To view the selected shapes at maximum size Select the shapes and then from either the View menu or the diagram shortcut menu, select Zoom to Selection (shortcut keys CTRL+NumPad ASTERICS MARK (*).)
231
box opens.
2. Open the Diagram pane and change the Zoom Step Size property. The maximum
number is 1.0 (you may zoom a diagram twice.) NOTE You may also zoom in or out of the diagram using the zoom panel in the Browser window. For the detailed description, see Documentation/ Zoom Control/Properties on page 101.
232
box opens. 2. From the Grid Style drop-down list, select one of the following styles:
Dense Sparse (default)
Layout
NOTE The diagram layout engine has nine layout options available in Standard, Professional, Architect, and Enterprise editions only.
With MagicDraw, it is easy to manage simple or complex diagrams using the automated layout features that optimize diagram layout for viewing. Arrange your symbols on the Diagram pane using the Layout menu, or you can use the symbol shortcut menu when two or more symbols are selected. Since MagicDraw version 8.0, a new layout component has been applied with many more possibilities for arranging your models. To resize the selected shape Drag the corner of the shape to the desired size. To automatically resize the selected shape to a preferred size From the shape shortcut menu, select Autosize. To alter the routing of the path line Drag any point of the selected path in any direction.
233
These layout tools are provided by Files layout tool component. You can arrange each diagram (except Sequence and Time Diagram) by using any of the 6 general layout tools. The Class diagram can also be arranged by using the Class Diagram Layout Tool.
Boolean
False
234
Orthogonal Grid
Integer
50
Integer Integer
40 30
Determines the minimal distance between shapes that reside in adjacent layers. Determines the minimal distance between adjacent shapes that reside in the same layer. Determines the distance between adjacent pairs of horizontal path segments and between horizontal path segments and shapes.
Integer
30
235
Orientation
Shape Placement
Linear Seg- Simplex ments, Polyline, Simplex, Pendulum, Median Simplex, Tree
Linear Segments. Aligns shapes in such a way that path segments tend to have very few bends. It is a very good choice in combination with Path Routing set to Orthogonal. However, this greatly increases layout width.
Polyline. Aligns shapes by slightly
reducing the width without shape overlaps. Although, paths will have lots of bends.
Pendulum. A sound combination of Linear
Similar to Linear Segments, aligns shapes in such a way that path segments tend to have very few bends. Additionally, the resulting layout will be more balanced and more compact.
Median Simplex. Tends to produce more
graph is a tree. If the graph is not a tree, the placement policy of Linear Segments will be used.
236
orthogonal style. Orthogonal path routing increases the height of the layout. Randomization Rounds Integer 40 Determines the number of rounds that are initialized using different randomized starting positions. Greater values can lead to fewer crossings and longer running times. Huge diagrams with lots of inherent crossings should be processed using smaller values. Keeps the relative position of symbols inside packages and performs the layout only on the top level. Inheritance paths are joined into inheritance arcs.
Boolean
False
Boolean
True
237
layout hierarchically with the root shape on the top. This is a good choice for directed trees with a unique root shape and a moderate number of shapes on a single hierarchy level. This layout style uses the current diagram layout as a sketch to determine the order of siblings at a common shape.
Balloon. The tree is routed in a radial
style. This is a good choice for undirected, dense, or huge trees with a high number of shapes on a single hierarchy level.
Horizontal-Vertical. Children of a
shape are either arranged on a horizontal or on a vertical line. Paths are routed orthogonally. This layout can be very compact if you choose the right alignment type for children of a node. Make Sub Trees Directed Minimal Layer Distance Minimal Shape Distance Orientation Integer Integer Top to Bottom, Bottom to Top, Left to Right, Left to Right 50 50 Top to bottom Determines the minimal distance between parent and child shapes. Determines the minimal distance between siblings of a shape. Determines the main layout orientation. The layout tool tries to arrange shapes in such a way that all paths point in the main layout direction. Boolean True Inheritance paths are joined into inheritance arcs.
238
points are distributed along the border of corresponding shapes. Orthogonal Path Routing Boolean True If selected, all paths are routed orthogonally in a bus-like fashion. If not selected, paths are routed as straight line segments.
Directed Root. Selects a shape with
Balloon Root Shape Position Directed Root, Center Root Center Root indegree zero if present. A good choice for directed root trees.
Center Root. Selects the root shape in
such a way that the depth of the resulting tree is minimized. Preferred Child Wedge 0-360 340 Determines the angular range of the sector that will be reserved for children of a shape. The remaining angular range will be automatically used to accommodate the edge that connects to the root node. Determines the angular range of the sector that will be reserved around the root shape to accommodate attached subtrees. Determines the minimal length of a path. A smaller compactness factor will result in shorter paths and a more compact overall layout.
0-360
360
Integer 0.1-0.9
50 0.5
Horizontal-Vertical
239
Values Integer
Description Specify the preferred length of all paths. The layout tool tries to arrange the shapes in such a way that paths have a determined path length. If True, the distance between two shapes is calculated with respect to the size of the shape. Regulates the tendency of the shapes to be placed near the center of the diagram. The greater the factor is, the closer shapes are placed to the center of diagram. Negative values lead to huge layouts. Higher values make Layout tool obey the given preferred path length. Higher values result in greater shape distances.
Boolean
True
-0.2-2
0-2 0-2
2 0
240
Boolean
False
0-1
0.2
241
of shapes that are reachable by two disjoint paths. Shapes that belong to more than one group will be assigned exclusively to one group.
Isolated. Each group will consist of
shapes that are reachable by two path disjoint paths. All shapes belonging to more than one group will be assigned to an isolated group.
Single Cycle. All shapes will be
arranged on a single circle. Minimal Shape Distance Integer 100 Determines the minimal distance between borders of two adjacent shapes on a common circle. The smaller the distance, the more compact the resulting layout. If True, automatically determines the radius of each circle in the layout. An automatically chosen radius is usually the smallest possible radius that obeys Minimal Node Distance. If Auto Circle Radius is not set, this option determines the fixed radius for all circles in the resulting layout. Minimal Node Distance will be ignored in this case. Determines the angular range of the sector that will be reserved for children of a shape. The remaining angular range will be automatically used to accommodate the paths that connect to the root node.
Boolean
True
Integer
200
0-360
340
242
10-360
100
Compactness Factor
0.1-0.9
0.5
Description Specifies the minimal allowed distance between shapes and paths. Specifies whether existing bends should be used as an initial solution for the new routing. If True, only paths that violate the minimal distance criterion will be rerouted.
Boolean
False
243
Boolean 0-1
True 1
Boolean
True
244
Compactness Factor
Adjusting this value can lead to a variety of differing layouts. For small values, the resulting layout will use more space and shapes tend to be far away from each other. Values around 0.5 lead to evenly distributed shapes, whereas values near 1.0 produce highly compact layouts. Determines the ratio between two complementary weighting strategies when looking for a path, namely "center driven" and "space driven" weighting. Values closer to 0 lead to paths that are more distributed over the available space. Values closer to 1 give more emphasis to paths closer to a path center. Classes connected by generalization paths are organized into hierarchies. Classes connected by realization paths are organized into hierarchies. Classes connected by containment paths are organized into hierarchies.
0-1
Boolean
True
Boolean
False
Boolean
False
245
30
Orientation
Top to bottom
246
Randomization Rounds
Integer
Boolean
False
247
Integer
30
30
Orientation
Top to bottom
248
Randomization Rounds
Integer
Boolean
False
249
NOTE:
If labels are at their default position, reselt labels position functionality is disabled.
250
label text box addition or removal from diagram pane labels positions are recalculated. See an example when qualifier is added in Figure 82 on page 251. 3. Path, shape or related element movement. See an example, when related element is moved Figure 83 on page 252.
Figure 82 -- Label position is reseted to its default position after qualifier is added
251
Figure 83 -- Label position is reseted to its default position after Order class movement
Displaying label deviation from default position While moving text box from default position, dotted line shows deviation from default position. This helps to see the current labels owner (See Figure 84 on page 252).
Figure 84 -- Dotted line, which shows deviation from the default position
Indicating label if it is not at its default position If label is not at its default labels position, label right bottom corner is marked after label owner (path or shape) selection on diagram pane (see Figure 85 on page 253).
252
command.
From the View menu, select the Show Diagrams in Full Screen command. Press the F11 key.
NOTE: You may change the Show diagrams in full screen shortcut key in the Environment Options dialog box, Keyboard pane. For more information, see Assigning Shortcut Keys on page 137.
253
You may turn off the diagram full screen mode in the same way as turning it on. Managing the MagicDraw interface components in the diagram full screen mode:
1. Browser windows are in auto hide mode when the diagram full screen mode is turned
on. Located at the left side of the window are tabs of browser windows. To display the browser, move the mouse cursor over the browser window tab (for example, on the Containment tab) and the browser window will open. For more information about working with windows in auto hide mode, see Using the Browser on page 85. 2. The main toolbar is hidden when the diagram full screen mode is turned on. To display the main toolbar, clear the Hide toolbars in full screen mode check box in the Environment Options dialog box, General pane, General group. 3. The diagram toolbar is displayed when the diagram full screen mode is turned on. Right click the diagram toolbar to manage it.
NOTE
Showing the diagram in full screen mode is available only in JIDE interface style.
254
Saving as an Image
Saving a diagram and selected symbols as an image
Diagrams that were created in the model can be saved as an image in the following formats:
Enhanced Metafile Format (*.emf) - supports language specific symbols. Encapsulated PostScript (*.eps) Joint Photographic Experts Group (*.jpg, *.jpeg) Portable Network Graphics (*.png) Scalable Vector Graphics (*.svg) Tagged Image File Format (*.tif, *.tiff) Windows Metafile Format (*.wmf)
MagicDraw version 15.0 and above allows exporting of a created diagram to Tagged Image File Format (TIFF) and choice of desired color space and compression. TIFF images can be edited and resaved without suffering a compression loss and it is a flexible and adaptable file format for high color depth images. TIFF format is superior to JPG format. To save the current diagram or the selected elements within the diagram as an image
1. From the File menu, select Save As Image. The Save As Image dialog box opens. 2. Select the Active Diagram or the Selected Symbols option button. 3. Select the image format (*.emf, *.eps, *.jpg, *.png, *.svg, *tif, *tiff, *.wmf), file name, and the location directory.
255
The filename of the saved diagram will be the same as the name of that diagram. The Not empty diagrams list contains all exportable diagrams that contain UML elements. Select the diagrams you wish to export. To make multiple selections
Press the CTRL key and click the diagrams you wish to export.
256
Options dialog box opens. Modify image export properties, which are described in the table below:
Property name Save diagram background in image Image resolution (DPI) Description Saves the diagram with background. By default, the diagram background is white after saving as an image. This property is the DPI property value with numeric value range from 1 to 4800. Default value is 72. Formats This property is included in all format options. Property is not included in SVG and WMF format options. Property is not included in WMF format options list.
Exported image size [%] Define image size in percent. Default value is 100%. For example, if 200% is defined, then the view is enlarged (zoomed) before generating the image. Raster image will not loose its quality as additional pixels are introduced. Other image export options:
JPEG Compression Quality property is included in JPEG format options list. Use SVG <tag> for text output property is included in SVG format options list. Compression, Color space properties are included only in TIFF format options list.
257
Printing
In MagicDraw you can print an active diagram, multiple diagrams, or selected model elements. All printing menu commands are found in the File menu. You can also use the toolbar buttons or the shortcut keys. Before printing, use the Print dialog box to set your printing options. NOTE If the size of the text is too small, it may not be visible on the printed page.
button.
The Print dialog box contains the following tabs: Print Range, Print Options, and Print Header/ Footer. Descriptions for these tabs appear in the following sections.
258
259
Owner Select All Unselect All Load All Diagrams Print Close Help
260
Function Print the background color of your diagrams. Select this option to enable diagram symbols gradient fill in printing.
261
Fit in Page
The printed diagram fits in one page. If the Fit in Page check box is cleared and the Show Pages in Diagram check box is selected, the gridlines of pages are shown on the diagram pane. Zoom the selected diagram to the size you want for printing. NOTE You are not allowed to zoom a diagram if the Fit in Page check box is selected.
Zoom
Pages
Set the number of pages on which you want to print the diagram.
Vertical. The number of vertical pages on which the diagram will
be displayed.
Horizontal. The number of horizontal pages on which the diagram
will be displayed. Page Settings Print Test Page Preview < > The Page Setup dialog box opens. Print the test page. Set print options in the Print Options dialog box. Preview the diagram appearance before printing. Preview the previous page. Preview the next page.
262
263
264
You can define all model elements in the corresponding Specification dialog boxes. The MagicDraw shortcut menus, toolbars, and browser help ease the task of editing model elements. IMPORTANT Beginning with version 8.0, MagicDraw enables the editing of model elements and symbol properties directly from the Browser, located in the Quick Properties tab. For more information, see Properties tab on page 103.
265
General tab
Name text box
Type or view the model element name. If you enter the name of an existing model element, an error message opens. For some model elements (attribute, operation, and so forth), the default name Untitled 1 is set. You can change this name to a preferred name. Is Active, or Is Abstract check boxes
When one of these check boxes is selected, the model element is correspondingly set as an active or abstract generalizable model element. A generalizable element is a model element that may participate in a generalization relationship. Name Is Abstract Function Specifies whether the generalizable element may or may not have a direct instance. True indicates that an instance of the generalizable element must be an instance of a child of the generalizable element. False indicates that there may be an instance of the generalizable element that is not an instance of a child. An abstract generalizable element is not instantiable since it does not contain all necessary information.
Applied Stereotype
Click the "..." button to open the list of all available applied stereotypes, select the check box for the chosen stereotype and click Apply.
266
ToDo
Type or view information about an element. The To Do property is used for keeping special information, exclusive cases, or additional records. Image Click the ... button to assign the image to the element. Assigned image can be displayed on the shape or instead of the shape. For more information, about changing the image display mode, see Displaying icon or image on the symbol or instead the symbol on page 285.
Documentation/Hyperlinks tab
Use the Documentation/Hyperlinks tab to add comments to the selected element and to assign hyperlinks. The hyperlink can direct the user to a model element, web page, or a file.
267
To write documentation in HTML format, simply select the HTML check box to display a menu with the available text formatting options. Button Text Color Font Name Font Size Bold Function Select font color of the text. Select font style of the text. Select font size of the text. Set text as bold.
268
In the Hyperlinks tab, manage the hyperlinks you want to add to the model element Active Hyperlink If selected, the hyperlink is activated and will work when double-clicking the model element. Display information about the hyperlink: diagram or element name, file path, or URL name.
269
Attributes tab
The Attributes tab contains the model element attributes list and buttons for editing the attributes list. Name Type Default Value Attribute name. Attribute type. It can be a primitive type or another class. Attribute default value.
270
Delete
271
Operations tab
The Operation tab contains the model element operations list and buttons for managing this list. Name Return type Classifier Up Down Create Clone Operation name. Operation return type. The name of the classifier containing the current operation. Move item to upper position in the list. Move item to lower position in the list. Add a new operation to the model element. The Operation Specification dialog box opens. Enabled when the element is selected in the list. A new element will be created. The new element derives all properties from cloned element. The name will be changed to "<element_name><number>".
272
The Template Parameter tab contains the model element template parameters list and buttons for managing this list. Name Type Default Up The name of the template parameter. Type of template parameter: classifier or data type. The Select Element dialog box opens. Here you can assign the element as the default element for the template parameter. Move the item to the upper position.
273
Delete
274
Relations tab
The Relations tab contains the list of relationships in which the appropriate model element participates.
Function Name of the relationship (optional). One of the relationship endings. Shows a relationships direction, helps to specify source and target. Another relationship ending. After clicking this button, the relationship Specification dialog box opens.
275
Tags tab
Function Lists the profiles available for the current project. If tag definitions are grouped and those groups are collapsed, expands the groups.
276
Only displays in the list those tag definitions that have values. Show Tag Definitions with Values If tag definitions are grouped into specific packages, shows those packages on the list by grouping tag definitions. Show Tag Definitions Groups Sorts tag definitions by the assigned stereotypes. Group By Stereotype Displays types of tag definitions in the list. Show Tag Definitions Types The list of tag definitions with values that are selected for the current model element. Create Value Creates a value for the selected tag definition. The right pane of the dialog box is activated. Select or enter the value. All data types and types of metamodel can be types of values. Removes the value(s) from the selected tag definition.
Remove Value (available only when the tag definition has a value) Edit Value Edit Tag Definitions
The Tagged Value Specification dialog box opens, allowing you to edit or extend the selected tagged value. The Profiles dialog box opens. Edit, add, or remove tag definitions for the current model element.
Right pane of the dialog box Tag Definition ... Click the ... button and edit the selected tag definition in the Tag Definition Specification dialog box.
277
For more information about how to create a new tagged value, see To create a new tag definition on page 700.
278
Constraints tab
Element name
Name Specification
Enter the name of the constraint. A comment associated with the selected constraint. To edit the comment, double click the Specification line. Click the button to open the Edit Specification dialog box. This allows you to edit expressions and select the Object Constraint Language (OCL) to check the expression syntax. Click this button to open the Constraint Specification dialog box.
279
Function Save changes and exit the dialog box. Return to the previous dialog box. Proceed to the next dialog box. Display MagicDraw Help.
280
Diagram wizard opens. 2. Define the new or created diagram properties and in the Specify toolbar buttons step, click the Add button. In the appeared menu that opens, select the New Button command. The Edit button dialog box opens. 3. Open the Element Properties tab. Select the Specify own values radio button and change the default element property values.
Create a new element from the customized diagram toolbar and the element will have the defined, default properties. For more information about the Customize Diagram wizard, see UML Profiling and DSL UserGuide.pdf, which is located in the <MagicDraw installation directory>/Manual folder.
281
project as a template. A template will be created in the <MagicDraw installation directory>/templates directory.
2. To import the created template to a new project from the File main menu, select the
New Project command. The New Project dialog box opens. Select the Project from Template icon and in the Select template tree, select your template. The project options are imported to the project together with the template.
282
Formatting Symbols
In MagicDraw, every symbol may have its own style: color, font, size, and so forth. There are several ways to define the symbol properties:
From the symbol properties dialog box: from the selected symbol shortcut menu or from the Edit menu, select Symbols and then Symbol(s) Properties. From the Project Options dialog box: this dialog box enables you to change all available symbol properties, create your own style for the project, apply different symbol properties for different diagrams, define stereotype properties that may be bound to the symbol, and more. From the MagicDraw main toolbar: using this toolbar, you may change the color, font, and path style of a symbol.
For more information about symbol properties, see Project Options on page 158.
To set the symbol properties (fill color, text color, and others)
From the symbol shortcut menu, select Symbol(s) Properties. From the Options menu, select Project. The Project Options dialog box opens. Select the desired options for the selected model elements. Select a symbol and from the Edit menu, select Symbol, and then select Symbol(s) Properties.
NOTE
To apply changes made in the Project Options dialog box, click Apply.
283
To show/hide model element constraints, stereotype and/or tagged values on the diagram pane
Select/clear the Show Constraints, Show Stereotype, and/or Show Tagged Values check boxes from the symbol shortcut menu.
3. From the Options menu, select Project. 4. The Project Options dialog box opens. Select the Show Constraints, Show Ste-
reotype, and/or Show Tagged Values check boxes for the selected model elements. NOTE To apply changes made in the Project Options dialog box, click the Apply button in the Styles tab.
284
Symbol properties
Stereotype
Icon
285
Icon of the stereotype and stereotype name are assigned to element Icon of stereotype displayed. Name of stereotype displayed.
Icon
Icon of stereotype displayed in the corner of symbol. Name of stereotype is not displayed.
Text Only
Image of element is not Icon of stereotype is not displayed. Name of stereo- displayed. type is displayed.
Icon of stereotype is displayed instead of shape. Name of stereotype is displayed. Icon of stereotype is displayed instead of shape. Name of stereotype is not displayed.
Shape Image*
286
* - To display the icon of a stereotype instead of the element shape all element compartments should be suppressed. TIP! If element has assigned both - image and stereotype icon - then image of element will be displayed on the shape.
NOTE
Shape Image and Text and Shape Image properties are not added to the Path element properties list.
Style Engine
The Style engine is a part of the MagicDraw UML system that defines diagrams, shapes, paths, and stereotype properties. There may be few property styles defined, but all symbols are created according to the style that is selected as default. There is a possibility to apply different presentation styles for diagram/shape/path/stereotype depending on the diagram type.
287
The following buttons are available in the Project Options dialog box, the Symbols properties styles branch:
Button name Clone Rename Delete Make Default Apply Function Clone (duplicate) the selected style. Change the name of all existing styles. Type a new name for a style in the Enter Style Name dialog box. Remove the selected style. Make the selected style the default style for newly created projects. Apply the selected style to the open project.
288
To make a selected style your default style for newly created projects
Click the Make Default button in the Project Options dialog box.
NOTE
You can also apply the desired options to the selected diagram model elements. Click the Apply button in the specific elements pane.
289
In the following table you will find all possible options that can be set for the symbols:
Property Fill Color Use Fill Color Pen Color Text Color Font Autosize Use Fixed Connection Points Path Style Function (when selected) The fill color of the symbol. The Color dialog box opens. Uses the selected fill color and the symbols color changes on the diagram. The pen color that is used to draw elements. The Color dialog box opens. The color that is used for text coloring. The Color dialog box opens. The font that is used for the name and other displayed properties of a model element. The Font dialog box opens. Adjusts the size of a symbol to the contained information. Element borders are changed so that it uses minimum space. The end of the path is connected to the fixed point of the shape. The drawing style of a path. Possible choices: Rectilinear, Oblique, or Bezier. Attributes Color Attributes Font Attributes Sort Mode Constraint Text Mode The color of the attribute name. The Color dialog box opens. The font that is used for the name of an attribute. The Font dialog box opens. The mode for sorting attributes. Possible choices: No Sorting, By Name, By Stereotype, or By Visibility. Displays constraint name or expression on a symbol.
290
The Show Qualified Name for Operation property shows the operation name and the class of the operation on the activity shape (using style ClassName::OperationName). The default property value is true.
NOTE For projects that were created before MagicDraw version 15.0, the Show Qualified Name for Operation property is unchecked.
For more information about displaying qualified name for operation, see Call Operation Action on page 717. Direction The direction of a signal. Possible choices: Right or Left. Enable Lolipop notation If the Enable Lolipop notation check box is selected, notation of the interface becomes as "lolipop". NOTE The Enable Lolipop notation property is included only for the interface symbol properties Header Position The package name position on the symbol. Possible choices: Top or In Tab. Header in Bold HTML Text Line Style Shows the name of the symbol in bold. Activates the HTML editor for the text of a note and a text box. A line style for a horizontal separator. Possible choices: Dashed or Solid. Operations Color Operations Font Operations Sort Mode The color of the operation name. The Color dialog box opens. The font that is used for the name of an operation. The Font dialog box opens. The mode for sorting operations. Possible choices: No Sorting, By Name, By Stereotype, or By Visibility. Orientation Show Attributes Constraints Primarily the sychronization bar diagram button is set to the vertical or horizontal position. Shows constraints of attributes.
291
Show Elements List Show Entire Activation Show Full Classifier Type Show Initial Attribute Value Show Message Numbers Show More Sign for Attributes Show More Sign for Operations Show Multiplicity Show Name Show Operations Constraints Show Operations Signature
Show Operations Stereotypes Shows stereotypes of operations. Show Operation Parameters Direction Kind Show Operations Properties Show Operations Visibility Shows the direction kind for operation parameters Shows tagged values and concurrency of an operation. Shows operation visibility signs (+, -, ~ #).
292
If you want to change a stereotype and its icon visibility on the element shape, use the Show Stereotypes property. For more information about stereotype display mode, see Changing the stereotype display mode on page 698.
Shows constraints on symbols. Shows tagged values on symbols.
293
Wrap words to a new line when text exceeds the textbox width.
The color of the diagram background. Click the ... button to open the Color dialog box, select the background color. Snap paths to grid. Snap shapes to grid. Grid size settings from 2 to 30. Shows a grid on the diagram. Shows diagram information table on the diagram pane.
294
Changing properties for multiple element To change properties for multiple symbols, using Ctrl or Shift key select few elements in the Project Options dialog box, Symbol properties styles branch.
295
Figure 100 -- The Project Options dialog box, multiple element symbols style is selected
296
2. Select the diagram type. The Diagram is added as an additional branch to the section.
3. Set the style properties for the element in the right pane of the Project Options dialog box. The properties will be applied only in the specified type of diagram.
297
In the Project Options dialog box, the extended diagram style properties pane, click the Remove button.
298
Properties Inheritance
All element properties have the inherited check box. This check box indicates the property is derived from the base element properties or is it specific. The Inherited column check box value in the elements properties pane specifies if the current property is synchronized with its parent property. When the Inherited value is true, the element property is changed after changing the parent property. If the property has no correspondent property in the upper (parent) level, the Inherited column check box will be cleared and disabled. If the property is modified for the specific element and the value differs from the upper level current property value, the Inherited column check box is cleared automatically.
299
300
3. Select the properties to be applied to the element symbol by moving them from the All list to the Selected list. Click OK. NOTE! If a new style was set, it will be applied for all newly created elements after drawing them on the diagram pane. You can always set the default symbols style to the element by clicking the Apply Default Symbol Style button in the main toolbar.
Stereotype properties
The Stereotype properties can be applied only if the stereotype properties style is created in the Project Options dialog box. The Stereotype properties are derived from their base class. The Stereotype base class is defined in the label of the right pane of the Project Options dialog box. The same element can have several stereotypes assigned. In this case, the style of the first stereotype will be applied to the element symbol. If the stereotype is removed from the element, the next (first) stereotype properties are applied. If the last stereotype is removed from the element, the base class (shape or path) properties are applied to the element symbol.
301
2. Select the check box near the stereotype and click the Apply button. The stereotype will be included into the Stereotypes branch. Set the stereotype style properties in the right pane of the Project Options dialog box.
302
To apply the stereotype properties to a previously created symbol with assigned stereotype
1. When the stereotype style properties in the right pane of the Project Options dialog box are changed, click the Apply button. The Select Diagrams dialog box opens. 2. Select the diagrams to which the stereotype properties will be applied and click OK. 3. In the Select Properties to Apply dialog box, select which properties will be applied to the stereotype. Click OK. NOTE! You can apply stereotype properties to a symbol after changing the style properties and in the Project Options dialog box, click OK. The style will be applied when selecting symbol on the diagram pane and clicking the Apply Default Symbol Style button on the main toolbar .
303
Hyperlink(s)
If there are no hyperlinks yet defined, only the menu item to add a
304
4. Click Add and define the hyperlink to any model element, file, or Web page in the
Insert Hyperlink dialog box. If you want this hyperlink to be active, select the Active Hyperlink check box. 5. Click OK. To add a hyperlink from Specification:
1. Open the model element Specification dialog box and select the Documentation/
Hyperlinks tab.
2. Define the hyperlink to any model element, file, or Web page in the Insert Hyperlink
dialog box. If you want this hyperlink to be active, select the Active Hyperlink check box. 3. Click OK. To add a hyperlink from the Browser tree Now hyperlinks can be created and edited straight from the element shortcut menu:
305
For more detailed description on managing hyperlinks, see To add a hyperlink from the diagram on page 304.
306
From the note/text box shortcut menu, select HTML Text. Draw the note or text box, using the Note (HTML text) or Text Box (HTML text) toolbar buttons.
When selecting the text, the HTML editor toolbar opens. To add a hyperlink to a note, text box, or separator text
1. Select the text where you want to add a hyperlink and click Insert Hyperlink
2. The Insert Hyperlink dialog box opens. Select the hyperlink you want to insert, either
the Select Element/Symbol button and select the model element or symbol you want to link to in the Select Model Element dialog box.
To link to an existing Web page, click the Web Page tab, and in the Type
the Web page name text box, type the URL of the Web page you want to link to. You can click the button and browse the Web for the desired Web page. NOTE Set the path of the HTML viewer in the Environment Options dialog box (for a description, see Setting Environment Options on page 104.)
307
you want to link to. Or, click the Type the file name button and, in the Open dialog box, select the file you want to link to. NOTES:
The selected file opens in the HTML browser. Set the path of the HTML viewer in the Environment Options dialog box. You can only link to an existing file. New files are not created for you.
Using the HTML editor toolbar, you can change the font, color, size, and the alignment of the selected text.
the note/text box as HTML by choosing HTML Text from the note/text box shortcut menu. -orCreate a text box or note by clicking the Text Box (HTML Text) or Note (HTML Text) buttons. 2. Select the text. The HTML editor toolbar opens.
308
Tab name Element/ Symbol Creates a hyperlink that goes to the selected model element.
Box
Function
Text to display A text that will be displayed as a hyperlink. Select Element / Symbol Select from list Clear The Select Model Element dialog box opens. Select the model element you want to link to. A list of all items that have previously been selected as links. Remove all items from the Select from list.
309
Web Page Creates a hyperlink that goes to the specified Web page.
Type the web page URL. Click the button. The Web browser window opens. Browse the Web and find the web page you want to link to. NOTE Make sure that the path of the HTML viewer is set in the Environment Options dialog box.
A list of all items that have previously been selected as links. Remove all items from the Select from list.
Text to display A text that will be displayed as a hyperlink. Type the file name Type the path to the file you want to be opened or click the ... button. The Open dialog box opens. Select the file you want to link to. Select from list Clear A list of items that have previously been selected as links. Remove all items from the Select from list.
310
To display/hide the package/system boundary/subsystem name (the owner of an actor) on a model element
From the symbol shortcut menu, select Symbol(s) Properties. The Properties dialog box opens. Select/clear the Show Owner check box. From the Options menu, select Project. The Project Options dialog box opens. Select the desired model element and select/clear the Show Owner check box. If you want to apply changes for previously created model elements, click Apply.
TIP!
For a class, actor, or interface, you may display/hide the name of the owner from the symbol shortcut menu: select Presentation Options, and then select/clear the Show Owner check box.
311
Show Owner drop-down list. Select one of the four property modes for Show Owner. The property modes are described in the table below.
Show Owner Property Mode Shape Description Notation
Do Not Display
Only element name is displayed on the element shape. This is the default value. Owner is displayed below the element name.
This is MagicDraw style notation. The owner name is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the owner of the NamedElement itself. Containing namespaces are separated by dot and owner is displayed in brackets. This is a notation from UML specification. The qualified name is constructed from the names of the containing namespaces, starting at the root of the hierarchy and ending with the name of the NamedElement itself. Containing namespaces are separated by double colons. The double colon is shown to separate containing namespaces and element name.
312
This option is called Qualified name display style. To change its value:
1. From the Options menu select the Project command. The Project Option dialog
box opens.
2. Select the General Project Options branch. In the right side pane, you can modify
the option property. The Qualified name display style property is added to the Project Options dialog box, General Project Options branch. If the Model Library Relative property value is selected (default value for a new project), then the full qualified name hierarchy is displayed on the shape, starting from the model library as a root. The model library itself is not displayed. The Qualified name display style property allows for having the relative path for library items used in the project.
Converting An Element
Element conversion allows converting one element type to another. Sometimes, during the modeling process, there is a demand to change a class to a component or another type of classifier. The element conversion copies all compatible properties to a converted element (for example Ports of a class will become Ports of a component). If some properties are not compatible, they will be lost. Element conversion functionality allows UML element conversion from one meta-class to another. To convert an element From the element shortcut menu, select Refactor and then Convert To and then select the element from the open list, to which you want to convert.
313
Replacing An Element
You can replace one model element with another of the same metatype type element. Model element replacement is useful when during the modeling process you notice that one model element needs to be replaced with another. All relations and references to former element are updated to point to the newly selected model element. After the replacement source will be replaced with replacement target:
All references to replacement source will be replaced by references to replacement
target.
The replacement target will be displayed in all diagrams instead of replacement
source.
The replacement target after replacement will have all paths of replacement target
314
Figure 104 -- Model after the User class has been replaced with the Customer class
315
TOOLS
MagicDraw provides the following tools and wizards to help you quickly and easily perform design tasks.
"Model Merge" - Model Merge enables porting changes between different project
versions.
Report Wizard - report engine built on top of the Velocity Engine. It is described in a
separate document MagicDraw ReportWizard UserGuide.pdf, which is located in the MagicDraw installation directory, Manual folder.
"Pattern Wizard" - creates various GOF, Java, Junit, CORBA IDL, XML Schema and
inheritance tree.
"Model Transformation Wizard" - is a data set, which fully describes the action of
applying the model transformation on a set of packages. Transformation type, parameters, packages set to transform, and the destination of the model transformation results are the parts of model transformation.
"Resource Manager" - MagicDraw Resource Manager functionality allows you to
manage resources (Profiles, Plugins, Templates, Language resources, Case studies/ examples, Custom diagrams, and others).
"Spelling Checker" - Spell Checker will check spelling as you type. Select what you
316
TOOLS
Model Merge
Model Merge
View Online Demo NOTE Model Merge
Model Merge functionality is available in Standard Edition and above for an additional fee.
Definitions
Name Model Merge Definition
Model Merge enables copying changes between different project versions. This functionality is usually needed when there are several branches that reflect different releases or versions of the product, e.g. when certain fixes have to be copied from a release branch to the mainstream development. 2-way merge is a simple merge, which compares two projects and joins them into one. 3-way merge does not only compare and merge two projects into one project, but it also considers the common ancestor of both projects. Participants of 2-way and 3-way merges are called contributors. Ancestor is the common parent project for two projects. In 3-way merge, the target is the contributor into which changes are copied, and the source is the contributor from which changes are copied. A conflict is two changes that are incompatible, i.e. changes that cannot be accepted together. For more information about conflicting changes, see Conflicting changes on page 355.
Conflict
Introduction to Merging
Model merge enables copying changes between different project versions. This functionality is usually needed when there are several branches that reflect different releases or versions of the product, e.g. when certain fixes have to be copied from a release branch to the mainstream development.
317
TOOLS
Model Merge
Merge functionality in MagicDraw works both on projects stored in MagicDraw Teamwork Server or files.
3. Select Project Merge from the Tools main menu. The Merge Projects dialog box opens. 4. Select the source, target, and ancestor projects (changes are going to be copied from the source to the target project). The source and target projects can be stored in the system file or the Teamwork Server. If both projects are stored in the Teamwork Server, the ancestor is determined automatically. For more information about the Optimize for option, see Controlling Merge memory usage on page 394. 5. The Merge window appears, to let the user accept or reject the changes and resolve the conflicts that occurred in both contributors (e.g. when the same class is edited in both contributors). 6. Confirm the changes made to the target.
3-way merge
Conceptually 3-way merge is a reconciliation of 2 difference sets. To merge projects v2 and v3, which have common ancestor v1, difference sets of projects v1-v2 and v1-v3 must be reconciled. 3-way merge can be used for merging changes from one branch into another.
318
TOOLS
Model Merge
See Figure 106 on page 319, where the merging changes from one branch into another is presented. Branch b.1 is created from the project version i. Team members work in parallel on project version i and make changes in project branch b.1. The merge is performed and changes made to branch are copied to the trunk.
2-way merge
2-way merging is a specific case of 3-way merging. This type of merging is usually used in a nonteamwork environment. In the 2-way merging there is no explicit ancestor available, thus the target version or file is taken as an ancestor. See Figure 107 on page 320, where the first user works with project version i and creates project versions i+1, ..., n-1, n and the other user creates branch b.1 of the project i and later creates project versions b.1, ..., b.n. Merging of the following projects is performed: project of the first user (n) and project of the second user (b.n.) are merged.
319
TOOLS
Model Merge
320
TOOLS
Model Merge
Case study 3 - Copying changes from branch to Trunk (in Teamwork) with conflict resolution on page 337.
These case studies will show how merging is performed by accepting or rejecting changes and resolving conflicts.
User2 opens the original Inventory Control System.mdzip project and makes the following changes to the project.
1. Rename the Shipment class to Delivery in the Product Shipment object diagram class
321
TOOLS
Model Merge
Figure 108 -- Changes made by User1 in the Inventory Control System.mdzip project
322
TOOLS
Model Merge
Figure 109 -- Changes made by User2 in the Inventory Control System.mdzip project
323
7
NOTE
TOOLS
Model Merge
6 Click the Merge button. The Merge window opens (see Figure 111 on
page 325). A 3-way merging needs an ancestor project. If there is no ancestor project, use 2-way merge. For more information about 2-way and 3way merge, see the Introduction to Merging on page 317.
Analyzing merging results The Merge window allows reviewing differences. The merger automatically applies changes made in both source and target projects and highlights those changes in the Merged Result tree (see Figure 111 on page 325). Grey lines underneath the Static View means that there are changes inside the package. Expand the Static View node and see that Customer Group class is added in the package, the Shipment class and the Top Level class diagram are modified (see Figure 112 on page 326).
324
TOOLS
Model Merge
325
TOOLS
Model Merge
Figure 112 -- The Merged Result tree - the Customer Group class is added in the Static View package
326
TOOLS
Model Merge
327
TOOLS
Model Merge
From the Teamwork menu, select Projects. The Edit Projects dialog box opens (see Figure 114 on page 329). button. The Versions dialog box opens (see Figure 115 on page 330).
3 Select the Inventory Control System project and click the Versions 4 Select the first version of the project and click Create Branch. Now
User2 has created a branch, which is derived from the project version 1 from trunk (see Figure 116 on page 331).
5. To modify a project branch. 6 In the Versions dialog box, select Release 1.0 and click the Open button
to open the project. The Release 1.0 branch of the Inventory Control System project opens.
7 Create the Customer Group class in Top Level class diagram, in the
For more information about branching in Teamwork, see Project branching in Teamwork section, MagicDraw Teamwork UserGuide.pdf.
328
TOOLS
Model Merge
329
TOOLS
Model Merge
330
TOOLS
Model Merge
Figure 116 -- The Inventory Control System project versions with created Release 1.0 branch
331
TOOLS
Model Merge
project.
5 From the Teamwork menu, select Merge From. The Select Teamwork
332
TOOLS
Model Merge
6 Expand the 1st node and select the Release 1.0 branch (see Figure 120
on page 334).
7. Click the Merge button. The Merge window opens (see Figure 121 on page 335). The Merge window allows the user to review differences and complete the merge procedure.
333
TOOLS
Model Merge
Figure 120 -- The Select Teamwork Project dialog box with selected branch from which we are going to copy changes
334
TOOLS
Model Merge
335
TOOLS
Model Merge
Expand the Static View node in the Merge Result tree and you can see that Customer Group class was added to the package and the Top Level class diagram has modification changes (see Figure 122 on page 336).
Figure 122 -- Case study 2 - the Merge window, Merge Result tree
336
TOOLS
Model Merge
Figure 123 -- Changes are copied from the branch to the Trunk - the Customer Group class is added to the Trunk project
For more information about analyzing merging results, see Analyzing Merging Results on page 358.
Case study 3 - Copying changes from branch to Trunk (in Teamwork) with conflict resolution
This case study analyzes how conflicts are resolved during the merging process. Actions Before Merging User1 adds the Inventory Control System.mdzip project to the Teamwork Server and modifies it.
337
TOOLS
Model Merge
1. Rename the Customer class as Client class (see Figure 124 on page 338). The Cus-
tomer class is located on Top Level class diagram, in the Static View package.
2. Commit changes to the Teamwork Server.
User2 creates a branch of the Inventory Control System project and modifies it.
1. To create a project branch: 2
From the Teamwork menu, select Projects. The Edit Projects dialog box opens (see Figure 125 on page 339). button. The Versions dialog box opens (see Figure 126 on page 340).
3 Select the Inventory Control System project and click the Versions
338
TOOLS
Model Merge
4 Select the first version of the project and click Create Branch. Now
User2 has created a branch, which is derived from the project version 1 from trunk (see Figure 127 on page 341).
5. To modify a project branch. 6 In the Versions dialog box, select Release 1.0 and click the Open button
to open the project. The Release 1.0 branch of the Inventory Control System project opens.
7 Rename the Customer class as Customer Group class (see Figure 128
on page 342). The Customer class is located on Top Level class diagram, in the Static View package.
8 Commit changes.
339
TOOLS
Model Merge
340
TOOLS
Model Merge
341
TOOLS
Model Merge
trunk.
2 From the Teamwork menu, User1 selects Open Teamwork Project.
project.
5 From the Teamwork menu, choose Merge From. The Select
342
TOOLS
Model Merge
6 Expand the 1 node and selects the Release 1.0 branch (see Figure 129
on page 343).
7. Clicks the Merge button. The Merge window opens (see Figure 130 on page 344).
Figure 129 -- Case Study 3 - the Select Teamwork Project dialog box
343
TOOLS
Model Merge
changes that cannot be accepted. They are distinguished by red diamond shapes. The Data package has inner changes and conflicts and the Customer class has con-
344
TOOLS
Model Merge
flicts (the name was changed in the source and target projects) (see Figure 131 on page 346).
2. The merge engine automatically accepts all non-conflicting changes from the source
and the target projects. Then it accepts all conflicting changes from the target project and rejects all the conflicting changes from the source. The user can review automatically accepted conflicting changes from the target and select to apply change from the other contributor. 3. To navigate the automatically accepted conflicting changes from the target project 4 Click the Go To Next Conflict button in the quick navigation toolbar, to navigate the conflicting changes (see Figure 132 on page 347).
5 The element that has conflicts (the Customer class) is selected (see
Figure 133 on page 348). Its specification is also opened. The name of the Customer class is changed in the source and in the target project. Only the change in the target is automatically accepted.
345
TOOLS
Model Merge
346
TOOLS
Model Merge
Figure 132 -- Case Study 3 - the Merge window, the Go To Next Conflict button
347
TOOLS
Model Merge
Figure 133 -- Case study 3 - the Merge window, Customer class is selected in the Merged Results tree
348
TOOLS
Model Merge
2 In the Change details panel of the Customer class, right-click on the not
accepted change. The shortcut menu opens (see Figure 134 on page 349).
3 Accept the class name modification from the source project by selecting
the Accept shortcut menu item. The name modification from the source project is accepted.
4. Click the Finish Merging button and commit changes to Teamwork.
User1 has successfully resolved conflicting changes and merged them into the target project. The Customer class is renamed to Customer Group (see Figure 135 on page 350).
Figure 134 -- The Merge window, Specification panel with invoked shortcut menu
349
TOOLS
Model Merge
350
TOOLS
Model Merge
In the OV-4 Organizational Structure diagram, in the Rear Production Division Target Materials Branch element Specification dialog box, change the Military Service Type property to the Army value. Merge projects. Analyzing the merge results See the Merge window with the merge results in Figure 136 on page 352. You can see that DSL elements in the Merge window are represented in the same way as they are represented in MagicDraw languages. That means that representation in the Merge window matches the assigned metaclasses in project:
In the Merged Results tree, elements are displayed with DSL icons. In this example,
see the icon of the Organization element, Role element, OV-4 Organizational Structure diagram.
In the Specification pane, title of the element matches title of the DSL element. In
this example, you can see that the Organization element specification properties are represented.
In the Specification pane, DSL properties titles are represented. In this example,
351
TOOLS
Model Merge
In the Change details pane, information is presented using the titles of the DSL elements.
352
TOOLS
Model Merge
A change is a difference, found between the ancestor and participant of the 2-way or 3-way merge. For example, a merger compares elements of the ancestor project to those of the source or target project. Changes are classified as follows:
addition deletion modification order
For a brief information about changes, see Change types on page 353. Each change can be accepted or rejected and have dependent changes. See Accepting or Rejecting changes on page 354 for the details. Dependent changes are described in Dependent changes on page 354. Changes can conflict with each other. See Conflicting changes on page 355.
Change types
Addition change If an element is added to the contributor then an addition change occurs. If the addition change is accepted a new element will be created. See the example of addition change in the Addition changes on page 367. Modification change If an element property in the contributor is modified then a modification change occurs (Note: element property means the element specification property, such as Is Abstract, Multiplicity, and others). For example, if the Is Abstract class property in the ancestor has a default value (which is false) and the Is Abstract property in the contributor is changed to true, a modification change would occur. There are three types of modification changes:
Addition modification change adds a value to the property. Deletion modification change removes a value from a property.
353
TOOLS
Model Merge
Replacement modification change replaces one value with another. This type of
modification change occurs only for properties that have multiplicity less or equal to 1. For more information about modification change, see Elements with modified properties on page 370. Deletion change If an element is removed from the contributor, then a deletion change occurs in the removed element. For more information about deletion change, see Deletion changes on page 368. Change order If the order of elements in the ancestor and contributor differs, then an order change occurs. For more information about order change, see Order changes on page 370.
Dependent changes
In some cases, other changes have to be accepted or rejected before accepting or rejecting the selected change. In other words, the selected change sometimes depends on other changes, then it is called a dependent change or dependant. An example of a dependent change is a type change. If a class attribute type is changed to a type that is created by another change, then the attribute type change is dependent on the change that created the type. This means that type creation has to be accepted before accepting type modification change.
354
TOOLS
Model Merge
Another example is the type deletion, modification, and addition. Suppose there is an attribute type change in a contributor. The old type is deleted and a new type is added to the contributor. In this case, three changes are formed:
deletion change (for the old type), addition change (for the new type), and modification change (for the property type).
These are also ownership changes, but they are accepted together with deletion and addition changes. A modification change depends on an addition change and a deletion change depends on a modification change. Accepting the addition change does not mean accepting any other changes in this case. Accepting the modification change means accepting the addition change and then accepting itself. Accepting the deletion change means accepting the addition change, the modification change and the deletion change itself. The change dependencies for the described case is depicted in Figure 137 on page 355.
Figure 137 -- Sample of the dependent changes - type deletion, modification, and addition
Conflicting changes
A conflict is two differences that are incompatible with each other, i.e. changes that can not be accepted together. Every change can have several conflicting changes.
NOTE
(metaproperty).
355
TOOLS
Model Merge
One contributor added an operation to a class and the other contributor deleted the
class.
One contributor moved a class into one package while the other contributor moved it
to another package. For more information about the representation of the conflicting changes, see Analyzing Merging Results on page 358.
The Model/diagram tree is represented in the Merged Result tree as it is done in the Browser in the main MagicDraw window. The Non-model tree is represented in the Merged Result tree with two branches:
Module mount table. Module mount table node lists the in the project used modules.
Sample of changes in the module mount table Three changes occurs in this sample: Profile A module is updated to a newer version (change c1), which has type A removed (change c2), which implies type unsetting for the typed element P2 (change c3) (see Figure 138 on page 357). Change c1 and c2 are dependent on each other and change c2 depends on change c3. This situation is depicted in Figure 139 on page 357.
356
TOOLS
Model Merge
Figure 139 -- Sample of the changes in the module mount table - dependencies
357
TOOLS
Model Merge
Reorganizing panels of the Merge window Panels of the Merge window can be organized to your desired positions. The following changes can be done to the Merge window: The Summary/Legend panel can be turned on or off using the Summary/Legend button, which is on the left side of the Summary/Legend panel (see Figure 141 on page 360). The Change details and Specification panels can be maximized, toggled to floating or auto-hide windows using buttons, located at the top-right side of the panel (see Figure 142 on page 361). You can also manage panels of the Merge window, using shortcut menu. To invoke it, right-click on the title bar of the window. See the location of the shortcut menu invocation in Figure 142 on page 361 and in Figure 144 on page 363. To reset the position of the panels of the Merge window panel, from the panel shortcut menu select the Reset Windows Configuration command or press the Reset Windows Configuration button at the top of the Merge window (see Figure 145 on page 364). For information about managing diagram tabs, see Viewing changes in diagrams on page 383.
358
TOOLS
Model Merge
359
TOOLS
Model Merge
360
TOOLS
Model Merge
Figure 142 -- Buttons to manage the Change details and the Specification panels in the Merge window
361
TOOLS
Model Merge
362
TOOLS
Model Merge
363
TOOLS
Model Merge
364
TOOLS
Model Merge
The merged result tree combines both containment and change trees. The following types of changes are displayed in the merged result tree:
1. Addition changes on page 367
365
TOOLS
Model Merge
2. Deletion changes on page 368 3. Move changes on page 368 4. Order changes on page 370 5. Elements with modified properties on page 370 6. Elements with changed inner elements on page 370.
Modification changes are displayed in the element properties panel other changes are displayed in the Merged Result tree. Element decoration in the Merged Result tree A change occurs on a single element and that element has an icon indicating the state of the change (see the table bellow).
Decoration Change state Example
Accepted
(green tick before the element) New element is created in one of the contributors and its addition is accepted. Rejected
(red cross before element) New element is created in one of the contributors and its addition is rejected. For more information about accepted/rejected changes, see Accepting or Rejecting changes on page 354.
366
TOOLS
Model Merge
Changes that have conflicts are additionally decorated with icons showed in the table bellow. Parents of conflicting elements have conflict decorations too.
Decoration Change applied by Example
System
(red diamond on the left-bottom corner of element) Element has conflicting modification change. User
(yellow diamond on the left-bottom corner of element) Element has conflicting modification change which is resolved by the user. Addition changes Addition changes occur when elements are created in the contributors. In the merged result tree added elements are highlighted with green color (see Figure 147 on page 367).
367
TOOLS
Model Merge
Deletion changes Deletion changes occur when elements are deleted in the contributors. Deletion changes are highlighted with grey color (see Figure 148 on page 368).
Move changes Move changes are highlighted using the same blue color that is used to highlight modification changes, because move change is just a kind of modification change. Additionally, move changes are displayed with arrows before the moved element icon. In the following example, element X is moved from package A to package B. The illustration shows the initial situation when where the move change is accepted and element X is owned by package B.
Navigation from the original to the new location (and vice versa) for elements that have been moved is possible from the moved element shortcut menu (see Figure 150 on page 369 and Figure 151 on page 369).
368
TOOLS
Model Merge
369
TOOLS
Model Merge
Order changes Order changes occur on elements such as attributes, operations, and other ordered elements. Even if a single element in a collection has changed its place, the order change is applied to the entire collection. After accepting the change, all elements in the collection is reordered so that it would be the same as in one of the contributors the change occurred. An element can have several ordered collections. This means several order changes can occur for a single element. Changes in the element will be highlighted using the same blue color that is used to highlight modification changes.
Elements with modified properties Modification changes occur when element properties changed in the contributors. Elements whose properties changed are highlighted in blue.
Elements with changed inner elements Elements whose inner elements (in any nesting level) have pending changes are highlighted using red dashes as shown below. If the element has pending property modification changes, then the modification highlight color is mixed with changed inner element highlight, i.e. the element is highlighted using blue color with red dashes.
370
TOOLS
Model Merge
Figure 155 -- Element X with changed inner elements Y and attribute and modification change
371
TOOLS
Model Merge
Toolbar for displaying and navigating through changes The toolbar for displaying and navigating through changes is located at the top of the Merge window. See the highlighted area in Figure 156 on page 372.
372
7
Button
TOOLS
Model Merge
The toolbar buttons are used to navigate through the Merged Result tree and the Specification panel:
Title Expand Function Expand all nodes in the merged result tree.
Collapse
Select the first model change in the merged result tree. Note: The Go To First Change button is disabled if the first change is already selected in the merged result tree. Select previous change in the merged result tree.
Go To Previous Change Alt+up arrow Go To Next Change Alt + down arrow Go To Last Change Alt+End Go To Next Conflict Alt+Page Down
Select the next conflict in the merged result tree. Note: The Go To Next Conflict button is disabled if there are no conflicts. For more information about navigation through conflicting changes, see Buttons for quick navigation through conflicting changes on page 378.
Press the button to show or hide the profiles, modules with applied <<auxiliaryResources>> stereotype in the Merged Result tree (for example, UML Standard Profile). Undo the last action.
Undo
373
7
Button
TOOLS
Model Merge
Title Redo
Filter
Press the Filter button to invoke the Items Filter dialog box. Clear the checkbox next to the it to hide element in the merged result tree. Press this button to annotate diagram for the postmerge review. For more information, see Annotations in the merged diagram on page 391. Press the Reset Windows button to organize panels of the Merge window to its original location. For more information about resetting windows configuration, see Reorganizing panels of the Merge window on page 358. List filter options for types of change in the merged result tree:
All. This is the default value. Display all
that have conflicting changes or inner conflicting changes. Addition Changes. Display elements that are added to the model or have inner addition changes. Modification Changes. Display elements that have been modified or have inner modification changes. Deletion Changes. Display elements that have been deleted or have inner deletion changes. Move Changes. Display elements that have been moved or have inner move changes. Order Changes. Display elements whose order has been changed or have inner order changes.
374
TOOLS
Model Merge
Toolbar for accepting and rejecting changes The toolbar located above the merged result tree is used for accepting and rejecting changes. Accept and reject buttons are described in the table bellow and more about accepting and reject you can see Accepting or Rejecting changes on page 354.
375
TOOLS
Model Merge
Title Accept the selected change, its property changes and all subelement changes Accept the selected change its property change Accept the selected change
Function Accept all changes from the left and right contributors starting from the selected element. E.g. if the Data model is selected, then all changes for the whole project will be accepted. Perform the same function as the button, except that only the selected change and its metaproperty changes are accepted. Perform the same function as the button, except that only the selected change is accepted.
Reject the selected change, its property changes and all subelement changes Reject the selected change its property change Reject the selected change
Reject all changes from left and right contributor starting from the selected package. E.g. if the Data model is selected, then all changes for the whole project will be rejected. Reject the selected change and its metaproperty changes.
376
TOOLS
Model Merge
Change legend and summary There is a legend on the right of the merged result for counting differences from ancestor and to display the meaning of colors that are used to mark changed elements.
Press the Summary/Legend button at the top of the change legend to hide or show the summary panel.
377
TOOLS
Model Merge
Buttons for quick navigation through conflicting changes Lets analyze the quick navigation through the automatically accepted conflicting changes in the Merge window (see Figure 159 on page 378).
378
TOOLS
Model Merge
The panel to the right of the merged result tree displays yellow buttons representing conflicting changes. Press the yellow button to select the automatically accepted conflicting changes in the merged result tree. A message with a warning icon is displayed in the Merge window stating the number of conflicting changes that are accepted from the target. This message is located above the Merged Result tree (see Figure 159 on page 378). Element Specification panel Modification changes can only occur in properties. Modification and move changes (which are a certain type of modification changes) are displayed at the bottom of the panel, the Specification panel (Figure 160 on page 379). In the first column of the Specification panel, property titles are listed. The Source, Ancestor and Target columns display corresponding change properties from both contributors and the ancestor. Changed properties have blue background. For example, Figure 160 on page 379 shows a class has different lists of values in source and target. Class is renamed in the source to B class and class is renamed to C in the target. Green tick in the Target column shows that class name change was accepted. Additions in properties have green background, deletions grey have background (just like in the Merge Result tree) (see Figure 161 on page 380).
379
TOOLS
Model Merge
Figure 161 -- Displaying changes in the specification panel - value addition and deletion from a property
choose element to which you want to navigate (see Figure 162 on page 380).
Figure 162 -- Navigating from the Specification panel to the Merged Result tree
380
TOOLS
Model Merge
You can also navigate to the Merged Result tree by invoking shortcut menu from the column cell, which references other elements. The Select in Merged Result Tree command has submenu items corresponding to the referenced elements for the selected cell.
Figure 163 -- Navigating from the Specification panel to the Merged Result tree
Change details panel The Change details panel is located at the bottom of the merge window. The Change details panel has a tree reflecting changes occurred on the element selected in the merged result tree or element properties panel. The tree has two root-level nodes:
1. Source changes 2. Target changes
381
TOOLS
Model Merge
The Source changes and Target changes nodes display changes occurred in the source or target respectively. If several nodes in the merged result tree are selected, then all changes occurred in the nodes are displayed in the Change details panel.
The Change details panel displays results after click on the element in the Merged Result tree or on property in the Specification panel. Press the Lock contents of this panel button in the Change details panel to freeze the Change details results, that is, the last result is displayed and result is not refreshed (see Figure 165 on page 382). To unfreeze the Change details panel, press the Lock contents of this panel button again.
Figure 165 -- The Lock contents of this panel button in the Change details panel
382
TOOLS
Model Merge
Shortcut menu in the Merge window The table bellow lists the commands of the shortcut menu, which is available in the Merged Result tree and Change details panel.
Command Name Accept Reject Accept With Properties Reject With Properties Accept Recursively Reject Recursively Description
Accepts the selected change. Rejects the selected change. Accepts the selected change and its property changes. Rejects the selecting change, its property changes. Accepts the selected change, its property changes, and all subelement changes. Rejects the selected change, its property changes, and all subelement changes. The Mark As Resolved command makes the change resolved by user, not the system. The conflicting change is marked as resolved by user too. This menu item changes depending on the type of the change.
383
TOOLS
Model Merge
You can switch between Merged Result window and diagram windows, by pressing tabs at the top of the Merge window.
Analyzing differences in diagrams In opened diagrams changed diagram areas are highlighted with dashed blue background (see Figure 167 on page 385). The following changes are highlighted in diagrams:
The symbol or few symbols were moved or resized in diagram Then new symbol diagram was added
384
TOOLS
Model Merge
The symbol was deleted from diagram
385
TOOLS
Model Merge
Managing the diagram view Using the buttons located at the bottom of the diagram viewer tab (see Figure 168 on page 388) you can turn on or off difference showing, print a diagram, zoom, synchronize zooming and scrolling in diagram view. See the buttons description in the table bellow.
Button image and title Synchronize Zooming Description
When button is pressed (default value) source, ancestor, and target diagrams zooming is dependent, i.e. the same zooming operations are performed on diagrams simultaneously. To turn off synchronization of zooming, depress the Synchronize Zooming. NOTE Synchronization is valid for the source, ancestor, and target views of the same diagram.
Synchronize Scrolling
When button is pressed (default value) source, ancestor, and target diagrams scrolling is dependent, i.e. the same scrolling operations are performed on diagrams simultaneously. To turn off synchronization of scrolling, depress the Synchronize Zooming. NOTE Synchronization is valid for the source, ancestor, and target views of the same diagram.
386
TOOLS
Model Merge
Description
Difference showing od hiding is controlled by the Mark Changes button. It is possible to press or depress this button in every diagram independently:
If this button is pressed in the source diagram, then differences
are shown in the source, target, and ancestor diagrams. If buttons in the source and/or target diagrams were depressed previously, they are pressed after pressing this button in the ancestor diagram. If difference showing is turned on for both source and target diagrams or it is turned on for the ancestor diagram, then area that highlights differences in the ancestor is combined from the areas that would be shown in the ancestor if only showing differences for source or target would be enabled.
Print Diagram
To print a diagram, press the Print Diagram button. Diagrams are printed with highlighted area with the Mark Changes button is pressed (default value). Resize the view of diagram by the zooming buttons. To synchronize or desynchronize zooming use the Synchronize Zooming button (see description above).
Zooming
387
TOOLS
Model Merge
Symbol properties changes marking in the diagram difference viewer Symbols, which are marked as changed in diagram difference viewer, but has no visual differences, may have symbol properties changes. It means that symbol properties there changes, but no affect on symbol was made. See an example in Figure 169 on page 389 and in Figure 170 on page 390. In this example the Shipment class is displayed as changed in diagram, but it has no visual differences nor in Target neither in Source diagrams. The following symbol properties change was made to the Shipment class: in the class Properties dialog box, the Show Stereotypes option value was changed. Symbol properties
388
TOOLS
Model Merge
changes were made for the class and they are detected in the diagram difference viewer in order to merge them correctly.
Figure 169 -- The diagram difference viewer window, displaying symbol properties changes in the Target diagram
389
TOOLS
Model Merge
Figure 170 -- The diagram difference viewer window, displaying symbol properties changes in the Source diagram
390
TOOLS
Model Merge
After pressing Yes in the Confirm Changes dialog box, project changes to the target project is confirmed. After pressing No, the target project leaves not changed. Pressing Cancel will cancel the Confirm Changes dialog box and you will be able to continue merging.
NOTE After the merge results are copied to the project, do not forget to save or to commit project to Teamwork Server.
Annotations in the merged diagram The Annotate merged diagram button specifies whether merged diagrams will be annotated for the post-merge review or not. Press this button to annotate merged diagram. See the location of the button in Figure 172 on page 392. See an example of the annotated diagram in Figure 173 on page 393. Click the warning at the right-bottom corner of the MagicDraw window to invoke the Active Validation Results window, there information about merged diagrams is represented (see Figure 174 on page 394). For more information, see Validation on page 523.
391
TOOLS
Model Merge
Figure 172 -- The Merge window, the Annotate Merged Diagram button
392
TOOLS
Model Merge
393
TOOLS
Model Merge
394
TOOLS
Pattern Wizard
You can also specify the Optimize for option in the Environment Options dialog box, General pane, Merge group. Select the Speed property to merge the projects faster, but it would require more memory. If your PC doesnt have memory enough, in the Optimize for option, select the Memory property. Merge time will be slower, but memory usage will decrease.
Pattern Wizard
In MagicDraw, you can find various GOF, Java, Junit, CORBA IDL, and XML Schema design patterns.
NOTE This functionality is available in Standard, Professional, and Enterprise editions only.
You can also create new patterns and edit existing ones using Java code or JPython scripts. For a detailed description, see MagicDraw open API users guide.
395
TOOLS
Pattern Wizard
subcommand.
396
TOOLS
Pattern Wizard
The Pattern Wizard has three main collections of customizable options, which are represented by the hierarchy tree on the left side of the dialog box:
Design Pattern Adapter
Category GOF
Properties
Interface Class Adapter Class Adaptee Class NOTE The Next > button is activated. In the Adapter Operations screen, add or remove operations you want to use.
Bridge
Abstraction Implementor Implementor is: Abstract Class or Interface Name of Reference Suffix of the Concrete Implementor NOTE The Next > button is activated. In the Deriver Classes screen, add or remove classes you want to use.
Composite
Component Class Composite Class NOTE The Next > button is activated. In the Composite Operations screen, add or remove operations you want to use.
Decorator
Component Class Decorator Class Concrete Decorator Class NOTE The Next > button is activated. In the Decorator Operations screen, add or remove operations you want to use.
397
TOOLS
Pattern Wizard
Category
Properties
Subject Class Observer Class Concrete Subject Class Concrete Observer Class
Proxy
Subject Class Proxy Class Real Subject Class NOTE The Next > button is activated. In the Proxy Operations screen, add or remove operations you want to use.
Singleton Visitor
Singleton class Visitor Class Implementation Style: visit (MyClass), visitMyClass (MyClass) NOTE The Next > button is activated. In the Elements to Visit screen, select classes and interfaces you want to visit.
Java
Main
Main class
Java RMI classes Remote Interface NOTE The Next > button is activated. In the Remote methods screen, select methods from the All list to the Selected list.
398
TOOLS
Pattern Wizard
Category
Properties
Synchronize Names EJB Name EJB Class Remote Interface Home Interface Local Interface Local Home Interface Display Name Large Icon Small Icon Abstract Schema Name Cmp Version Persistence Type Reentrant Primary Key Class
Message Driven
EJB Name EJB Class Display Name Large Icon Small Icon Acknowledge Mode Destination Type Subscripting Durability Message Selector Transaction Type
399
TOOLS
Pattern Wizard
Category
Properties
Synchronize Names EJB Name EJB Class Remote Interface Home Interface Local Interface Local Home Interface Display Name Large Icon Small Icon Session Type Transaction Type NOTE The Next > button is activated. In the Remote Methods screen, add or remove operations you want to use.
JUnit
TestCase
TestCase Class Create suite() Create Constructor TestCase(String) Create runTest() Create setUp() Create tearDown()
JUnit is a regression testing framework. It is used by the developer who implements unit tests in Java. JUnit is Open Source Software. The provided templates allow the user to create the constructions implemented in the JUnit framework. For more information, go to http:// www.junit.org.
400
TOOLS
Pattern Wizard
Category
Properties
Tested Class TestCase Class Create suite() Create Constructor TestCase(String) Create runTest() Create setUp() Create tearDown() NOTE: The Next > button is activated. In the Tested Operations pane, add or remove operations you want to use.
Target Class Content: XSDcomplex content, XSDsimple content. Target Class Compositor: XSDall, XSDchoice, XSDsequence Particle Target Class Content: XSDrestriction, XSDlist, XSDunion Target Class Item Type Target Class
401
TOOLS
Pattern Wizard
Category
Properties
Target Class Stereotype: XSDsimpleType, XSDsimpleContent Base Min Exclusive Max Exclusive Max Inclusive Min Inclusive Total Digits Fraction Digits Length Min Length Max Length White Space Pattern
WSDL Specific WSDL design pattern CORBA IDL Specific CORBA IDL design patterns
Binding
Use the Binding pattern when you want to create binding of some PortType. Name Abstract Local Interface
Interface
Value Type
Type Definition
402
TOOLS
Pattern Wizard
Category
Properties
Array
Fixed
Union
Name Discriminator Type Name Name Name Go back to the Pattern screen. Go to the other appropriated screen. Finish and implement the wizard. The appropriated classes and interfaces are created. Cancel the wizard without implementing your actions. The MagicDraw Help is displayed.
Enume ration Struct Exception < Back Next > Finish Cancel Help
403
7
NOTE
TOOLS
Creating Setters / Getters
Setters and getters are common operations that contain almost every class. With the help of MagicDraw UML, set and get operations for class attributes can be generated automatically. To create a setter or getter
From the shortcut menu of the selected class, select Tools, and then select Create
404
TOOLS
Creating Setters / Getters
Add a tagged value "getter/setter for attribute=attribute_name" to the selected class.
Figure 177 -- Select Attributes dialog box Box All Selected > < >> << Prefix to Remove Function
Contains names of all attributes defined within the selected class. Contains the selected attributes. Moves the selected attribute from the All list to the Selected list. Setter for that attribute will be generated. Moves selected attribute from the Selected list to the All list. Moves all attributes from the All list to the Selected list. Setters for all attributes will be generated. Moves all attributes from the Selected to the All list. Type a prefix of an attribute (-, .) you want to remove while generating setters or getters.
405
7
Box
TOOLS
Creating Setters / Getters
Function
Create Setters Create Getters Prefix for Setter Prefix for Getter
Generates setters for the selected attributes. Generates getters for the selected attributes. Select a prefix for the generated setter (operation). Possible choices: set or Set. Select a prefix for the generated getter (operation). Possible choices: get;is, Get;Is; get, or Get. NOTE Get is used for every getter, is is used if the type of an attribute is set as Boolean.
OK Cancel Help
Generates setters and/or getters for attributes that are in the Selected Items list. Exits the dialog box without any changes. Displays the MagicDraw Help.
The names of created operations (setters) are combined according to the following format:
public void set + <attribute name> (<attribute type> <attribute name>)
For example, if you have an attribute called x of type int, then the generated setter will look this way:
public void setx (int x)
The names of created operations (getters) are combined according to the following format:
public <attribute type> get + <attribute name> ( )
For example, if you have an attribute called x of type int, then the generated setter will look this way:
public int getx ();
406
7
NOTE
TOOLS
Implementing or Overriding Operations
When you inherit classes from the base class that has abstract functions, you have to redefine them in the inherited classes. The implement/override operations tool will help you generate operations that are defined as abstract in the base class. The Implement/Override Operations command can be invoked in 2 cases:
When one classifier inherits operations from the base classifier (Generalization
relationship).
When some classifiers implement an Interface (Realization relationship).
407
TOOLS
Implementing or Overriding Operations
To start the Implement/Override Operations tool From the shortcut menu of the selected class, select Tools. Then, select Implement/Override Operations. The Select Operations to Implement/Override dialog box opens.
Figure 178 -- Select Operations to Implement/Override dialog box Box All Selected > < >> << OK Cancel Help Function
Contains names of all operations defined within the selected class. Contains the selected operations. Moves the selected operation from the All list to the Selected list. Moves selected operation from the Selected list to the All list. Moves all operations from the All list to the Selected list. Moves all operations from the Selected to the All list. Generates operations that are in the Selected list. Exits the dialog box without any changes. Displays the MagicDraw Help.
Double-click the item name and it will be moved to the opposite list.
TIP!:
408
TOOLS
Model Transformation Wizard
Model transformation is a data set that describes the action of applying model transformations to a set of packages. Components of model transformations include transformation types, parameters, packages set to transform, and the destination for the model transformation.
Types of transformations
Transformations can be categorized by the formats, models, and other entities they are being transferred from and to:
Any to Any - copies all or part of your model to another package without making
changes. You can also change the destination model by applying transformation mapping rules.
UML to XML Schema - creates XML Schema models from pure UML models. Once
the source model is copied, the necessary stereotypes are applied according to the XML schema modeling rules.
XML Schema to UML - creates a pure UML model from the XML Schema. The
source model is copied, but stripped of all unnecessary stereotypes. Because it derives abstract models from more specific ones, reverse transformation can occasionally lose information in the destination model.
Generic DDL to Oracle DDL - creates more specific Oracle DDL models from
Generic DDL. In this transformation, mapping will be performed using appropriate Oracle DDL types.
UML to Generic DDL - creates generic DDL models from UML models. Once the
source elements are copied to the destination, the appropriate stereotypes are applied. This transformation works only with classes, packages, and association relationships.
UML to Oracle DDL - creates Oracle DDL models from UML models. Mapping is
409
TOOLS
Model Transformation Wizard
Transform.
Transformation types are displayed in the list window. The following operations are available in the Select transformation type window:
Next > proceed to the next step (in this case, Select source/destination.) Cancel cancel the wizard.
410
TOOLS
Model Transformation Wizard
Help display the MagicDraw Help.
The Transformation Source tree displays all project data (the packages and their inner elements) that can be selected as sources for transformation. Select the Place transformation model in package option button to specify the package to which the source will be transformed. Click the ... button to display the Destination Package dialog box. Select an existing package from the Packages tree or create a new one. Select the Transform in place option button if you want the source package structure to correspond to the destination package. The following operations are available in the Select source/destination window:
< Back return to the previous dialog box. Next > proceed to the next step (in this case, Select type mappings.)
411
TOOLS
Model Transformation Wizard
Finish finish the transformation configuration. All other options will be set by
default. The Model Transformations Wizard exits and transformation results appear in the project.
Cancel cancel the wizard. Help display the MagicDraw Help.
To see a list of the default or manually created mapping profiles, click the down arrow in the Transformation type map field. These mapping profiles specify which mapping rules should be applied to the model during transformation. The From type and To type fields display the type mappings of the selected transformation profile. The Run type mapping in reverse order check box creates opposite type mapping in transformations. The following operations are available in the Select type mapping window:
< Back return to the previous dialog box.
412
TOOLS
Model Transformation Wizard
Next > proceed to the next step - Specify transformation details. (This button is
The Transformation Details table displays the various properties (selected in Step 1 of the Model Transformation Wizard of a specific transformation Here you can change the element's default value. Click Reset to Defaults to change the transformation properties to the default values. The following operations are available in the Specify transformation details window:
< Back return to the previous dialog box.
413
TOOLS
Model Transformation Wizard
414
TOOLS
Model Transformation Wizard
desired dependency relationship between the two types. Apply the stereotype named <<map>> to the dependency.
In the example above, after the transformation, all int types will be transformed to char. NOTE:
To change the behavior of the mapping, See Transformation Mapping Options on page 415. 4. Start the Model Transformations Wizard. In Step 3, select type mapping, click the
Transformation type map profile field and select the package containing mapping rules. 5. Click Finish. Transformation mapping, as specified by the newly-created rules, will be performed on the transformed model.
map from int to char to change all int types to char. But if you select the Run type mapping in reverse order check box under the Select type mappings (Step 3 of the Model Transformation Wizard), the type map will be applied in reverse order all char will be changed to int. To change this, create a value for the direction tag in the Dependency Specification dialog box, Tags tab.
The default value is "both". Change this value to "forward" to make this mapping valid for forward dependencies. Change the value to "reverse" to have this mapping valid for reverse dependencies.
To apply the order of direction for all dependencies, set the defaultDirection tag
value in the Package Specification dialog box. This package contains the <<typeMap>> stereotype. Initially, the <<map>> dependency direction tag is checked. If not found, the <<typeMap>> package defaultDirection tag value is set.
You may have several <<map>> relationships from one source or to one destination.
In these cases, the "default" tag for at least one of the relationships must be set.
415
TOOLS
Model Transformation Wizard
Dependencies from one source without default tags (or with several) is invalid. Also, dependencies to one destination with "reverse" or "both" direction order set, must have one with a default tag.
Transitive mapping for the elements (for example, Type1 -> Type2 -> Type3) is not
supported.
You may also control mapping behavior for the type inheritance source of the model.
By default, derived subtypes are also mapped by the rule governing the parent type (unless, of course, they have their own rules for mapping). If the blockInheritedSourceTypes tagged value is set, derived types are not affected by this rule.
Here T1, T2, and T5 are types in the source domain, while T2 and T4 are types in the destination domain. Given these two mappings (T1 ->T2 and T3 ->T4), the following statement is true: T1, and all types derived from it (such as T5), are mapped to the T2 type, except T3 and any of the types derived from it. These types are mapped to T4.
416
TOOLS
Model Transformation Wizard
In this case, T3, along with the types derived from it, are still mapped to T4. T1 is still mapped to T2. However, unlike the previous example, T5 and all the types inherited from T1 are NOT mapped to T2.
You can also control the mapping behavior of the type inheritance in the destination
model. This is only effective on the second (and successive) applications of the transformation. By default, derived subtypes in the destination model are not overwritten since they are considered suitable substitutes of their parent.
Here T1 is a type in the source domain, while T2 and T4 are types in the destination domain. Given this mapping (T1 ->T2), on the first application of the transformation, type T1 residing in the source model will be mapped to type T2 in the destination model. Now let us look at a case where the user refines the destination model - changing the type on the destination model attribute from T2 to - T4. This situation is quite common: for example, the user refines an attribute type from string to basic URI in the XML schema, or from Integer to nonNegativeInteger, and so forth). In essence, the mapping for inherited types of T2 is performed as if there was a mapping T1->T2 (default), T1->T4, T1-> any_other_type_inherited_from_T2.
417
TOOLS
Model Transformation Wizard
Now consider what happens when we apply the blockInheritedDestinationTypes tagged value:
In this case, type T4 has no special treatment. If the user applies the transformation, T1 is mapped to T2. In another scenario, the user refines the destination model, changing the attribute type from T2 to T4. If the user now reapplies (updates the destination) the transformation, the attribute type is overwritten: T4 is reset back to T2. When the user loads the type map in the reverse direction, the roles of the "blockInheritedSourceTypes" and "blockInheritedDestinationTypes" are transposed (unless of course the "direction" mandates that this mapping is not used in the reverse direction).
The special type EmptySourceType is used to indicate that the attributes with no
model (see mapping rules for type inheritance). By using this type, together with the inheritance mapping rules, the user can specify that any other types not defined by the mapping should be interpreted by this mapping. According to this rule, any other types in the source model should be stripped in the destination model.
The special type AnyDestinationType is a template that matches any type in the
418
TOOLS
Model Transformation Wizard
The Change destination properties according to source option overwrites element properties in the destination model with properties from the source model (but only the elements connected with mapping dependencies). The Leave destination properties intact option does not overwrite properties in the destination model with properties from the source model (retaining changes made to the destination model while ignoring changes made to the source model).
NOTE
This update option works only with data for elements that have already been created (renaming, changing type, etc.) and contain type mapping dependencies. If new elements are added to the source, once the update occurs, copies of the new elements will be created in the destination model. If an element is deleted from the source, it will not be removed from the destination after the update.
419
TOOLS
Resource Manager
Resource Manager
MagicDraw Resource Manager functionality allows you to manage local resources (installed with MagicDraw, downloaded) and resources available on the web. With RM (Resource Manager) you can manage different types of resources (Profiles, Plugins, Templates, Language resources, Case studies/examples, Custom diagrams, and others). RM allows:
Review Remove (delete) Import, download Update resources.
The Resource Manager functionality is included in all MagicDraw editions, except, Reader. To open the Resource Manager:
From the Options main menu, select the Resources command. The Resource Manager window opens.
420
TOOLS
Resource Manager
421
TOOLS
Resource Manager
State
Not installed (downloaded) Will be installed after restart Installed Will be removed after restart Not downloaded removed (if resource does not exist on the web).
The Version Obtained column indicates the version for a resources and the state: installed, not installed, and removed. The Version Available Column indicates the newest resource version on the web.
Does not exist on the web. If the resource does not exist on the
web.
Check for updates. If the resource list has not been downloaded
are already installed or downloaded and the newer version is available, the resources are marked blue. Black - changes will be fully applied after restarting MagicDraw.
More>>/<<Less Expands / Collapses the main Resource Manager window with additional fields. The following fields list all data of the selection in the resource list:
Name, Resource home page, Provider, Description Required table (with Name, Required, Status columns). If a
resource is installed but a newer version is available on the web, the required table shows the newest version requirements.
Check for Updates Download/Install The Check for Updates button is inactive if the resource list has already been successfully downloaded. Downloads the selected resources and installs. The Download/Install button is inactive if no resources have been selected.
422
TOOLS
Spelling Checker
Remove
Button is active if at least one resource is selected with states not installed or installed. The resources of other states may not be removed from the RM list. The remove functionality is not available for required resources. The Open dialog is opened. Import the resource you need. If the resource requires payment, the Price of the particular resource is displayed in the Resource Manager window under the Price column.
Import NOTE
Spelling Checker
Spelling Checker enables you to:
Check spelling as you type. A shortcut menu provides spelling options. Right click the
word underlined in red to enter the shortcut menu. Spelling options will be displayed. Words can also be entered into a customized dictionary using Add to Dictionary (see Spell checking as you type on page 423).
Check the spelling of a whole project or of a selected part. You can list all the
spelling errors found in a project and correct them easily (see Spell checking for the whole project or the selected scope on page 427).
Set Spelling Checker options. You can set spelling checker options, such as skipping
numbers, upper case words in the Environment Options dialog box (Spell Check option) (see Setting the spell checking options on page 433).
Add a spell checking dictionaries . All "Open Office" supportive spelling languages
can be added additionally to the existing ones (see Spell checking dictionaries on page 435).
423
TOOLS
Spelling Checker
symbol names on diagram pane, for properties in the specification dialog boxes, in the documentation pane, in the Containment tree, In various location on log messages, names, typing and comment fields.
Right-click on underlined word to invoke the shortcut menu in the following MagicDraw window locations:
1. Diagram pane (see Figure 184 on page 424). 2. Containment tree (see Figure 185 on page 425). 3. Dialog boxes (see Figure 186 on page 426).
Figure 184 -- Shortcut menu of the spelling error on the diagram pane
424
TOOLS
Spelling Checker
Figure 185 -- Shortcut menu of the spelling error in the Containment tree
425
TOOLS
Spelling Checker
Figure 186 -- Shortcut menu of the spelling error in the dialog box
treated as correct for this time, but will be discovered as wrongly spelled in the other case.
426
7
NOTE:
TOOLS
Spelling Checker
3. The Add to dictionary command. Select the Add to dictionary menu item in pop-up
menu. By pressing this item the wrongly spelled word will be added to custom dictionary. Next time it will not be treated as wrongly typed.
Wrongly spelled words are underlined only in edit mode of particular component. If edit mode has been left, underline disappears and vice versa.
Spelling
button in the main toolbar. The Check Spelling dialog box opens.
2. Click the Check button. The Validation Results dialog box opens.
427
TOOLS
Spelling Checker
check spelling.
4. Click OK. 5. In the Check Spelling dialog box, click Check. The Validation Results dialog box
opens.
Figure 189 -- The Check Spelling dialog box, the Check Spelling For option
428
TOOLS
Spelling Checker
Element with contains spelling error. Spelling error can be found in the element name, or inner properties, such as documentation, the To Do property and others. <Element property name>: <Spelling error found>
429
TOOLS
Spelling Checker
For more information about validation functionality, see Validation on page 523. Here the Validation Results window is described in more details.
cut menu.
2. In the Containment Tree select the element with error (marked with red circle and
white cross inside) and with right-click invoke its shortcut menu.
3. On the diagram pane, select the element with error (highlighted with red border) and
with right-click invoke its shortcut menu. In the shortcut menu of element with error, select the Correct command to invoke the Spell Checker dialog box. In the Spell Checker dialog box the Element property shows the name of the element. The Property shows the name of the element's property that has spelling error in its value. In the Value property all wrongly spelled words are underlined. Press the Next button to go to the next spelling error found during validation. To close spelling dialog and save changes press OK. To close dialog without saving changes press Cancel.
430
TOOLS
Spelling Checker
Figure 192 -- Solving the spell checking errors in the Validation Results window
431
TOOLS
Spelling Checker
432
TOOLS
Spelling Checker
433
TOOLS
Spelling Checker
Figure 196 -- The Environment Options dialog box, the Spelling branch
434
TOOLS
Spelling Checker
Underlines wrongly spelled words and provide the suggestions list of possible corrections in context menu. For more information about spell check on type, see Spell checking as you type on page 423. Checks all tagged values that is Type of string. Select language for spelling. All "Open Office" supportive spelling languages can be added additionally to the existing ones. For more information about spelling dictionaries, see Spell checking dictionaries on page 435. If true, words will differ in meaning based on differing use of uppercase and lowercase letters.
If true, compound words or phrases in which the words are joined without spaces and are capitalized within the comUse camel case words pound-as in BackColor, will be spelled as separate words.
Ignore upper case words Skip numbers
If true, words with uppercase words only are not to be spell checked. If true, numbers are not to be spell checked.
> the Add Spelling Dictionaries group. The Dictionary dialog box opens.
2. Type the name of a new spelling dictionary in the Name text box. 3. Click the "" button and select the OpenOffice zip file location.
435
TOOLS
Spelling Checker
4. Type the description of a new spelling dictionary in the Description text box.
NOTE
436
TOOLS
Import Data to MagicDraw
version. Enterprise Architect does not export 100% standard UML 2.1.1 XMI and this causes some data loss on import. Diagramming information is not imported.
XDE model import is not available. Rational Software Architect/Modeler 6.x model files (not diagrams) can be imported
with MagicDraw RSXConverter (see Import data from Rational Software Architect/ Modeler using MagicDraw RSXConverter on page 437) or EMF UML2 2.x import could be used.
437
TOOLS
Import Data to MagicDraw
Rational Rose model files can be imported with MagicDraw RConverter (see Import
import.
Visio model files can be imported using a XMI exporter. Most of the static structure
elements (not diagrams) can be imported. XMI plugin for Visio can be found:
Executable file of the XMI plugin XMIExport.exe
Visio versions Microsoft Visio 2002 Professional, Microsoft Visual Studio .NET Enterprise Architect (Visio for Enterprise Architects)
Link http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=BE6D20EF36BA-4ABF-A26F-91434C7E7B7
XMIExprt.exe
http://www.microsoft.com/ downloads/details.aspx?familyid=3DD3F3BE-656D-4830A868-D0044406F57D&displaylang=en#Overview
438
MODEL ANALYSIS
MagicDraw provides the following analysis capabilities to help you analyze your model:
"Model Visualizer": "Class Diagram Wizard" helps to create and customize new class
diagrams.
"Package Overview Diagram Wizard" generates the package
diagrams and report documents of the relationships between classes in the UML model.
"Activity Decomposition Hierarchy Wizard" - converts activity into class
in the project.
"Sequence Diagram from Java Source Wizard" - creates a sequence
been created in the model data, use the quick and simple Display related elements functionality.
"Dependencies analysis" - the MagicDraw Usages and Dependencies feature
enables you to track and view element dependencies in UML models, explore how model elements are used by other elements, and understand the relationships between used and dependent elements.
"Model Differencing" - compares two MagicDraw UML local projects or teamwork
criteria.
439
MOD EL ANALYSIS
Model Visualizer
element is represented.
Model Visualizer
NOTE This functionality is available in Standard, Professional, Architect, and Enterprise editions only.
MagicDraw contains tools that help to create elements from existing data and analyze the relationships between elements created in the UML model. It is also possible to analyze the inheritance and dependency relationships between classes. All model visualizing and analyzing tools are presented in MagicDraw as Wizards with several steps that should be followed in order to accomplish the desired operation. All Wizards have several common buttons:
Add add selected model elements from the All list to the Selected list. Add All add all elements to the Selected list that are located in the same hierarchy
440
MOD EL ANALYSIS
Model Visualizer
Finish finish the configuration. All other options will be set by default. The Wizard
set to default.
The Class Diagram Wizard helps you create a new class diagram when all classes and their relationships are already created and specified. You can select which classes, packages, and relationships will be included in a new class diagram and the details of the class representation to be configured (attributes, operations, accessibility). The Class Diagram Wizard frees you from creating the class diagram manually. The Class Diagram Wizard guides you through several steps and collects information along the way. It will automatically create a new class diagram and all the necessary elements. To start the Class Diagram Wizard
1. From the Analyze menu, select Model Visualizer. The Model Visualizer dialog box
opens.
2. From the wizards list, select the Class Diagram Wizard.
441
MOD EL ANALYSIS
Model Visualizer
Type the name of the new diagram in the Type Class Diagram name text box or leave the default name. Select the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Select the package from the data tree that will be the parent for the newly created diagram or create a new package by clicking the New button. When you select the Specify name and package option, the following functions are available:
Create - create a new package.
442
MOD EL ANALYSIS
Model Visualizer
Clone - copy an existing package to a new one.
443
MOD EL ANALYSIS
Model Visualizer
Selected list contains the elements that are added to the class diagram.
444
MOD EL ANALYSIS
Model Visualizer
Dependency usage relationship between UML model elements.
If the Suppress Attributes and the Suppress Operations check boxes are selected, the class is displayed only as a rectangle with the class name in it.
445
8
NOTE
MOD EL ANALYSIS
Model Visualizer
The Package Dependency Diagram Wizard generates diagrams containing packages (created within a project) and shows the relationships between them. The diagram may reflect all packages in the project, or just those selected. The Package Dependency Diagram Wizard collects all the information needed to both analyze dependencies and generate a new diagram. To start the Package Dependency Diagram Wizard
1. From the Analyze menu, select Model Visualizer. The Model Visualizer dialog box
opens.
2. From the wizards list, select the Package Dependency Diagram Wizard.
446
MOD EL ANALYSIS
Model Visualizer
Type a name for the newly created diagram in the Type Class Diagram name text box. Select the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Select the package from the data tree that
447
MOD EL ANALYSIS
Model Visualizer
will be the parent for the newly created diagram or create a new package by clicking the Create button.
448
MOD EL ANALYSIS
Model Visualizer
Selected list contains all packages that are added to the diagram.
449
MOD EL ANALYSIS
Model Visualizer
For example:
The Virtual dependencies package containing dependency links is created after finishing the wizard. If there is more than one dependency between the package inner elements, then the tagged value number {n=...} on the virtual dependency will be changed according to the number of dependencies.
The Package Overview Diagram Wizard allows the creation of a diagram for every package from the selected scope (reversed packages). The created diagram displays the content of the packages inner packages with inner elements connected with available relations.
450
MOD EL ANALYSIS
Model Visualizer
Wizards submenu.
Open the package shortcut menu, select Tools and then Package Overview
Diagram Wizard.
From the Analyze menu, select the Model Visualizer command. The Model
Visualizer dialog box opens. In the wizards list, select the Package Overview Diagram Wizard. Click the Start button.
Type a name for the newly created diagram in the Type Class Diagram name text box.
451
MOD EL ANALYSIS
Model Visualizer
The Add diagrams into their own package option button - adds diagrams in the same package they are created. The Add all diagrams into selected package - while creating new package overview diagrams, adds diagrams in the selected package. Select the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Select the package that will be the parent for the newly created diagram from the Data tree or create a new package by clicking the New button.
Select the packages, which will be represented in the new diagram. For every selection, a package diagram will be created.
452
MOD EL ANALYSIS
Model Visualizer
If the selected package is read-only and the package for the diagrams is not specified, a warning will be displayed when the Next button is pressed.
Set the advanced properties for elements to be represented in the diagrams. If you want to see the classifiers structure in the created class diagram, then select the create dependencies between Classifiers check box in the Analysis options group. If create dependencies between Packages check box is selected, then only the package content class diagram will be created. Analyzes are performed of all inner elements, recursively by all criteria. The Show inner packages in the package shape check box - displays one level of inner packages in every package shape, connected with dependencies.
453
MOD EL ANALYSIS
Model Visualizer
The Assign hyperlinks to created diagrams check box - adds an active hyperlink to every package, referenced to the inner diagram of this package.
454
MOD EL ANALYSIS
Model Visualizer
Dependency usage relationship between UML model elements.
The Hierarchy Diagram Wizard collects the largest hierarchies and allows every of them to be displayed as separate diagrams or all in one diagram.
455
MOD EL ANALYSIS
Model Visualizer
Visualizer dialog box opens. From the wizards list, select the Hierarchy Diagram Wizard.
From the model element shortcut menu, select Tools and then Hierarchy Diagram
Wizard.
Type a name for the new diagram in the Type diagram name field. Select the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Select the package that will be the parent
456
MOD EL ANALYSIS
Model Visualizer
for the newly created diagram from the Data tree or create a new package by clicking the Create button.
457
MOD EL ANALYSIS
Model Visualizer
The Add all hierarchies into one diagram check box creates only one diagram for all selected hierarchies. This option is enabled only if the selected hierarchies can be added into one diagram (the same diagram type). All available hierarchies are listed in the Parent Element column. In the Children Count column, the number of model elements is presented. The Show outside parent check box shows hierarchies, when derived packages are in the scope, but specializations is from outside the scope.
458
MOD EL ANALYSIS
Model Visualizer
The Show outside children check box counts outside derived elements from the displayed hierarchies. Otherwise the hierarchy will not be fully displayed and the diagram may be not valid.
The Realization Diagram Wizard shows a table of the largest element groups that realize some interface.
459
MOD EL ANALYSIS
Model Visualizer
Visualizer dialog box opens. From the wizards list, select the Realization Diagram Wizard.
From the model element shortcut menu, select Tools and then Realization Diagram
Wizard.
Type a name for the new diagram in the Type diagram name field. Select the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Select the package that will be the parent
460
MOD EL ANALYSIS
Model Visualizer
for the newly created diagram from the Data tree or create a new package by clicking the Create button.
461
MOD EL ANALYSIS
Model Visualizer
Select packages from the All list and add them to the Selected list to search for hierarchy elements.
The Add all implementations into one diagram check box creates only one diagram for all selected realizations. This option is enabled only if the selected realizations can be added into one diagram (the same diagram type). All available implementations are listed in the Specialization Element column. In the Implementations Count column, the number of model elements is presented. The Show outside specializations check box show realizations, when derived interfaces are in the scope, but specializations is from outside the scope.
462
MOD EL ANALYSIS
Model Visualizer
The Show outside implementations check box count outside derived elements from displayed realizations. Otherwise realization will not be fully displayed and the diagram cannot be valid.
Activity Decomposition Hierarchy Wizard allows converting activity into class and SysML Block Definition Diagram. This gives the capability to represent, analyze, and document activity hierarchies in the structure diagrams.
463
MOD EL ANALYSIS
Model Visualizer
name of the object node that corresponds to the composition will be used as the end name of the association on the end towards the object node type.
Pins are not included in the calculation. CallBehaviorActions that are not directly in the Activity, but are in the Structured
Activity Nodes contained by the Activity, for example, are also included in the calculation.
Activity will be connected by composition association with other behaviors that are
called by CallBehaviorActions . The part end name must be the same as the name of a CallBehaviorAction in the composing activity. If the action has no name, then the end name is as same as that of the invoked activity.
Hierarchical layout - Top to Bottom is used to arrange the generated diagram. If CallBehaviorAction calls the same activity, the composition to self will be displayed
on the generated diagram. Recursive structure analysis will be stopped after reaching the same behavior, which has already been analyzed. This requirement prevents an endless cycle.
In such a case, the composition will be created in a previously analyzed
activity in the diagram. The new behavior symbol will not be created.
There will be as many compositions from one activity into another as
different CallBehaviorActions call this activity. To start the Activity Decomposition Hierarchy Wizard
From the Diagrams main menu, select the Diagram Wizards command and then
464
MOD EL ANALYSIS
Model Visualizer
From the Analyze menu, select the Model Visualizer command. The Model
Visualizer dialog box opens. From the wizards list, select the Activity Decomposition Hierarchy Wizard.
Figure 218 -- Activity Decomposition Hierarchy Wizard. Specify name and package tab
In the Specify name and package tab, type the diagram name, select the diagram type the activity will be converted and select or create a package that will contain the desired activity diagram.
NOTE
If you are using the SysML plugin, SysML Block Definition and Class diagrams are available as diagram types. For other domains this list depends on a plug-in of those domains.
465
MOD EL ANALYSIS
Model Visualizer
In the Select structure tab, select Activities structures that will be decomposed. To add all activity structures into one diagram, select Add all structures into one diagram check box. Select check boxes of the desired activity structures. The Children Count column shows the number of included behaviors (also owned object nodes if the Add contained Object Nodes check box is selected). The number also depends on the option Search recursively.
466
MOD EL ANALYSIS
Model Visualizer
The Add contained Object Nodes check box is selected by default. If selected,
types of object nodes are displayed and connected to the composition with activities containing object nodes.
The Search recursively check box is selected by default: If not selected, the search will be conducted in only one level of the
selected activity.
If selected, the search will be conducted in the selected activity and those
activities that are invoked by CallBehaviorActions that are in the selected activity. This search is recursive.
Figure 220 -- Activity Decomposition Hierarchy Wizard. Specify symbols properties tab
467
MOD EL ANALYSIS
Model Visualizer
The Content Diagram Wizard generates content of all diagrams that are usable in the project. To start the Content Diagram Wizard
From the Diagrams main menu, select the Diagram Wizards command and then
468
MOD EL ANALYSIS
Model Visualizer
From the Analyze menu, select the Model Visualizer command. The Model
Visualizer dialog box opens. From the wizards list, select the Content Diagram Wizard.
Type a name for the new diagram in the Type Content Diagram name text box. Select the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Select the package that will be the parent
469
MOD EL ANALYSIS
Model Visualizer
for the newly created diagram from the Data tree or create a new package by clicking the Create button.
470
MOD EL ANALYSIS
Model Visualizer
The Sequence Diagram from Java Source Wizard enables the visualization of Java method implementation with UML Sequence diagrams. Because UML Sequence diagrams cannot yet show Java code with 100% accuracy, MagicDraw provides a mechanism to generate a diagram that reflects essential Java method content. To start the Sequence Diagram from Java Source Wizard
1. From the Analyze menu, select Model Visualizer. The Model Visualizer dialog box
opens. 2. From the wizards list, select the Sequence Diagram from Java Source Wizard.
471
MOD EL ANALYSIS
Model Visualizer
3. Click Start. The Sequence Diagram from Java Source Wizard opens. From the Diagrams menu, select Diagram Wizards, then Sequence Diagram from
to this set. In the Browser, Code engineering sets tree, select the RTMethod node. From its shortcut menu, select Reverse Implementation. The Sequence Diagram from Java Source Wizard opens (method is selected in the wizard).
Create a class with operation. Select the operation in the Browser. From the
operation shortcut menu, select the Reverse Implementation command. The Sequence Diagram from Java Source Wizard opens (method is selected in the wizard).
472
MOD EL ANALYSIS
Model Visualizer
In the Sequence diagram, create call message. Select it on the diagram pane. From
the message shortcut menu, select Reverse Implementation. The Sequence Diagram from Java Source Wizard opens (method is selected in the wizard).
Figure 224 -- Sequence Diagram from Java Source Wizard. Specify Name and Package
In the Type diagram name text box, type a name for the new sequence diagram. By default, the name of the class and method is assigned to the sequence diagram.
473
MOD EL ANALYSIS
Model Visualizer
Select the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. From the Data tree, select the package that will be the parent for the newly created diagram, or create a new package by clicking New.
Figure 225 -- Sequence Diagram from Java Source Wizard. Select Operations.
Select the operation, which will be displayed in the sequence diagram. When you start the wizard from either the operation shortcut menu or the Sequence diagram, both the operation and Java source file are selected by default.
474
MOD EL ANALYSIS
Model Visualizer
In the Select Java source file field, specify the Java source file (if this file cannot be found automatically).
Figure 226 -- Sequence Diagram from Java Source Wizard. Select Classes for Diagram.
475
MOD EL ANALYSIS
Model Visualizer
Wrap message text - specifies the maximum message text length in pixels for wrapping longer messages.
Using Specify Symbol Properties, you can select options for the elements to be represented in your sequence diagram.
NOTE:
You can extend the created sequence diagram by method: Select the method (message), which you want to be displayed with additional details (this can include referenced classes and other defining methods). Then, from the message shortcut menu, select Reverse Implementation. The Sequence Diagram from Java Source Wizard opens.
476
MOD EL ANALYSIS
Displaying related elements
Related Elements and then select Display Related Elements. 2. The Display Related Elements dialog box opens.
477
MOD EL ANALYSIS
Displaying related elements
Scope
Select in what scope the elements related to the selected model element will be found:
Whole Project Package
Depth
relationships involved. Relations Always create new symbols Select the relationships you want to display on the diagram. When this check box is selected, a new symbol is created even if a related element already has a symbol in the diagram.
To display paths among shapes that already exist in the model data
From the shape shortcut menu, select Related Elements and then Display Paths. Select a symbol and from the Edit menu, select Symbol, then Related Elements, and then select Display Paths.
478
8
NOTE
MOD EL ANALYSIS
Dependencies analysis
Dependencies analysis
This functionality is available in Standard, Professional, Architect, and Enterprise editions only.
The MagicDraw Usages and Dependencies feature enables you to track and view element dependencies in UML models, explore how model elements are used by other elements, and understand the relationships between used and dependent elements. It is also useful for analyzing associations between elements or searching for diagrams where these elements are represented. To search for usages / dependent elements:
1. Select model element in the Browser or in the Diagram pane. 2. From the element shortcut menu, select the Related Elements command and then
select either the Used By or Depends On command. The Usages/Dependencies Search Options dialog box opens. 3. In the Usages/Dependencies Search Options dialog box, specify options and click OK. Depending on which command you selected on the shortcut menu, either the Element used by or depends on window opens.
Usages Functionality
The Elements used by window provides a list of all the elements that reference the current element. For example: If element1 references element2, then element1 uses element2. Conversely, element2 is also used by element1. In the Attribute Specification dialog box, add class2 in the Type box. This means that class2 is used by that attribute. Containing other elements is not considered usage. For example, when a package contains an inner element class, this does not mean that the package uses the class. The class is categorized as only a container of the package.
479
MOD EL ANALYSIS
Dependencies analysis
For example: If element1 contains a reference to element2, then element1 depends on element2.
Depends On command.
480
MOD EL ANALYSIS
Dependencies analysis
Function If the model has unloaded diagrams or modules, select this check box to load all elements to be included in performing the usages/dependencies search.
481
MOD EL ANALYSIS
Dependencies analysis
Function Usages/dependencies of inner elements (beneath the level of the current element) are listed in the search results list. When the Seatch recursively check box is cleared (default value), the usages/dependencies table lists those elements that are using the current element. For example: element1 contains element2. When you search non-recursively, those elements that use element1 are listed. When you search recursively, elements using element1 are listed, while the other branch lists those elements that use element2.
Ignore inter-relations
Only usages/dependencies outside the current element (above the level of current element and in the same level) are listed. You may use this option when you export the package as modules. You may analyze the dependencies of a package inner element to its outer elements (note that you cannot export a package that contains inner elements with dependencies to the outer elements according to this package). For example: create package p1 and package p2. Connect these packages with a dependency relationship. In the Browser, drag and drop this dependency to p1. In the Usages/Dependencies Search Options dialog box, select the Ignore inter-relations check box. Search for the p1 dependency. The dependency to the dependency relationship will not be found because this element is a child of p1.
Level of details
Select predefined types (Classifiers, Packages) from the combo box or click the ... button, which opens Select Element/Symbol Type dialog box and allows the selection of custom types. Only elements of these types will be displayed in the search results. For example, Package selected as "level of details". Class B depends on Class A (owned in package p2), because it uses A as type of one operation parameter. In this case package p2 will be displayed as a result, class A will be added under p2 node.
Search results provide a complete list of used or dependent relationships together with other results.
482
MOD EL ANALYSIS
Dependencies analysis
Element Name Treat model elements at the end of relationships as search results Show results in the new tab Show this dialog before searching
Function Relationships are skipped and only usages/dependent elements between the model elements connected with these relationships are displayed. If you want new Elements Using/Dependencies windows displayed for every new search, select Show results in the new tab check box. If the Show this dialog before searching check box is selected, the Find Usages/Dependent Elements Options dialog box opens when you search for usages or dependencies. If the Show this dialog before searching check box is cleared, you may access the Find Usages/Dependent Elements Options dialog box from the Elements Using/Dependencies window by pressing the Show Usages/Dependent Elements Options button.
483
MOD EL ANALYSIS
Dependencies analysis
The following table presents more information about the Elements Using/Dependencies window. Item Name Expand Collapse Select in Containment Tree Function Expands records listed in groups. Click the plus sign next to the group name to display the contents. Collapses records listed in groups. In the usages/dependencies table, select the record. Click the Select in Containment Tree button. The Element is selected in the Browser, and the Containment tree, and the symbol of this element is selected in the diagram pane. Click the Select in Containment Tree button to open any closed and previously loaded diagrams.You can also select the element in the Containment Tree by double clicking it. NOTE: The Select in Containment Tree button is not available for multiple element selections. Move to Search Results In the usages/dependencies table, select the record. Click the Move to Search Results button. In the usages/dependencies table results are moved to the Browser, Search Results tree. In the Search Results tree, you will see all the results in one list and organized in two groups: From diagram and From model.
484
MOD EL ANALYSIS
Dependencies analysis
Diagrams, which are referenced in the usages/dependencies table, are opened. In the open diagrams, the view is focused on used/dependent elements. NOTE: The Open all diagrams that contain current Usages/ Dependencies button is inactive when there are no elements that are used in diagrams. The full path is displayed next to the element name. NOTE: For a symbol this button is not valid. The usages/dependencies table should be refreshed after:
Elements or symbols are deleted. New dependencies/usages are created for the particular model
element. Show Usages/ Dependencies Search Options Filter The Find Usages/Dependent Elements Options dialog box opens. Filter boxes in the Elements used by and depends on windows are placed above the column, which will be filtered. In the used by window, you can filter by element type or usage type. In the depends on window, you can filter according to element type and dependency type. When you expand the Filter box, you will see items listed in the usages/dependencies columns. NOTE: In the Element Type Filter box within the used by window, combo box, additional Show All but Symbols filtering options is added.
485
MOD EL ANALYSIS
Model Differencing
Model Differencing
View Online Demo NOTE Visual Model Differencing This functionality is available in Architect, and Enterprise editions only.
The use of model differencing functionality allows you to compare two MagicDraw UML local projects or teamwork project versions, as well as diagrams. Model elements are compared by the element ID. You can compare:
current project with locally saved project. current project with open project. two teamwork project versions. current project with teamwork project version. local project and teamwork project version. diagrams.
Models comparison
First of all you have to select the projects you want to compare. Model comparison will be displayed as two model trees. Differences between the model versions are marked using colors and highlighting. When comparing two models the following data changes will be reflected:
New model elements. Deleted model elements. Model elements with modified data. Model elements that changed location. Inner elements changes.
486
MOD EL ANALYSIS
Model Differencing
Projects.
2. The Compare Projects dialog box opens.
Figure 229 -- Select Projects to Compare dialog box 3. From the Active Project combo box, select a project you want to compare with
another project. The list contains names of all open projects in MagicDraw.
4. From the Compare With combo box, select a project with which you want to compare
the first project. The following options are available: open project names are listed, except the project, which is selected in the Active Project combo box.
Local Project. Click the "" button and select a project version you want
Project dialog box, select a project and its version you want to compare with.
<current project>Disk version. By selecting this option you will be able to
compare currently changed project version with the unchanged project version on the disc without current changes. By default the first opened project should be selected. If there are no more projects open, Local Project is selected as the value.
487
MOD EL ANALYSIS
Model Differencing
488
MOD EL ANALYSIS
Model Differencing
In the Difference Viewer dialog box two compared projects are displayed. The number of differences is displayed at the bottom of the dialog box. The number of differences number includes inserted, deleted, and modified elements. The number does not include elements with changes to inner elements. Differences number is displayed in following order: To mark changes in the model elements several colors are used:
Elements that do not exist in the other model (inserted elements). Element is
displayed only in the right-hand tree. New element is highlighted in light green.
Elements that exist in the other model, but do not exist in current model (deleted
elements). Elements are always displayed in the left-hand tree. The deleted element is highlighted in grey.
Elements with modified element data (modified elements). The modified element is
highlighted as changed in both trees. The modified element is highlighted in light blue.
Elements that changed location (parent has changed). Element is marked as a
modified element. Empty nodes are displayed in the opposite tree where the element does not exist. On the moved element and on its former position, a button is displayed. Pressing the button on the former position, selects the place where the element has moved to. Pressing the button on the moved element position, selects the former element place. Also, you can perform these operations using the shortcut menu commands Go to former position or Go to moved element.
Elements that have inner elements that changed. The element is marked in both
trees and is highlighted in light grey dashes. An element with modified element data and changed inner elements is marked as modified and as element with changed inner elements. Element is marked as modified when:
Element specification properties have changed. Element specification
properties include all properties, which are not displayed in the Browser as separate elements. Model element specification properties are treated as changed only if the element property can be changed from the element specification. If an element specification has changed because of changes made to other elements, the element should not be treated as changed. Example: typed values in the tagged values specification, attribute links in an object and instance specification, etc.
Element parent has changed. Path is drawn from/to element.
489
8
Button
MOD EL ANALYSIS
Model Differencing
The Filter dialog box opens. Show/hide the elements you want to analyze.
Filter
Relations are displayed in the elements specifications. A relation added to the element means that the element is marked as modified.
Include Relation Ends Display: All - Shows all elements of the projects. All Differences - Shows only differences made between the projects. Deleted Elements - Shows only elements that were deleted from the projects. Inserted Elements - Shows only elements that were inserted in the projects. Modified Elements - Shows only elements that were modified.
The Find dialog box opens. Search for elements within the corresponding project.
Find Next Element More>> <<Less
More/Less button shows/hides the element properties table. By default, the properties table is hidden.
490
8
Button
MOD EL ANALYSIS
Model Differencing
Function
Export Differences
Creates .html or .txt differences report. In the Save Difference Report As dialog box, select the directory where you want to save this report. NOTE: *.html format is suitable for viewing the difference report. If you want to copy this report to another program, use of the *.txt format is recommended.
The first column of the Property window contains the same properties as the Quick Properties tab in the Browser. The second column title is the left-hand project name (with path) for local projects, and teamwork project name and version number for teamwork projects. The third column title is the righthand project name (with path) for local projects, and teamwork project name and version number for teamwork projects. Modified properties are marked with the same color as in the model element tree.
Diagrams Comparison
To compare diagrams
1. In the Difference Viewer dialog box, select the diagram you want to compare and
491
MOD EL ANALYSIS
Model Differencing
2. The Diagrams Difference Viewer dialog box opens, which displays both diagrams
492
MOD EL ANALYSIS
Model Differencing
changes) All changes are highlighted in light blue dashes. Buttons available in the Diagrams Difference Viewer dialog box:
Button Function
If pressed, zooming affects both diagrams: zooming one diagram causes zooming of the other diagram.
Synchronize Zooming
If pressed, places where diagram has changed are marked on both diagrams.
Mark Changes
Zooms the corresponding diagram(s) to the size that fits the window.
Fit in Window
493
8
Button
MOD EL ANALYSIS
Metrics
Function
Metrics
NOTE This functionality is available in Architect and Enterprise editions only.
MagicDraw metrics functionality, which is implemented as a plugin and accessible through the Open API, enables you to measure your project from three different viewpoints:
UML model metrics System metrics Requirements metrics.
Using UML model metrics, you can measure your project using package, class, and diagram measurements (for example, measuring the number of classes, inheritance tree depth, and so on). System metrics analyze models using the most popular object oriented project metrics: Halstead, McCabe, Chidamber, and Kemerer defined metrics (for example, cyclomatic complexity and weighted methods per class). Requirement metrics consist of function points and use case metrics. These two metrics groups are so structurally similar that use case metrics are regarded as a subset of function point metrics. Use case metrics measure both the number of use cases in a project and the user case analysis through selected tagged values (priority, for example).
494
MOD EL ANALYSIS
Metrics
The results of these analyses are displayed in a table, where you can select which metric you would like displayed. You can also export the metrics to a separate file. Metrics are implemented as a plugin and are accessible through the Open API. A metric is a numeric value that measures a model or is counted according to model measuring. Each metric has both a lowest and highest limit specified. Metrics that fall outside of this range are marked:
Values that are too low are displayed in a blue font. Values that are too high are displayed in a red font. Note: if the highest limit equals
Metric Suites
In MagicDraw, you can create your own metric suites or use one of the three predefined metric suites: System Metrics, UML Model Metrics, or Requirements Metrics. The metric suites contain a list of metrics that will be counted and the properties specified for each selected metric. To create your own metric suites, clone an existing suite and specify the suite properties. You can edit the predefined metrics suites, and all metric suites can be imported or exported, facilitating the exchange of ideas with other users.
Displaying Metrics
Metrics are counted according to properties defined in a selected metric suite and can be counted for an entire project or just the selected packages, classes, interfaces, or diagrams. The results are displayed in the Metrics window, which opens at the bottom of the MagicDraw application window. The Metrics window contains two tabs:
Data tab. The counted metrics of the selected suite are displayed in a metrics table,
495
MOD EL ANALYSIS
Metrics
Metrics tables display packages, classes, interfaces, and diagrams. Additionally, elements that contain packages, classes, interfaces, and diagrams, which are displayed using a tree structure, are not counted for these elements. The following is an example of a metrics table structure: Model Element PackageA Inner class1 Inner class2 Metric1 value value value Metric2 value value value Metric3 value value value value value value . value value value MetricN value value value
If a value is not counted for a class, interface, package, or diagram, the cell is left empty. You can apply the following filters to the metrics table:
All Packages Classes (classes and interfaces are displayed) Diagrams Package Violations (only rows that contain package violations are displayed) Class Violations (only rows that contain class or interface violations are displayed)
When the Classes, Diagrams, or Class Violations filters are selected, the owner is displayed next to the following element: c1 (Classes::Package1)
Starting Metrics
To start Metrics:
Click Metrics on the Analyze menu, or on the class/package/interface/diagram shortcut menu, click Tools and then click Metrics.
496
MOD EL ANALYSIS
Metrics
Figure 232 -- Metrics dialog box Element Metrics Suite Calculate For Description
Opens the Metrics Options dialog box. Opens the Metrics window.
497
MOD EL ANALYSIS
Metrics
To set element options for Metrics, click the "" button to open the Select Elements dialog box:
Packages, classes and diagrams are displayed in the Select Elements dialog box. If you select the box next to a parent element (for example, the Data check box in the image above), all its related child elements are automatically selected. Conversely, clearing the box next to a parent element clears all its related child elements.
498
MOD EL ANALYSIS
Metrics
If you clear the box next to a child element, the parent box is also cleared. For example, if the Data box is selected, all its related child elements are selected. If you then clear the Package View box, its child elements are also cleared, as is the box next to Data, but all the other boxes remain selected.
Metrics window
The Metrics window is implemented as a JIDE GUI window. Like the Messages window, it is available at the bottom of the MagicDraw application window.
Figure 234 -- Metrics window GUI element Expand Current Branch Collapse Current Branch Refresh Metrics Options Export Compare Metrics With Print Description
Expands all elements in the selected branch within the results table. Collapses all elements in the selected branch within the results table. Recalculates metrics results according to the current model. Opens the Metrics Options dialog box. Opens the Export Metrics dialog box. Opens the Open dialog box, where you can select a text file to compare with the currently open metric set. Prints the metrics table. The Print dialog opens.
499
MOD EL ANALYSIS
Metrics
Filter
The selected metrics rows or cells can be copied to the clipboard by clicking Copy on the shortcut menu or by Ctrl+C on your keyboard.
Exporting Metrics
You can export the selected metrics rows and columns, or the entire metrics table, to a metrics results file. Metrics results can be exported using *.txt and *.html formats. In the following example, metrics are presented in *.txt format and are separated by tabs: Element Package Package1 Class class1 (Package1::class1) Class class2 (Package2::class2) Metric1 Metric2 Metric3 . value value value value value value value value value . . . MetricN Value Value Value
Here Metric1 .. MetricN the metric name abbreviation. Technical information is displayed at the bottom of the file. Text "Element IDs" are added after the metrics of an element and are also printed. This information is needed for metrics comparison.
500
MOD EL ANALYSIS
Metrics
In the following example, information is presented in *.html format: Metrics Report Element Metric1 Metric2 Metric3 . Metric N Value value
value value
value value
value value
. .
Here Metric1 .. MetricN the metric name abbreviation. Each metric name is hyperlinked with its metric description. Metric descriptions can be opened in a separate window after clicking the hyperlink. NOTE:
*.html format is best suited for viewing metrics. If you want to copy the metrics table to another program, use of the *.txt format.
To export Metrics, click the Export Metrics button in the Metrics window. The Export Metrics dialog box opens:
Metrics Output File: Displays the path and file names of the metrics results output file.
501
MOD EL ANALYSIS
Metrics
Output Type:
When selected, only the selected table rows and the header row are exported. When cleared, the entire metrics table is exported.
Comparing metrics
Counted metrics can be compared with metrics that are saved in a *.txt file. Metrics can be compared only when the metrics window is open. Comparison results are displayed in the same metrics table. If a cell contains a metric that has increased, it has a red fill color. If the metric has decreased, a blue fill color is used. Metrics that are not found in other file cells have a grey fill color. The metrics comparison can be canceled using the ESC key.
Metrics Options
Metrics suites are managed in the Metrics Options dialog box. To open the Metrics Options dialog box:
From the Analyze menu, select Metrics and then Metrics Options In the Metrics dialog box, click Metrics Options.
The left pane of the Metrics Options dialog box displays the defined metrics suites. Using the buttons or shortcut menu, metrics suites can be cloned, renamed, removed, exported, and imported. Predefined metrics sets cannot be renamed or removed. The suite properties are displayed in the right pane:
502
MOD EL ANALYSIS
Metrics
503
MOD EL ANALYSIS
Metrics
Clone clone the selected suite. Rename rename the selected suite. Remove remove the selected suite. Import import a new suite. The Open dialog box opens. Export export the selected suite. The Save dialog box opens.
All these commands are available from each metric suite shortcut menu. Use this tree to select the metrics you want to include in your metrics suite. All metrics are displayed in the metrics tree. Metrics properties are displayed individually for each property. Selects all metrics. Clears all metrics. Predefined MagicDraw metrics are reset to the default metrics suite. User-created metrics suites are reset to the selected predefined metrics suite. The Reset Metrics Suite Properties dialog box opens:
Description OK
Displays the selected metric description. Saves all changes and closes the dialog box.
504
MOD EL ANALYSIS
Metrics
Metrics Properties
Properties Group General Property Description
Calculate
elements tree. Each upper level metric will be counted as an average of the current object metric and all lower level metrics: Average_element_metric = (Element_metric_value (if counted separately) + sum (inner_elements_metrics_values)) / (1 (if element_metric_value was counted) + count_of_inner_elements_that_have_metrics_counted) Average metric value should be rounded down to the lower value (for example, 1.5 = 1, 1.6 =2)
Min lowest level metrics will be counted. Each upper level
metric will be set to the minimum of the current object metric and all lower level metrics (except the metrics that are equal 0). Min_element_metric = min (Element_metric_value, min (inner_elements_metrics_values)) Here metric_value > 0
Max lowest level metrics will be counted. Each upper level
metric will be set to the maximum of the current object metric and all lower level metrics. Max_element_metric = max (Element_metric_value, max (inner_elements_metrics_values)) Here metric_value > 0
Lowest limit
Recommended lowest metric value for the package. Editable. Recommended lowest metric value for class and interface. Editable. Recommended lowest metric value for the diagram. Editable.
505
MOD EL ANALYSIS
Metrics
Property
Description
Package
Recommended highest metric value for package. Editable. Note: if the highest limit is equal to 0, the metric is never marked as too high (in red font color).
Class
Recommended highest metric value for class and interface. Editable. Note: if the highest limit is equal to 0, the metric is never marked as too high (in red font color).
Diagram
Recommended highest metric value for diagram. Editable. Note: if the highest limit is equal to 0, the metric is never marked as too high (in red font color).
Include Weight
This properties group specifies whether the information is included when counting metrics. This properties group specifies whether the information is included when counting metrics.
The following is an example of a metrics calculation used for calculating the number of classes (NC) in this tree:
Calculated metric values with a different aggregation: Element Top Local 1 Global 8 Average 1 Min 1 Max 2
506
MOD EL ANALYSIS
Dependency Matrix
Calculated metric values with a different aggregation: Inner1 C1 C2 c_in1 c_in2 Inner2 C3 c_in3 c_in4 C4 2 0 2 0 0 1 2 0 0 0 4 0 2 0 0 3 2 0 0 0 1 0 1 0 0 1 1 0 0 0 2 0 2 0 0 1 2 0 0 0 2 0 2 0 0 2 2 0 0 0
Dependency Matrix
View Online Demo NOTE Dependency Matrix This functionality is available in Standard, Professional, Architect, and Enterprise editions only.
The Dependency Matrix is a method of visualizing and representing dependency criteria. Diagrams, UML, and extended UML elements serve as row and columns entries. The cells in the matrix show where these elements are associated - related. Dependency matrixes include different dependency criteria: UML relations, extended UML relations, semantic dependencies (dependency through property), and relationships through tags. Relationship through tags is a relationship where a cell represents a relation that is implemented as a tag added to the element with a reference to another element. A relation through tags allows relate
507
MOD EL ANALYSIS
Dependency Matrix
UML element of any type. Tags are one of the methods for relating elements that cannot be represented on the same diagram. The Dependency Matrix fulfills the feature, which helps visualize the many-to-many traceability from elements not from the same diagrams. The Dependency Matrix also provides the visualization of many-to-many for large interconnected system elements. The most usefulness is complete the lack of functionality to support different domains - DoDAF. Dependency Matrix functionality is useful for:
Quickly visualizing dependency criteria. Compactly visualizing relations of a big system. Such system relations cannot be
relation visualizations.
Studying relations from a particular scope and type of element by filtering the
unimportant.
Showing relations that cannot be represented in diagrams: representation (class by
lifeline); behavior representation in other diagrams, operation representation by Call Behavior Action, Use Case relations with describing activities through property Owned Behavior, etc. The Semantic dependency matrix is needed for deeper model analysis. The Matrix allows the representation of any kind of relations through the element property.
Another method of showing custom relations - through tags.
Matrixes dialog box opens. Click Add to create a new dependency matrix and then click Open.
508
MOD EL ANALYSIS
Dependency Matrix
From the Analyze main menu, select Dependency Matrix and then Create Blank
Matrix. Type a name and select the package where you want to save it in the project and click OK.
From the package shortcut menu in the Browser, select New Diagram and then
Dependency Matrix.
In the custom diagrams toolbar, click the Dependency Matrix button. Type a name
and select the package where you want to save it in the project and click OK. To change the dependency matrix properties
1. In the Dependency Matrix Specification dialog box (see The Dependency Matrix
Specification dialog box, tags group on page 521), open the Tags group.
2. In the <<matrix template>> subgroup, select balded tag, marked with icon
from the
Click the ... button to select the element or multiple element types to show in rows of the dependency matrix.
509
MOD EL ANALYSIS
Dependency Matrix
Click the ... button to select the element or multiple element types to show in columns of the dependency matrix. Click the ... button to define the scope of the model (packages/profiles), from which elements should be displayed in rows of the dependency matrix. Click the ... button to define the scope of the model (packages/profiles), from which elements should be displayed in columns of the dependency matrix. +<owner>::<element> value shows the row that is added to the matrix. <owner>::<element> value shows the row that is removed from the matrix. Click "..." button to add or remove row from the dependency matrix table. The Add/Remove Elements dialog box opens. For more information about this dialog box, see The Add / Remove Elements dialog box on page 520.
Column Scope
+<owner>::<element> value shows the column that is added to the matrix. -<owner>::<element> value shows the column that is removed from the matrix. Click "..." button to add or remove column from the dependency matrix table. The Add/Remove Elements dialog box opens. For more information about this dialog box, see The Add / Remove Elements dialog box on page 520.
Dependency Criteria
Click the ... button to define what relations between row and column elements to display in the matrix cells.
UML Relations. The matrix cells will display the existence of
matrix row elements have tagged values pointing to matrix column elements or vice versa.
Properties. The matrix rows will display relations through properties if
matrix row elements have properties pointing to column elements or vice versa.
Make column same as row More>>
If selected, sets the column filter setting to the same as row. Click More>> button to expand the toolbar and find advanced matrix filters areas.
510
MOD EL ANALYSIS
Dependency Matrix
Select item from the combo box to select row/column elements, filtered by some property. Only entries that meet selected property values will be displayed in the rows/columns. Possible choices:
Applied stereotype; Visibility; Tagged Value; To Do.
Row Property Value Column Property Value Rebuild Add Remove Elements
The ... button is enabled only when some Property is selected. The corresponding dialog box with available property values opens. Multiple property value selections are available. Columns and rows rebuild action, which rebuilds element lists according to the filters configuration. Add/remove elements and diagrams from/to Matrix rows or columns independently from the filter settings.
Click the button to open the Add Remove Elements dialog box. For more information about this dialog box, see The Add / Remove Elements dialog box on page 520.
Matrix Properties
Click the button to open the Dependency Matrix Specification dialog box. For more information about this dialog box, see The Dependency Matrix Specification dialog box, tags group on page 521
Quick Diagram Layout
Click the button to automatically layout the matrix cells to default width and height.
Change Axes
511
MOD EL ANALYSIS
Dependency Matrix
Save as *.csv
Click the button. The Save dialog box opens. Select location for a file and enter a file name (default name will be set the same as Matrix Name). The file will be saved in Comma Separated Values (*.csv) format. The file can be opened with MS Excel, Open Office, MC Excel imported into databases.
Safe Configuration As Template
Click the button to save the filters configuration as a matrix template. The saved template can be imported into the Dependency Matrix Template dialog box and used in other projects.
Load Matrix Template
Click the button to open the Load Matrix Template dialog box. Select a template from the list and click OK.
512
MOD EL ANALYSIS
Dependency Matrix
Dependencies between elements are displayed in cells. Rows and columns display elements, which were specified in the Matrix View fields.
An Icon with dependency direction representation is displayed in a cell if the single dependency is presented in this cell. Arrows can be:
One directional arrow - direction shows that element is dependent on the element, to
513
MOD EL ANALYSIS
Dependency Matrix
Line - shows that elements depend on each other; "X" icon - appears when multiple dependencies are presented in the cell.
The number of dependencies between package elements is displayed in a cell where packages are intersecting with any element. Right-click on the empty space in the Dependency Matrix pane to open the shortcut menu:
514
MOD EL ANALYSIS
Dependency Matrix
2. Click the
button near the selected dependency to open the correscopding dependency Specification dialog box.
515
MOD EL ANALYSIS
Dependency Matrix
. The Load Matrix Template dialog box opens. 2. Select a template from the list and click OK. The dialog box is closed and template values appear in the rows/columns filter fields in the Matrix View. 3. Click Rebuild in order to apply the template filter for the dependency matrix. To save a configuration as a Dependency Matrix Template
1. Specify the desired filter values for rows and columns. 2. In the Matrix View, click the Save Configuration As Template button
. The
Save dialog box opens. 3. Type a name for the template, select a location and click Save. To export a Dependency Matrix Template
1. In the Dependency Matrix Templates dialog box, click the Export Selected Matrix
template button
2. Type a name for the template, select a location and click Save.
plate button . The Open dialog box opens. 2. Select a matrix template and click Open. The template with defined properties will be added to the templates list.
516
MOD EL ANALYSIS
Dependency Matrix
517
MOD EL ANALYSIS
Dependency Matrix
Function
Select the template and click the button. A copy of the existing matrix template will be created with the same properties and filter options.
Rename Selected Matrix template
Select the template and click the button. The template name will be set to editable mode for renaming.
Remove Selected Matrix template
Select the template and click the button. The template will be removed from the templates list.
Import New Matrix template
For more information, see Dependency Matrix View on page 509. If selected, upon matrix creation, the whole model will be taken as the scope (later scope can be changed in Dependency Matrix View). If cleared, matrix will be empty until specifying scope.
Matrix Properties
518
MOD EL ANALYSIS
Dependency Matrix
If selected, the number of dependencies among container elements will be shown in the cell where the container is intersecting with other elements. If selected, displays the element owners in the column headers. Displays the element owner in the row headers. Possible choices:
Full qualified name Hide Tree
Allows showing elements with or without their dependency criteria. Possible choices:
Show all; Show related elements only; Show unrelated elements only.
Displays the matrix template description. Select the HTML check box to edit text using the advanced style. The Export Module dialog box opens. You can change the package set, selected for export. Closes the dialog box and adds changes to the Matrix View fields according to the selected template. Closes the dialog box and creates the dependency matrix, applying filters and options from the selected template. Exits the dialog box without saving changes. Displays MagicDraw Help.
519
MOD EL ANALYSIS
Dependency Matrix
520
MOD EL ANALYSIS
Dependency Matrix
Box name Make column same as row Row elements Column elements Add Add All Add Recursively Remove Remove All OK Cancel Help
Function
If selected, applies the same element combination that was set for row, to column. Displays a list of all model elements and chosen elements to display in the matrix rows. Displays a list of all model elements and chosen elements to display in the matrix columns. Adds the selected element from the All data list to Row (Column) elements list without adding its inner elements. Adds all model elements from the All data list to Row (Column) elements list. Adds the selected element from the All data list to Row (Column) elements list together with its inner elements. Removes the selected element from the Row (Column)elements list. Removes all elements from the Row (Column)elements list. Saves changes and closes dialog box. Closes dialog box without saving changes. Displays the MagicDraw help.
Specification.
521
MOD EL ANALYSIS
Dependency Matrix
From the Dependency Matrix pane shortcut menu, click Matrix Properties.
Figure 241 -- The Dependency Matrix specification dialog box, Tags group
This dialog box can be used to change matrix property values. In the <<matrix template>> tags group, select bolded tags and in the right open window, change the default value to the desired one.
522
MOD EL ANALYSIS
Validation
Validation
View Online Demo NOTE Validation This functionality is available in Architect and Enterprise editions only.
Introduction
MagicDraw has the functionality to check the created models. It consists of:
A set of validation rules. Each validation rule captures some imperative conditions,
which must be checked against the model. Validation rules are specified as invariant constraints in the model.
One or more validation suites (modeled as packages). A validation suite is a simple
concept of grouping the validation rules into meaningful groups, so that the collection of rules can be applied. To run the validation, select some suites and validation scope - either the entire model or some part of it. When the validation is run, each rule from the suite is evaluated for each suitable element in the validation scope. Each element that violates the rule (constraint evaluates to false) is reported in the results table. Since rules and suites are model elements, they can be manipulated using the standard MagicDraw modeling means - they can be copied, moved, and edited in the model; they can be refactored into modules, to facilitate reuse in other projects, placed in the Teamwork Server for exchange, etc. And of course this approach allows editing predefined rules and defining new, custom rules for models and profiles.
Constraint Types
Each validation rule, modeled as a constraint has a target classifier property. This property determines on what type of element this rule applies. Thus the usual level - metalevel separation appears. Constraints that are defined on some particular classifiers are evaluated on the instances of these particular classifiers when validating. Inheritance is taken into account - instances of the subclasses of the class are also validated. Thus there are 3 types of constraints that MagicDraw can evaluate:
523
MOD EL ANALYSIS
Validation
Classifier level constraints. Constraints that are placed on the classes, datatypes
and other classifiers of the model are evaluated on all the instances of these classifiers - i.e. those InstanceSpecifications that have the particular classifier set as their type.
Constraints on metaclasses. When a constraint is placed on a metaclass (one of
the classes in the UML Standard Profile::UML2 Metamodel), this constraint is evaluated on all the model elements of that kind. E.g. if the constraint is placed on Actor metaclass, then this constraint applies to all the actor elements in the model. The following is an example of rule (specified in OCL2.0), which mandates that all actor names in the model must be capitalized:
context Actor inv capitalize: let startswith:String = name.substring(1,1) in startswith.toUpper() = startswith These constraints are useful for specifying generic rules, which must apply on all the model elements of particular kind.
Constraints on stereotypes. When a constraint is placed on some stereotypes of
the profile, that constraint applies to all the model elements that have these stereotypes applied to them. These constraints are useful when creating domain specific profiles. When adapting UML to some specific modeling domain, a profile is usually created with extensions for that domain - stereotypes, tags etc. The constraints on these stereotypes allow enforcing the rules of that domain. It is advisable not to mix the constraints from different metalevels into one suite (constraints on classifiers versus constraints on stereotypes and metaclasses).
524
MOD EL ANALYSIS
Validation
Completeness suite has a collection of rules, which check if a model is complete, that there are no gaps, and the essential information fields in the elements have been filled in (e.g. checks that all the properties have type specified etc.). Correctness suite has a collection of rules, which check common mistakes while modeling in UML2 (NOTE: this collection is not exhaustive). Additionally, there are validation suites for each of these modeling domains - XML schemas, DDL, Java, C++ plus DoDAF and SysML, if any. These validation suites are defined in the corresponding profiles of these modeling domains, hence they are included automatically when you start modeling in that domain. For example - if you create a new XML schema diagram, XML schema profile will be automatically included in your model and this profile brings in XML schema validation suite with it. So, from that moment, XML schema validation suite is available in the project.
Validating
To run the validation, you have to select a group of rules to be validated (validation suite) and indicate which part of the model to check (validation scope - either the entire model or some part of it).
525
MOD EL ANALYSIS
Validation
Figure 242 -- Validation dialog box. 2. In the Validation Suite combo box, select the UML correctness constraints . All avail-
able validation suites are listed here. The list of available validation suites depends on the open project - the validation suites and validation rules are stored in the model as normal model elements. By default, a project has two suites UML completeness constraints and UML correctness constraints - defined in the Standard profile. If a project uses other profiles/modules - such as Java/XML schema/DDL profile, these profiles bring in their own predefined suites. And you can create your own validation rules and group them into a suite and this suite will be available in this combobox.
526
MOD EL ANALYSIS
Validation
3. Select validation for Validation Selection (if you want to run validation on the entire
model select Whole Project here) then click the button to select the scope. As usual a dialog box for element selection opens:
Figure 243 -- Select Elements dialog box 4. In the Select Elements dialog box, select packages and/or elements for validation.
NOTE: validation is always recursive, hence if you select a package for validation, you do not need to select its inner elements (no need for Add Recursively button). In the case depicted above, all model elements in the Classifiers Demo and Meta Demo packages will be validated. Adding Data package is equivalent to validating the entire model. 5. Select the Minimal Severity level. By default, debug is chosen as minimum severity level. Since debug is the lowest possible severity level, all validation rules will be run. 6. Click Validate. Validation results are displayed in the Validation Results window.
527
MOD EL ANALYSIS
Validation
Window opens automatically after the validation has ended. The Validation result window has the following columns:
Column Description
Elements, which violate the constraint rule are shown here. Rule severity violations. Simple short strings showing the abbreviation of the violated constraint. Mostly used for sorting/grouping. Error texts of the violated constraints.
528
MOD EL ANALYSIS
Validation
If the validation rule is incorrect, Validations Results view will show the reason. This rule is then excluded from checking models.
To validate a model We will validate SysML model - SysML.mdzip for correctness and completeness. The model is located in MagicDraw installation directory / samples. This model requires that SysML plugin would be installed. This can be done from Help menu Resource / Plugin Manager.
1. Open model. From the Analyze menu, select Validation command, and then Valida-
Results view opens. 3. Narrow the validation scope. Click the Run validation with a new
settings button, the Validation dialog box opens. Change the scope to validation selection and select SI Value Types package, click Validate. The Validations Results view is refreshed with new options. 4. Double click the violating element kg in the results view or click Select in
529
MOD EL ANALYSIS
Validation
Containment Tree
button to rerun the validation suite with the same options and refresh validation results. Refreshed results do not include element kg. 6. Select other violating element N in the results view and click Open all
Diagrams Containing the Selected Elements grams, containing the selected model elements.
When the validation result view is opened and diagrams are shown on the screen, elements and links of the diagram, which have at least one result in the validation result view, are highlighted:
530
MOD EL ANALYSIS
Validation
Info - black
If the element violates multiple rules, the color of the most severe rule is used. Highlighting is shown until the rule is violated or the Validations Results view is not closed. Other features available for the Validations Results view:
By clicking the Select Rule in Containment Tree
the model.
You may move the selected results of the validation to the search result window by
path.
Validation Rules
The validation rules are modeled as UML2 constraints. This approach allows treating the validation rules as simple model elements. They can be handled using usual modeling mechanisms. They can be copied, moved around in the model, refactored into a separate module, stored in the teamwork server for easy information exchange, etc.
531
MOD EL ANALYSIS
Validation
Since constraints can have different semantic meanings in UML2, a special type of the constraint invariant constraint is used for modeling validation rules. To distinguish these constraints from the other types of constraints, <<invariant>> stereotype should be applied to them. Additionally, validation rules require other pieces of information severity level (for sorting/filtering), abbreviation string (a short string, for easy recognition) and error message (complete description of error explanation). This information is displayed in the validation result view. For storing this information, a special stereotype <<validationRule>>, derived from the <<invariant>>, is used. If you want to run this constraint as validation rule, use the former stereotype. If you have created the constraint just for documentation purposes and do not intend to run it, the latter constraint is sufficient. Validation rules can be placed anywhere in the model (where UML2 constraint can be placed), however, usually they are stored in the classifier, which is constrained classes, datatypes, etc. (for classifier level constraints), stereotypes (for meta-classifier level constraints). This convention breaks down for the constraints, placed on metaclasses (since these classes are stored in read only profile). In this case, place constraints wherever you like (e.g. group them into a package). To create a validation rule on a metaclass
1. Select a package where you want to place the rule. 2. Right-click this package, select New Element, and then Constraint.
Example: Lets say we have 2 stereotypes - <<product>> and <<part>>. We want to place a validation rule, that products must have at least one part in them.
532
MOD EL ANALYSIS
Validation
1. Open the product stereotype specification, select Constraints section, and click Cre-
ate.
533
MOD EL ANALYSIS
Validation
2. The name of the constraint and the expression can be specified right away, but since
we want to specifiy more information, we need to open the specification of a newly created constraint (press the button on the right of the constraint).
Figure 249 -- Specifying details of the constraint 3. In the specification panel of the constraint, specify the constraint name. Then ensure
that the Constrained Element field points to the necessary classifier (product stereotype in our case). If we have created the constraint as described here, this field will be filled automatically. If we have created the constraint through the right-click, Create Element, Constraint route (e.g. constraint for metaclasses), we will need to specify the constrained element manually. For constraints on metaclasses select the appropriate element from the UML Standard Profile::UML2 Metamodel. In UML2 the constrained element field is multivalued, but only single value is supported for validation rules.
534
MOD EL ANALYSIS
Validation
4. Now apply the <<validationRule>> stereotype on this constraint. Additional fields will
open on the pane (Abbreviation, Error Message and Severity). If these fields do not open automatically, click Customize and then Reset to Defaults in the open customization dialog box (you can also access these fields in the Tags section of the specification). 5. Fill in the values for those fields. Usage of the Severity levels (approximate guidelines):
DEBUG. This severity level should be assigned only to those validation rules, which
fit the description of INFO, but are too numerous and annoying to constantly bother the user.
INFO. Situations, which might be interesting to the user. WARNING. Used for less severe situations than ERROR, which are not errors per
se, but have a high probability of causing errors. A good example would be In Java model user redefines equals() method of the class, but does not redefine hashCode(). This is a dangerous coding situation.
ERROR. Normal error message. For ordinary, run-of-the-mill errors. FATAL. Used for the errors, which lead to model corruption or are not valid from the
UML metamodel structure viewpoint. There should be few or no validation rules of this level since MagicDraw automatically precludes such situations. This level is mostly reserved for future use. Abbreviation is a simple (and preferably short) string, for quickly distinguishing the validation rules among other rules and sorting. Acronyms and short forms, used in the domain of this validation rule can be used here (e.g. NPE for hypothetical NullPointerException check). Error Message is a longer string, fully describing the invalid situation.
Now that we have all the peripheral information about the validation rule, lets specify the actual validation rule expression. Validating expression is stored in the Specification field. UML2 expression has 2 fields Language and Body. MagicDraw supports 2 languages for expressions, that can be evaluated:
OCL2.0 is used for validation rules, specified in OCL language (version 2.0 of the
535
MOD EL ANALYSIS
Validation
Binary is used for more advanced expressions, which are not easily expressed in
OCL. These expressions are written in Java, compiled, specified in the MagicDraw classpath. Then these expressions can be specified as validation rule expressions . Other languages are not evaluatable (OCL1.5, English and others). They can be used for documentation purposes.
OCL Constraints
Continuing our example, in the constraint Specification dialog box, click the button near the Specification field and open the Edit Specification dialog box. Select OCL2.0 language. Observe that MagicDraw has automatically generated the header of the expression from the constraint information,
536
MOD EL ANALYSIS
Validation
and we only need to specify the body of expression. The expression header is generated according to the following rules: context <constrained element> <constraint type> <constraint name if any>: Constraint type is one of the types, defined in the OCL2.0 spec:
inv - when the expression is placed in the constraint with <<invariant>> stereotype
applied.
def when the expression is placed in the constraint with <<definition>> stereotype
applied.
init, derive when the expression is placed in the default value of the property. pre, post, body when the expression is placed in the appropriate fields of operation.
Since our constraint is stereotyped with <<validationRule>> stereotype (derived from invariant stereotype), inv is shown in the header. Only invariant stereotype is used for the validation rules and are executed (plus derive expressions, when referenced from invariants see Advanced Topics on page 545), other types of constraints can be used for documentation purposes. MagicDraw checks the syntax of expression as you type. However this syntax check is not enough to catch all the errors. When the validation rule is run, additional checks are performed (semantic checks such as checks for the existence of appropriate properties, type checks, multiplicity checks, etc.) to ensure that the expression can be evaluated correctly (internally, MagicDraw generates Java code from the expressions and then compiles it for execution).
Binary Constraints
For more information about Binary Constraints, see MagicDraw OpenAPI UserGuide.pdf.
Validation Suites
In MagicDraw, you can create your own validation suites or use one of the predefined ones as: UML completeness constraints and UML correctness constraints. The validation suite defines the set of validation rules, which will be applied when validating. The purpose of the validation suites is to group constraints without duplicating them.
537
MOD EL ANALYSIS
Validation
To create a new validation suite We need to check the Oracle model for correctness, but not all constraints in Generic DDL constraints suite are suitable for our Oracle model. We will create a new suite with a narrow constraint collection.
1. From the Analyze menu, choose Validation command, and then Validation
Options. The Validation Options dialog box opens. 2. Click the Create New Validation Suite button and name it Oracle specific constraints.
538
MOD EL ANALYSIS
Validation
Figure 251 -- Parts of Generic DDL constraints suite are included into Oracle specific constraints suite.
The validation suite is stored in a model as a package, to which <<ValidationSuite>> stereotype is applied. The Validation Suites pane lists all such packages of the entire model as suites. So, the alternative method to create the validation suite is to apply <<ValidationSuite>> stereotype for a package.
539
MOD EL ANALYSIS
Validation
When the user includes / excludes the constraint, the appropriate element import link is created/ deleted in the model.
Figure 252 -- Element import relation showing in model that Oracle specific constraints suite includes other constraints.
Also, there can be constraints that are stored directly in the suite package - they are also considered as contained in this suite, and because they are physical in package those constraints can not be excluded from the suite through Validation Options dialog box. Typically, validation rules should be stored in a constrained element, but in cases when the constrained element is read-only, for example it is stored in a read-only profile, adding constraints to it requires profile editing and a separate constraints grouping is easier. Constraint Tree The constraint tree is shown in the right Validation Options pane. This tree shows all the constraints with <<invariant>> or <<validationRule>> stereotype applied, presented in the model, together with the appropriate grouping elements. Each item has a checkbox, indicating inclusion or exclusion of the constraint in the selected validation suite. The constraint tree contains packages and other model elements. If it contains constraints, they are arranged according to their containment in a model. Additionally, this tree contains other validation suites. The user can include / exclude rules and these rules must suit the selected validation suite by selecting / unselecting these checkboxes in the tree.
540
MOD EL ANALYSIS
Validation
To group two or more suites into one We have created an abstract system model, and modeled its implementation with Java specific classes. To check this model completeness, correctness, and conformity to Java language by using three suites. We will combine all these suites to one in order to simplify the model checking.
1. From the Analyze menu, choose Validation command, and then Validation
541
MOD EL ANALYSIS
Validation
3. Include the existing validation suites: Java constraints, UML completeness con-
straints and UML correctness constraints in the suite by selecting the checkbox in front of the packages in the Validation Rules panel.
Figure 253 -- UML correctness, UML completeness, and Java validation suites included in the General
542
MOD EL ANALYSIS
Validation
validation suite.
Figure 254 -- Package import is signifying in the model that one General suite includes the other as a subset.
To share constraints Lets say we have created a validation suite with constraints and need to share it for other group members for their models validation. Validation rules/suites sharing is available through standard MagicDraw module mechanism. Package with constraints might be exported as module and used by any other project. Another way of sharing constrains is copying them between projects. Since validation rules are simple model elements, any mechanism can be used on them.
1. From the model select Java constraints package to which <<ValidationSuite>> ste-
reotype is applied. 2. From the package context menu select Modules and select Export module. 3. Save the exported package as Java constraints.mdzip. Only constraints that are stored physically in the Java constraints package are exported together with the package. Now the exported package can be used by other users and projects.
1. From the File menu, select Use Module. The Use Module dialog appears. 2. Select path to Java constraints.mdzip and select it to use. 3. Specify module import options. 4. Module is added into a project and the constraints can be used for validation.
543
MOD EL ANALYSIS
Validation
The validation suite can be defined in the module, which is mounted as read-only in the project. Read-only and Autoload module will not be loaded into the project, but will be visible through validations dialog box if <<ValidationSuite>> stereotype was applied to the exported package. In this way the model and the profile will be smaller. And the validation suite is still visible through validation dialog box.
Figure 255 -- Java constraint validation suite module is mounted onto the project as Read-only and Autoload. In this way constraints are not added into project by default, until the validation suite is used.
544
8
.
MOD EL ANALYSIS
Validation
Figure 256 -- Unloaded module with Java constrains validation suite is avaialable through Validation dialog.
Advanced Topics
Global validation rules
Some of the validation rules, specified in OCL, do not refer to the current element (self). Such rules are often encountered when using allInstances() method to refer to all instances of a particular classifier. Such validation rules are called global validation rules in MagicDraw terminology. Evaluating these rules for each model element is pointless, hence they are evaluated only once per entire validation run. When reporting violations, such rules have a string <model> in the column of violating model elements. This means that it is not the concrete element that violates the rule, but the entire model itself. Here is an example of such a rule (always fails): context anything inv: false Such a rule is not very useful indeed. The following is another example: context SomeSingletonClass inv: SomeSingletonClass::allInstances()->size() <= 1
545
MOD EL ANALYSIS
Validation
This rule checks that there is at most one instance of the SomeSingletonClass in the model. The following is a more complex example:
Here, ReseachProject class has a following validation rule (budget must be balanced sum of expenses of all projects must be less than sum of all sponsor contributions): context ResearchProject inv balanced_budget: ResearchProject::allInstances().budget->sum() <= Sponsor::allInstances().contribution->sum() Sponsor class has a following rule (anticorruption rule - each sponsor can not contribute more than 40% of the funds): context Sponsor inv anticorruption_law: contribution < Sponsor::allInstances().contribution->sum() * 0.4 Now look at the results of applying these rules:
546
MOD EL ANALYSIS
Validation
We see that budget balancing rule is a global rule it is not the concrete instance of ResearchProject that violates the rule, but the entirety of instances in the model. Hence the string <model> in the column of that offending elements. However, note that anticorruption rule is not a global rule - it refers to contribution field, which is really a shorthand for self.contribution, hence this rule refers to self variable and therefore, is not global and is evaluated for each instance of the Sponsor class separately. MagicDraw has no means to determine if the binary validation rules are global, hence all binary rules are treated as local.
547
MOD EL ANALYSIS
Validation
Where does the number 500 come from? It is not directly specified in the error message string (since it is different for different models) but a calculated value of the expression, embedded in an error string. This error string in this case is: Budget not balanced - overbudget by { ResearchProject::allInstances().budget->sum() Sponsor::allInstances().contribution->sum()}$ Expressions are embedded in the error messages by using curly brackets - {}. Everything between them is treated as an expression and evaluated for each validation result. Expressions are treated as OCL2.0 expression by default, however you can also use binary expressions. In this case use {bin: <binary expression>} syntax.
<<invariant>> or <<validationRule>>.
init place an opaque expression in the defaultValue field of the property.
548
8
.
MOD EL ANALYSIS
Validation
To place an opaque expression in the default value of the property, rightclick on the default value field in the specification of the property and select Value Specification, Opaque Expression.
derive when the expression is placed in the default value of the property (the same
as for init expressions) but the property is marked as derived in the specification.
549
MOD EL ANALYSIS
Validation
pre, post, body when constraints are placed in the appropriate fields of operation
(precondition, postcondition and body condition respectively). Note that derive expressions can be evaluated indirectly, when the validation rule (inv constraint) is referencing the property and the validation rule is evaluated.
There may be some other features that are not working properly. These features can be reported to [email protected]. MagicDraw uses external library Dresden OCL Toolkit for constraint evaluation.
as base class.
2. Set the necessary icon on this stereotype. 3. Apply this stereotype on your custom severity level enumeration literal. 4. Additionally, specify the highlightColor tagged value on the literal. This field (of the
String type) determines how the offending elements will be highlighted in the diagrams. The string format is the same as for the specifying colors in HTML pages (as described in http://www.w3.org/TR/html4/types.html#h-6.5 ). Simple string con-
550
MOD EL ANALYSIS
Active Validation
straints (such as highlightColor=red) or numeric values (such as highlightColor=#FF0000) can be used here.
Performance Issues
When validation rules, written in OCL are evaluated, MagicDraw generates Java source for them and invokes Java compiler to compile them into an executable form. Hence, on the first run of validation there is usually a delay of 20-30 seconds (depending on the computer performance) while Java compiler is loading. Subsequent runs will be faster that the first one. Also, this process consumes some amount of RAM. If the validation process is run heavily on medium-large projects, increasing the default Java VM size is advisable. By default, VM size is set to 400MB in MagicDraw; increasing this to 600 (or 800 if the computer has sufficient RAM) might improve the performance.
Active Validation
View Online Demo Active Validation
NOTE
Active Validation instantly checks the accuracy, completeness, and correctnes of a model, displays errors in the model, and suggests solutions. The following modeling cases are validated with the Active Validation:
Parameters and arguments synchronization validation Correct ownership validation Orphaned proxies' validation.
Active Validation is an extendable mechanism that identifies common problems and solutions. Custom validation suites and constraints can be created using binary or OCL constraint. Invalid symbols are marked on diagrams and elements in the model. Errors in the model are represented in the following ways:
551
MOD EL ANALYSIS
Active Validation
From the invalid element/symbol shortcut menu, you can analyze incorrect elements, and solve problems, resulting from the errors, through the Active Validation Results window. Model is validated with three predefined validation suites and the Validation is performed for the parameters and arguments synchronization, correct ownership, and orphaned proxies. You can modify these suites and create your own through the Validation Options dialog box.
Failure indicator
If an error occurs, the failure indicator will appear in the bottom right corner of MagicDraw (see Figure 260 on page 553). Click this indicator and the Active Validation Results window will open.
552
MOD EL ANALYSIS
Active Validation
553
MOD EL ANALYSIS
Active Validation
Possible values - indicating warning - indicating error or fatal error. - indicating debug error or info.
1 w
Number of errors of that specific severity First letter of the error severity
554
MOD EL ANALYSIS
Active Validation
555
MOD EL ANALYSIS
Active Validation
556
MOD EL ANALYSIS
Active Validation
557
MOD EL ANALYSIS
Active Validation
Figure 265 -- The Project Options dialog box, Active Validation group
558
MOD EL ANALYSIS
Active Validation
Arguments should always in sync with Parameters. But in cases when synchronization is not possible or corrupted, the active validation will notify the user by highlighting the symbols on the diagrams.
Shape Ownership
The term symbol means a visual representation of some model elements in the diagram. Symbols are further subdivided into shapes and paths (lines in the model, for displaying various relationships). When drawing UML diagrams, the element ownership is not easily visible. One diagram can contain symbols for elements from several different packages. Element rearrangements in the model may lead to situations where the element ownership in the model does not match the symbol ownership as displayed in the diagram. Such situations are not easy to detect from diagram view. MagicDraw version 15.0 has a built-in validation code to detect this mismatch. This feature is enabled by default and run unnoticed without requiring any additional input from the user. When the symbol ownership on the diagram pane does not match the actual element ownership in the model, the symbol is highlighted with red. So, you will easily see it on the diagram and will be able to correct the problem (problem correction hints are also suggested).
When the mismatch is resolved, the highlighted symbol will return to normal. The symbol ownership validation feature uses the same mechanism for problem highlighting as the generic validation feature available in MagicDraw Enterprise edition. If you run some validation suites against the model, the element can be highlighted due to any of the validations failures:
either validation rule(s) from that suite, or this automatic symbol ownership checking rule(s).
For more information about validation, see Validation on page 523. Symbol ownership validation covers two cases:
Class diagram and its derivatives (use case, implementation, composite structure
diagrams etc.) can display elements from many model locations and show their
559
MOD EL ANALYSIS
Active Validation
ownership. If shape owner is incorrect (not the same as the element owner in the model), this shape will be highlighted.
Dynamic diagrams (state machine, activity and interaction diagrams) have a
restriction that only elements from one definite state machine, activity or interaction can occur in each concrete diagram. Validation rule checks for these diagrams that only elements from correct state machine, activity, or interaction appear in the diagram. All foreign elements are highlighted as erroneous. These cases are summarized in the table below
Validation of ownership on the diagram pane Validation rule Validation of diagram owner, on which element is drawn
Check if the symbol owner on the diagram correctly reflects the element owner in the model.
Check if the element and the diagram on which the symbol is drawn belong to the same owner. This is valid for dynamic diagrams. The checking is performed according to the context of the diagram.
Shapes are checked, excluding paths. Validation works for shapes, including paths. Check is performed:
if the element symbol is draw on the
Check is performed:
if the communication diagram and
the same state to which it actually belongs; and other similar cases.
560
MOD EL ANALYSIS
Active Validation
For example, on the diagram pane, an element shape is nested in package A, but actually the element is in package B.
For example, a diagram belongs to activity A, but elements of this diagram belong to activity B.
Important TIP
Ownership validation is not available in the Business Process diagram. To locate the actual owner of the element:
Select the element on the diagram pane and right click. Select the Select in
Containment Tree command. In the Browser you can see the actual element. The parent in the tree is the actual owner.
In the element Specification dialog box, look up the Owner property.
Solving the detected symbol ownership problems In this section you will find out the reasons why an element is highlighted in red and how to solve symbol ownership problems quickly.
561
MOD EL ANALYSIS
Active Validation
Select the highlighted element on the diagram pane. The Smart Manipulator toolbar opens. Notice the red button on the top of Smart Manipulator toolbar.
To see the reason why a shape is highlighted, move the mouse pointer over the red button in the Smart Manipulator toolbar. You will see a tool tip that explains why the element is highlighted. For example: Shape ownership in the diagram does not correspond to the element ownership in the model. You may either solve the problem yourself or choose one of the suggested solutions. To select an available solution, click the red button in the Smart Manipulator toolbar. A menu with the following commands will open (note that some items might not be included depending on the situation in the model):
Remove this Shape. Symbol is deleted from the diagram pane.
NOTE: When a symbol is deleted, the element is not deleted from the project.
Move Element Here. Element is moved to the new owner in the model, so that the
element ownership in the model corresponds to the present shape ownership in the diagram.
De-nest this Shape. Shape (not element!) will be extracted from the current owner
and placed directly on the diagram. This solution is applicable only for some cases
562
MOD EL ANALYSIS
Active Validation
(e.g. De-nest, this Shape command is not available for shape, placed in the incorrect state machine, activity, interaction diagrams).
dialog box, Diagram branch, Display options group. To define the ownership checking period
In the Environment Options dialog box, Diagram branch, Display group, Diagram Checking Period text box, type the diagram checking period in seconds.
Related Topics Setting Environment Options on page 104. Smart Manipulation on page 221.
563
MOD EL ANALYSIS
Active Validation
During model editing theres is possibility can happen that an element is referenced using proxy, but the real element is not shared or does not exist in the module. After the modules that load such proxies are detectd, they are called Orphaned Proxies. These proxies are marked by a validation sign in the browser. Actions to clean such proxies are added.
Sample description
Notes To the symbol smart manipulator toolbar there is added additional button (grey circle with cross inside) that presents the errors solving solutions.
Use Case documentation (comment owned by Use Case and annotating Use Case) has a spelling error
Use Case symbol is highlighted with red dashed border (see Figure 267 on page 565).
The owner of the hidden element with error is marked with white x in red quadrant in the Containment tree as itself would have error (see Figure on page 565).
564
MOD EL ANALYSIS
Active Validation
Sample description
Representation in Diagram
Notes
Use Case symbol is highlighted with red dashed border (see Figure 268 on page 566).
The owner of the corrupted and not represented in diagram element is marked with white X in grey quadrant in the Containment tree (see Figure 269 on page 566).
Figure 267 -- The Use Case is highlighted with red dashed border, because it has documentation with spelling error
The Use Case is highlighted with white X in red quadrant in the Containment tree, because it has documentation has a spelling error
565
MOD EL ANALYSIS
Usage in Diagrams
Figure 268 -- The "Register return" Use Case is highlighted with red dashed border, because the "Return violationn" Extension Point has a spelling error
Figure 269 -- The Register return Use Case is highlighted with white X in grey quadrant in the Containment tree, because the Return violationn Extension Point has a spelling error
Usage in Diagrams
Definition
The term symbol means a visual representation of some model element in the diagram. Symbols are further subdivided into shapes and paths (paths are lines used in the model for representing various relationships).
The symbol usage in diagrams functionality allows the user to see the usage of a symbol throughout the diagrams of a project. The two diagram searching possibilities are:
"Searching for symbol usage in diagrams from the element specification dialog box" "Searching for symbol usage in diagrams from the element shortcut menu".
566
MOD EL ANALYSIS
Usage in Diagrams
Searching for symbol usage in diagrams from the element specification dialog box
1. To see the diagram list, open the element specification dialog box and select Usage
in Diagrams. The table shows all diagrams in which the symbol is represented.
2. Select the diagram you want to open. 3. Press the Open button. The diagram is opened and the symbols of the element are
selected. If the diagram includes more than one of the same element symbol, all symbols of the same element are selected in the diagram.
Figure 270 -- The element specification dialog box, the Usage in Diagrams branch
For more information about working with the element specification dialog box, see Specification dialog boxes on page 265.
567
MOD EL ANALYSIS
Usage in Diagrams
Searching for symbol usage in diagrams from the element shortcut menu
1. Select the element in the Browser or select the symbol in the diagram. 2. From the element shortcut menu, select Go To and then Usage in Diagrams. 3. Select the diagram that you want to see the particular element symbol. The diagram
is opened and symbols of the current element are selected on the diagram.
Figure 271 -- Searching for symbol usage in diagrams from the element shortcut menu Tip!
You can also search from usage in diagrams in the following way:
Select the symbol on the diagram. Then, from the Analyze main
diagram.
If more than one symbol exists in the same diagram, then the
diagram is zoomed out, to fit the view in screen. For information about the Usages /Dependencies functionality for analyzing associations between elements, see Dependencies analysis on page 479.
568
UML DIAGRAMS
In software development, the diagram is the equivalent of a blueprint. To meet the various needs of many parties, we often need several different blueprints of the same system. Furthermore, every system is described by many different aspects. For example:
Functional (static structure and dynamic interactions) Nonfunctional (timing requirements, reliability, and deployment) Organizational (work organization and mapping to code modules)
Use Case Diagram Class Diagram Object Diagram Composite Structure Diagram State Machine Diagram Protocol State Machine Diagram Activity Diagram Interaction Overview Diagram Sequence Diagram Communication Diagram Component Diagram Deployment Diagram
Use Case Diagrama Class Diagrama Composite Structure Diagram State Machine Diagram Protocol State Machine Diagram Activity Diagram Interaction Overview Diagram Sequence Diagram Communication Diagram Implementation Diagrama
a. The Package Diagram is provided for use with Use Case, Class, and Implementation Diagrams
569
9 UML D IAGRAMS
Architectural Views
Architectural Views
UML defines 13 diagrams that describe 4+1 architectural views:
Several kinds of diagrams provide a visual notation for the concepts in each view.
570
9 UML D IAGRAMS
Architectural Views
Structural View
The structural view represents structural elements for implementing a solution for defined requirements. It identifies all of the business entities and how these entities are related to each other. Usually entities are represented as classifiers and their instances in class and object diagrams in multiple abstraction levels. System decomposition to different layers can be displayed using Package diagrams. A Composite structure diagram can be used to represent the classifier inner structure. The system structural view artifacts are created by software architects and represent the system implementation design solutions.
Behavioral View
The dynamic behavior of the system is displayed on the Interaction (sequence and collaboration), State, Activity, Interaction overview, and Timing diagrams. It focuses mainly on the interactions that occur between objects inside a system, activities and work performed by the various parts of a system, and state changes within a particular object or collaboration. Rather than defining the participants of the system, it defines how particular use cases are executed, which provides value for the external user. The dynamic view is concerned about what is happening inside the system and how those actions impact other participants.
Implementation view
The implementation view describes the implementation artifacts of logical subsystems defined in the structural view. It may include the intermediate artifacts used in a system construction (code files, libraries, data files, etc.) This view defines dependencies between the implementation components and their connections by the required and provided interfaces. Components and their relationships are displayed on the Component diagram. Inner parts of the component can be represented with the Composite structure diagrams. The implementation view helps analyze system parts and their dependencies in a higher component level.
Environment view
The environment view represents the physical arrangement of a system, such as computers and devices (nodes) and how they are connected to each other. In contrast to the component view, the deployment view is concerned with the physical structure of the system and the location of the software modules (components) manifested by artifacts within the system.
571
9 UML D IAGRAMS
Class Diagram The environment view is displayed on the deployment diagram that is called the implementation diagram in MagicDrawTM UML.
Class Diagram
A class diagram is a graphic representation of the static structural model. It shows classes and interfaces, along with their internal structure and relationships. The classes represent types of objects that are handled in a system. A class diagram does not show temporal information, it describes only the classification. The instances of those types (objects) are instantiated only on the runtime and are represented by an object and the interaction diagrams. The classes can be related to each other in a number of ways: associated (connected to each other), dependent (one class depends/uses another class), specialized (one class is a subtype of another class), or packaged (grouped together as a unit package). A class diagram does not express anything specific about the relationships of a given object, but it does abstractly describe the potential relationships of one object with other objects. A system typically has a number of class diagrams not all classes are inserted into a single class diagram. A class may have multiple levels of meaning and participate in several class diagrams. A class diagram is the logical map of an existing or future source code. The classes can be grouped into packages. The packages can be nested within other packages. A package, as an entity, may have all the relationships that can be drawn for a class. Those relationships are derived from the classes or packages that are nested within two particular packages (i.e., the relationship between packages reflects a set of relationships between classes placed in those packages).
572
9 UML D IAGRAMS
Class Diagram
A descriptor for a set of objects with similar struc(C) tures, behaviors, and relationships.
Enumeration
A user-defined data type whose instances are a (K) set of user-specified named enumeration literals. The literals have a relative order but no algebra is defined on them.
Class by Pattern
(SHIFT+P)
Signal
Data Type
Primitive Type
573
9 UML D IAGRAMS
Class Diagram
Model element Interface Button (hot key) Notation
The description of a visible behavior of a class, a component or a package. Attributes and operations inside the Interface can be suppressed.
(I)
Package
Model
A model is an abstraction of a physical system from a particular point of view. A model contains a hierarchy of packages/subsystems and other model elements that describe the system.
(M)
574
9 UML D IAGRAMS
Class Diagram
Model element Button (hot key) Notation
Generalization A relationship between a more general and a more specific element. Note: Choose a different Generalization direction from the toolbar to draw a line with an opposite arrow end. Association A connection among classes, which also means a connection among objects of those classes.
Directed Association
(G)
(S)
Non-navigable Association
575
9 UML D IAGRAMS
Class Diagram
Model element N-ary association Button (hot key) Notation
An association among two or more classes (a single class may appear more than once).
(O)
Association Class
The Association Class is a declaration of a semantic relationship between Classifiers. The Association Class, which has a set of features of its own, is both an Association and a Class. Aggregation An aggregation is an association that represents a whole-part relationship.
(A)
Directed Aggregation
576
9 UML D IAGRAMS
Class Diagram
Model element Composition Button (hot key) Notation
A composition is a form of aggregation with a stronger ownership and coincident lifetime of part with the whole.
(F)
Directed Composition
Interface Realization A relationship is usually used between an interface and an implementation class. Note: Choose a different Interface Realization direction from the toolbar to draw a line with an opposite arrow end.
Realization
(R)
(E)
577
9 UML D IAGRAMS
Class Diagram
Model element Substitution Button (hot key) Notation
A usage is a relationship in which one element requires another element (or set of elements) for its full implementation or operation. Note: Choose a different Usage direction from the toolbar to draw a line with an opposite arrow end.
Abstraction
An abstraction is a dependency relationship that relates two elements or sets of elements that represent the same concept at different levels of abstraction or from different viewpoints.
Template Binding A binding is a relationship between a template and a model element generated from the template.
(B)
578
9 UML D IAGRAMS
Class Diagram
Model element Package Merge Button (hot key) Notation
A package merge is a directed relationship between two packages that indicates that the contents of the two packages are to be combined.
Package Import
A package import is defined as a directed relationship that identifies a package whose members are to be imported by a namespace.
Element Import
An element import is defined as a directed relationship between an importing namespace and a packageable element.
Instance
(SHIFT+O)
Link
579
9 UML D IAGRAMS
Class Diagram
Model element Stereotype Button (hot key) Notation
A stereotype is an extension mechanism that defines a new and more specialized element of the model based on an existing element.
MetaClass
(SHIFT+S)
A class whose instances are classes. Metaclasses are typically used to construct metamodels.
Extension
An extension is used to indicate that the properties of a metaclass are extended through a stereotype, and gives the ability to flexibly add (and later remove) stereotypes to classes.
Profile
A profile application is used to show which profiles have been applied to a package.
580
9 UML D IAGRAMS
Use Case Diagram
Figure 273 -- The schematic view of the use cases in the system.
581
9 UML D IAGRAMS
Use Case Diagram
Actors represent roles played by (A) human users, external hardware, and other subjects. An actor does not necessarily represent a specific physical entity but merely a particular facet (that is, "role") of some entities that is relevant to the specification of its associated use cases.
Use Case
A use case is a kind of behaviorrelated classifier that represents a declaration of an offered behavior. (U) Each use case specifies a particular behavior, possibly including the variants that the subject can perform in collaboration with one or more actors. The subject of a use case could be a physical system or any other element that may initiate a behavior, such as a component, a subsystem, or a class.
(P)
Package
A group of classes and other model elements. A package may contain other packages.
582
9 UML D IAGRAMS
Use Case Diagram
Element Button (hot key) Notation
Subsystem
A subsystem is treated as an (Y) abstract single unit. It groups model elements by representing the behavioral unit in a physical system.
System Boundary
Another representation of a package. A system boundary element consists of use cases related by Exclude or Include (uses) relationships, which are visually located inside the system boundary rectangle.
Include
(B)
An include (uses) relationship from use case A to use case B indicates that an instance of the use case A will also contain the behavior as specified by B.
(C)
Extend
A relationship from an extending use case to an extended use case that specifies how and when the behavior defined in the extending use case can be inserted into the behavior defined in the extended use case. The extension takes place at one or more specific extension points defined in the extended use case. Note: Choose a different Extend direction from the toolbar to draw a line with an opposite arrow end.
(E)
583
9 UML D IAGRAMS
Communication Diagram
Element Association Button (hot key) Notation
The participation of an actor in a use case, i.e. instances of the actor and instances of the use case communicate with each other. This is the only relationship between actors and use cases.
Generalization
(S)
A relationship between a more general and a more specific element. Note: Choose a different Generalization direction from the toolbar to draw a line with an opposite arrow end. (G)
Communication Diagram
The Communication diagram illustrates the various static connections between objects, and models their interactions. It also presents a collaboration that contains a set of instances as well as their required relationships given in a particular context, and includes an interaction that defines a set of messages. These messages specify the interaction between the classifier roles within a collaboration that will serve to achieve the desired result. A Communication diagram is given in two different forms: at the instance level or at the specification level.
584
9 UML D IAGRAMS
Communication Diagram
A lifeline represents an individual participant in the Interaction. The Lifelines (O) represent only one interacting entity.
Connector
Specifies a link that enables (C) communication between two or more lifelines. Each connector may be attached to two or more connectable elements, each representing a set of lifelines.
Connector to Self
Self connector for self-calls. It begins and ends on the same lifeline.
(S)
585
9 UML D IAGRAMS
Communication Diagram
Element Message to Right Message to Left Button (hot key) Notation
A Message defines a particular communication between the Lifelines of an Interaction. It implies that one object uses the services of another object, or sends a message to that object. A communication can be formed by e.g. raising a signal, invoking an Operation, creating or destroying an Instance. Click on the arrow to expand the toolbar and choose an appropriate message type.
Call Message to Right
586
9 UML D IAGRAMS
Sequence Diagram
Element Reply Message to Right Button (hot key) Notation
Sequence Diagram
A sequence diagram shows the interaction information with an emphasis on the time sequence. The diagram has two dimensions: the vertical axis that represents time and the horizontal axis that represents the participating objects. The time axis could be an actual reference point (by placing the time labels as text boxes). The horizontal ordering of the objects is not significant to the operation, and you may rearrange them as necessary.
587
9 UML D IAGRAMS
Sequence Diagram
(O)
Lifeline
Activation Bar
Focus of control. Shows the period during which an object is performing an action either directly or through a subordinated procedure.
Alternatives
(SHIFT+A)
Loop
(SHIFT+L)
Option
(SHIFT+O)
588
9 UML D IAGRAMS
Sequence Diagram
Model elements Button (hot key) Notation
Parallel
(SHIFT+P)
Break
(SHIFT+B)
Negative
(SHIFT+G)
Critical Region
(SHIFT+R)
Consider
(SHIFT+C)
Ignore
(SHIFT+I)
Weak Sequencing
(SHIFT+W)
589
9 UML D IAGRAMS
Sequence Diagram
Model elements Button (hot key) Notation
Strict Sequencing
(SHIFT+S)
(SHIFT+R)
A reference to interactions, communication diagram, sequence diagram, and time diagram can be created.
(SHIFT+T)
Message
A communication between objects that conveys information with the expectation that an action will ensue. The receipt of a message is one type of event.
(M)
Call Message
(A)
Send Message
(E)
590
9 UML D IAGRAMS
Sequence Diagram
Model elements Button (hot key) Notation
Reply Message
(R)
Create Message
(C)
Delete Message
(T)
(D)
Diagonal Message
(S)
Message to Self
591
9 UML D IAGRAMS
Sequence Diagram
Model elements Button (hot key) Notation
(U)
Recursive message
Duration Constraint
A duration defines a value specification that specifies the temporal distance between two time instants.
Time Constraint
592
9 UML D IAGRAMS
Sequence Diagram
Term
The OMG UML specification (UML 2.2: Superstructure) states: "A StateInvariant is a runtime constraint on the participants of the interaction. It may be used to specify a variety of different kinds of constraints, such as values of attributes or variables, internal or external states, and so on".
State invariant element support is added in sequence diagram: In the Figure 274 on page 594, the State Invariant element is presented in two cases:
1. State Invariant with a assigned mystate State. 2. State Invariant with a defined constraint Y.p=15.
593
9 UML D IAGRAMS
Sequence Diagram
594
9 UML D IAGRAMS
Sequence Diagram
Terms
The OMG UML specification (UML 2.2: Superstructure) states: "A lost message is a message where the sending event occurrence is known, but there is no receiving event occurrence. We interpret this to be because the message never reached its destination." "A found message is a message where the receiving event occurrence is known, but there is no (known) sending event occurrence. We interpret this to be because the origin of the message is outside the scope of the description. This may for example be noise or other activity that we do not want to describe in detail.
595
9 UML D IAGRAMS
State Machine Diagram
596
9 UML D IAGRAMS
State Machine Diagram Objects that do not present a very pronounced reactive behavior may always be considered to stay in the same state. In such a case, their classes do not possess a state machine. State diagrams (also called Statechart diagrams) represent the behavior of entities capable of dynamic behavior by specifying its response to the receipt of event instances. Typically, the state diagrams describe the behavior of classes, but the statecharts may also describe the behavior of other model entities such as use-cases, actors, subsystems, operations, or methods. A state diagram is a graph that represents a state machine. States and various other types of vertices (pseudostates) in the state machine graph are rendered by the appropriate state and pseudostate symbols, while transitions are generally rendered by directed arcs that inter-connect them. The states may also contain subdiagrams by physical containment or tiling. Note that every state machine has a top state, which contains all the other elements of the entire state machine. The graphical rendering of this top state is optional. The states are represented by the state symbols, while the transitions are represented by arrows connecting the state symbols. The state diagram concerns with internal object changes (as opposed to the external object interaction in collaboration). Do not attempt to draw them for all classes in the system, because they are used only for modeling a complex behavior. The state diagram shows all the possible states that objects or collaborations may have, and the events that cause the state to change. An event can be another object that sends a message to it: for example, that a specified time has elapsed or that some conditions have been fulfilled. A change of a state is called a transition. A transition may also have an action connected to it that specifies what should be done in connection with the state transition.
597
9 UML D IAGRAMS
State Machine Diagram
If a black arrow is placed on a button, right-click the button, to open other available buttons. Button (hot key) Model elements State Notation
A state models a situation during which some (usually implicit) invariant conditions holds. The invariant may represent a static situation such as an object waiting for some external events to occur. However, it can also model dynamic conditions such as the process of performing some behavior.s
Composite State A composite state either contains one region or is decomposed into two or more orthogonal regions. Each region has a set of mutually exclusive disjoint subvertices and a set of transitions.
(SHIFT+S)
(SHIFT+ C)
Orthogonal State
(C)
598
9 UML D IAGRAMS
State Machine Diagram
Model elements Submachine State Button (hot key) Notation
The submachine state specifies the insertion of the specification of a submachine state machine. The Submachine state is a decomposition mechanism that allows factoring of common behaviors and their reuse.
Initial
(A)
(R)
Entry Point
The entry point connection points a reference as the target of a transition. This implies that the target of the transition is the entry point pseudostate as defined in the submachine of the submachine state.
(Y)
599
9 UML D IAGRAMS
State Machine Diagram
Model elements Exit Point Button (hot key) Notation
The exit point connection points a reference as the source of a transition. This implies that the source of the transition is the exit point pseudostate as defined in the submachine of the submachine state that has the exit point connection point defined.
Connection Point Reference
(U)
The Connection point references of a submachine state can be used as the (Z) sources/targets of the transitions. They represent entries into or exits out of the submachine state machine referred by the submachine state.
Deep History
Represents the most recent active configuration of the composite state that directly contains the pseudostate; e.g. the state configuration that was active when the composite state was last exited.
(P)
600
9 UML D IAGRAMS
State Machine Diagram
Model elements Shallow History Button (hot key) Notation
Represents the most recent active substate of its containing state (but not the substates of that substate). A composite state can have at most one shallow history vertex.
Junction
(SHIFT+R )
The junction vertices are semantic-free vertices that are used to chain together multiple transitions. They are used to construct the compound transition paths between states.
(J)
Choice
The choice points are used to split transition paths. In the dynamic choice point, a decision corncerning which branch to take is only made after the transition from State1 is taken and the choice point is reached.
(O)
601
9 UML D IAGRAMS
Model elements Fork/Join Vertical
Notation
The starting time for a relative time event may only be omitted for a time event that is the trigger of a state machine.
(T)
Transition to Self
When an object returns to the same state after the specified event occurs.
(E)
602
9 UML D IAGRAMS
In this manner, an instance lifecycle can be created for a classifier, by specifying the order in which the operations can be activated and the states through which the instance progresses during its existence. The Protocol State Machine Diagram is created for use with the Protocol State Machine and the Protocol Transitions.
Notation
The states of the protocol state machines are exposed to the users of (SHIFT+S) their context classifiers. A protocol state represents an exposed stable situation of its context classifier: When an instance of the classifier is not processing any operation, the user of this instance can always know its configuration state.
Composite State A composite state either contains one region or is decomposed into two or more orthogonal regions. Each region has a set of mutually exclusive disjoint subvertices and a set of transitions.
(SHIFT+ C)
603
9 UML D IAGRAMS
Model elements Orthogonal State
Notation
(C)
Submachine State
A submachine state specifies the insertion of the specification of a submachine state machine. The submachine state is a decomposition mechanism that allows factoring of common behaviors and their reuse.
Initial
(A)
(R)
604
9 UML D IAGRAMS
Model elements Entry Point
Notation
The entry point connection points a reference as the target of a transition. This implies that the target of the transition is the entry point pseudostate as defined in the submachine of the submachine state.
Exit Point
(Y)
The exit point connection points a reference as the source of a transition. This implies that the source of the transition is the exit point pseudostate as defined in the submachine of the submachine state that has the exit point connection point defined.
Connection Point Reference
(U)
The connection point references of a submachine state that can be used as the sources/targets of the transitions. They represent entries into or exits out of the submachine state machine referenced by the submachine state.
(Z)
605
9 UML D IAGRAMS
Model elements Junction
Notation
The junction vertices are semantic-free vertices that are used to chain together multiple transitions. They are used to construct the compound transition paths between states.
(J)
Choice
The choice points are used to split transition paths. In the dynamic choice point, a decision on which branch to take is only made after the transition from State1 is taken and the choice point is reached.
(O)
Fork/Join Vertical
606
9 UML D IAGRAMS
Activity Diagram
Model elements Protocol Transition Button (hot key) Notation
A protocol transition (transition as specialized in the ProtocolStateMachines (T) package) specifies a legal transition for an operation. Transitions of the protocol state machines have the following information: a pre condition (guard), on trigger, and a post condition. Every protocol transition is associated to zero or one operation that belongs to the context classifier of the protocol state machine.
Protocol Transition to Self
When an object returns to the same state after the specified event occurs.
(E)
Activity Diagram
An activity graph is a variation of a state machine. In the state machine, the states represent the performance of actions or subactivities, while the transitions are triggered by the completion of the actions or subactivities. It represents a state machine of a procedure itself. The entire activity diagram is attached (through the model) to a class, such as a use case, or to a package, or to the implementation of an operation. The purpose of this diagram is to focus on flows driven by the internal processing (as opposed to external events). You should use the activity diagrams in situations where all or most of the events represent the completion of internally-generated actions (that is, procedural flow of control). You should use the ordinary state diagrams in situations where asynchronous events occur. An activity diagram is a variant of a state diagram. Organized according to actions, the activity diagrams are mainly targeted towards the representation of the internal behavior of a method (the implementation of an operation) or a use case.
607
9 UML D IAGRAMS
Activity Diagram Though activity diagrams are often classified alongside the interaction diagrams, they actually focus on the work performed by a system instead of an object interaction. An activity diagram captures actions and displays their results. A state diagram may also represent this sequencing of steps. However, given the procedural nature of the implementation of the operations in which most events simply correspond to the end of the preceding activity it is not necessary to distinguish states, activities, and events systematically (i.e. state changes and external events have less importance inside the method). It is therefore beneficial to have a simplified representation for directly displaying activities. The activity diagram provides a convenient way to describe complex algorithms, parallel operations, and business processes. Together with the collaboration and sequence diagrams, they are used to relate use cases.
608
9 UML D IAGRAMS
Activity Diagram
An action is a named element that is the fundamen(B) tal unit of an executable functionality. The execution of an action represents some transformations or processing in the modeled system. When the action is to be executed or what its actual inputs are is determined by the concrete action and the behaviors in which it is used.
Call Operation Action
An action that transmits an operation call request to the target object, where it may cause the invocation of the associated behavior. The argument values of the action are available to the execution of the invoked behavior.
Opaque Action
(O)
An opaque action is introduced for implementing specific actions or for use as a temporary placeholder before some other actions are chosen.
609
9 UML D IAGRAMS
Activity Diagram
Element Any Action Button (hot key) Notation
This element is introduced in order to maintain any other desirable action element with an appropriate metaclass stereotype applied.
Object Node
The Activity nodes are introduced to provide a general class for the nodes connected by activity edges. The ActivityNode replaces the use of the StateVertex and its children for activity modeling in UML.
Data Store
(SHIFT+B)
A data store node is a central buffer node for a non(SHIFT+D) transient information. A data store keeps all tokens that enter it, copies them when they are chosen to move downstream. Incoming tokens containing a particular object replace any tokens in the object node containing that object.
610
9 UML D IAGRAMS
Activity Diagram
Element Activity Parameter Node Button (hot key) Notation
It is an object node for inputs and outputs to the activities. The Activity parameters are object nodes at the beginning and end of the flows, to accept inputs to an activity and provide outputs from it.
An expansion node is an object node used to indicate a flow across the boundary of an expansion region. A flow into a region contains a collection that is broken into its individual elements inside the region, which is executed once per element.
Output Expansion Node
A flow out of a region combines individual elements into a collection for use outside the region.
611
9 UML D IAGRAMS
Activity Diagram
Element Object Flow Button (hot key) Notation
Is an activity edge that can have objects or data passing along it. An object flow models the flow of values to or from the object nodes.
(SHIFT+F)
Control Flow
Is an edge that starts an activity node after the previous one is finished. Objects and data cannot pass along the control flow edge.
Send Signal Action
(F)
Is an action that creates a signal instance from its inputs, and transmits it to the target object, where it may trigger the state machine transition or the execution of an activity.
Accept Event Action
(SHIFT+S)
Is an action that waits for the occurrence of an event that meets the specified conditions. The Accept event actions handle event occurrences detected by the object owning the behavior.
(E)
612
9 UML D IAGRAMS
Activity Diagram
Element Initial Node Button (hot key) Notation
An initial node is a starting point for executing an activity. It has no incoming edges.
(T)
Activity Final
An activity final node is a final node that stops all flows in an activity.
(D)
Flow Final
The Final node that terminates a flow and destroys all tokens that arrive at it. It has no impact on other flows in the activity.
(L)
Decision
Decision is a control node that chooses between outgoing flows. A decision (G) node has one incoming edge and multiple outgoing activity edges.
613
9 UML D IAGRAMS
Activity Diagram
Element Merge Button (hot key) Notation
A merge node is a control node that brings together multiple alternate flows. It is not used to synchronize concurrent flows but it is used to accept one among several alternate flows.
Fork/Join Horizontal
(G)
An exception handler is an element that specifies a body to execute in case (P) the specified exception occurs during the execution of the protected node.
614
9 UML D IAGRAMS
Activity Diagram
Element Button (hot key) Notation
Structured Activity Node A structured activity node is an executable activity node that may have an expansion into the subordinate nodes. The structured activity node represents a structured portion of the activity that is not shared with any other structured node, except for nesting.
Conditional Node
A conditional node is a structured activity node that represents an exclusive choice among alternatives.
Sequence Node
A sequence node is a structured activity node that executes its actions in order.
615
9 UML D IAGRAMS
Activity Diagram
Element Loop Node Button (hot key) Notation
A loop node is a structured activity node that represents a loop with the setup, test, and body sections.
Expansion Region
An expansion region is a structured activity region that executes multiple times corresponding to the elements of an input collection.
Time Event
A time event specifies a point of time by an expression. The expression might be absolute or might be relative to some other points of time.
616
9 UML D IAGRAMS
Activity Diagram
Element Input Pin Button (hot key) Notation
An input pin is a pin that holds input values to be consumed by an action. They are object nodes that receive values from other actions through object flows.
Output Pin
(SHIFT+I)
A pin that holds output values produced by an action. Output pins are object (SHIFT+O) nodes that deliver values to other actions through object flows.
Value Pin
A value pin is an input pin that provides a value to an action that does not come from an incoming object flow edge.
Swimlanes
Swimlanes are used to organize responsibility for actions and subactivities according to the class, dividing an activity diagram.
(SHIFT+V)
(SHIFT+W)
617
9 UML D IAGRAMS
Activity Diagram
From the Options main menu, select Environment. In the open dialog box, click the Diagram node and clear the Show centerlines in flow diagrams check box in the Display properties group.
618
9 UML D IAGRAMS
Activity Diagram
Diagram orientation
The diagram orientation is used to assign the correct rectilinear path breaks and draw paths betweenthe activity diagram shapes. The paths can be drawn from from side to side, or from the lower to the upper shape borders. Example: For a vertical diagram orientation - in this case if two shapes are not in the same centerline, the paths will be connected from the lower border of the first shape to the upper border of the next shape, adding break points:
For a horizontal diagram orientation - in this case the paths will be connected from the side border of the first shape to the next side border of the second shape, adding break points:
619
9 UML D IAGRAMS
Implementation Diagram For applying the Activity diagram layout tool, see Activity Diagram Layout Tool on page 246.
Implementation Diagram
The Implementation diagrams help developers describe the logical software structure inside a computer system or across a large distributed system. They show aspects of the physical implementation, including the structure of components and the run-time deployment system. They come in two forms:
1. Component diagrams that show the structure of the components, including the clas-
sifiers that specify them and the artifacts that implement them; and
2. Deployment diagrams that show the structure of the nodes on which the components are deployed.
These diagrams can also be applied in a broader way on the business modeling where the components represent the business procedures and artifacts, and the deployment nodes represent the organization units and resources (human and otherwise) of the business.
620
9 UML D IAGRAMS
Implementation Diagram
621
9 UML D IAGRAMS
Implementation Diagram
The Component may be used to define the requirements for each physical software element.
Component Instance
(K)
Ports represent interaction points between a classifier and its environment. A port has the ability to specify that any requests arriving at this port are handled.
Node
(SHIFT+R)
A Node is a physical object that represents a processing resource, generally having at least a memory and often the processing capability as well.
(O)
622
9 UML D IAGRAMS
Implementation Diagram
Element Execution Environment Button (hot key) Notation
The element that is used to indicate that a node is the execution environment.
Device
A physical computational resource with the processing capability upon which artifacts may be deployed for an execution.
Node Instance
The element that is used to indicate that a node is an instance of the execution environment.
623
9 UML D IAGRAMS
Implementation Diagram
Element Device Instance Button (hot key) Notation
Package
Artifact
An artifact represents a physical piece of information that is used or (B) produced by a software development process. Examples of Artifacts include models, source files, scripts, and binary executable files. An Artifact may constitute the implementation of a deployable component.
Deployment Specification
624
9 UML D IAGRAMS
Implementation Diagram
Element Artifact Instance Button (hot key) Notation
Interface
(F)
The classifier at the tail of the arrow implements the interface that is located at the arrow head or uses that interface. Note: Choose a different Interface Realization direction from the toolbar to draw a line with an opposite arrow end.
Realization
(R)
A realization signifies that the client set of elements are an implemen- (E) tation of the supplier set, which serves as the specification.
625
9 UML D IAGRAMS
Implementation Diagram
Element Usage Button (hot key) Notation
A usage is a relationship in which one element requires another element (or set of elements) for its full implementation or operation. Usage is also used to create required interface. Note: Choose a different Usage direction from the toolbar to draw a line with an opposite arrow end.
Instance
(U)
An instance specifies the existence of an entity in a modeled system and completely or partially describes the entity. It has a unique name, state, and classifier as the type of the identifier.
(SHIFT+O)
626
9 UML D IAGRAMS
Implementation Diagram
Element Button (hot key) Notation
Assembly Connector
An assembly connector is a connector between two components that defines that one component provides the services that another component requires.
Delegation Connector
A delegation connector is a connector that links the external contract of a component (as specified by its ports) to the internal realization of that behavior by the components parts.
627
9 UML D IAGRAMS
Implementation Diagram
Element Button (hot key) Notation
Deployment
Manifestation
A manifestation is the concrete physical rendering of one or more model elements by an artifact.
628
9 UML D IAGRAMS
Composite Structure Diagram
Element Button (hot key) Notation
(G)
Generalization Link
(L)
Communication Path
A communication path is an association between two DeploymentTargets, through which they are able to exchange signals and messages.
629
9 UML D IAGRAMS
Composite Structure Diagram
Is extended with the capability to own collaboration uses. These collaboration uses link a collaboration with the classifier to give a description of the works of the classifier.
Part
(SHIFT+G)
(P)
Port
A port may appear either on a contained part representing a port on that part, or on the boundary of the class diagram, representing a port on the represented classifier itself.
Collaboration
(SHIFT+R)
A collaboration describes a structure of collaborating elements (roles), each performing a specialized function, which collectively accomplishes some desired functionalities. Its primary purpose is to explain how a system works and, therefore, it typically only incorporates those aspects of reality that are deemed relevant to the explanation.
(Q)
630
9 UML D IAGRAMS
Composite Structure Diagram
Element Collaboration Use Button (hot key) Notation
A collaboration use represents one particular use of a collaboration to explain the relationships between the properties of a classifier. The collaboration use shows how the pattern described by a collaboration is applied in a given context, by binding specific entities from that context to the roles of the collaboration.
Connector
(U)
Each connector may be attached to two or more connectable elements, each representing a set of instances. Each connector end is distinct in the sense that it plays a distinct role in the communication realized over the connector.
Role Binding
(C)
631
9 UML D IAGRAMS
Composite Structure Diagram
Observer collaboration.
2. To the Observer collaboration add Subject property (CallQueue type) and Observer property (SlidingBarIcon type) (see Figure 278 on page 632). 3. Create a composite structure diagram inside the collaboration. The Select Parts dialog will open (see Figure 279 on page 633). 4. Select properties (parts) to display them in a diagram. Click OK. 5. Parts are displayed in a diagram (Figure 280 on page 633).
632
9 UML D IAGRAMS
Composite Structure Diagram
633
9 UML D IAGRAMS
Interaction Overview Diagram
634
9 UML D IAGRAMS
Interaction Overview Diagram
635
9 UML D IAGRAMS
Interaction Overview Diagram
Element Button (hot key) Notation
Other elements of the Interaction Overview diagram are the same as in the Activity diagram. For more information about the Activity diagram, see Activity Diagram elements on page 609.
636
10
EXTENSION DIAGRAMS
General Information
MagicDraw supports an extension to UML diagrams:
"Content Diagram" (Standard, Professional, Architect, and Enterprise editions only) "Robustness Diagram" (Standard, Professional, Architect, and Enterprise editions
only)
"Business Process Diagram" (Standard, Professional, Architect and Enterprise
editions only) Working with Diagrams For a general information about working with diagrams, see Chapters Diagrams Basics and UML Diagrams. In the Environment Options dialog box, Plugins pane, you may select what extension diagrams you want to enable or disable.
637
10
Patterns
EXTENSION DIAGRAMS
General Information
Various types of classes can be created in every class diagram using a Pattern Wizard. It contains GOF, Java, Junit, CORBA IDL, XML Schema, and WSDL design patterns. New patterns and modifications of the existing ones can also be created using Java code or JPython scripts. For a detailed description, see MagicDraw Open Api users guide. For a detailed description of the Pattern Wizard, see Controlling Merge memory usage on page 394. To open the Pattern Wizard
In the class diagram, click the Class by Pattern button. From the class shortcut menu, select Tools and then select the Apply Pattern
subcommand.
Select a class and select Apply Pattern from the Tools main menu.
638
10
Selection
EXTENSION DIAGRAMS
General Information
Common Elements
Toolbar Button Button (Hot key)
(Escape)
Sticky Button
(Z)
Text Box
(X)
Text Box (HTML Text)
(SHIFT+X)
Note
(N)
Note (HTML Text)
(SHIFT+N)
Comment
639
10
EXTENSION DIAGRAMS
General Information
Anchor
(H)
Constraint
(SHIFT+H)
Containment
(SHIFT+C)
Dependency
(SHIFT+D)
Separator
(W)
Rectangular Shape
(SHIFT+Q)
640
10
NOTE
EXTENSION DIAGRAMS
Content Diagram
Content Diagram
This functionality is available in Standard, Professional, Architect, and Enterprise editions only.
The Content Diagram is an extension of UML notation. The purpose of the content diagram is to generate or represent a project structure (diagrams) and relations between them. The content table works as a table of contents for a project. All created diagrams have their own Specifications, in which you can specify their name, documentation, and view the relationships in which they participate. You can also add stereotypes, tagged values and constraints.
641
10
EXTENSION DIAGRAMS
Content Diagram
(C)
Package
(P)
Class Diagram
642
10
EXTENSION DIAGRAMS
Content Diagram
Notation
Sequence Diagram
State Diagram
Activity Diagram
Implementation Diagram
643
10
EXTENSION DIAGRAMS
Content Diagram
Notation
Web Diagram
644
10
EXTENSION DIAGRAMS
Content Diagram
Notation
WSDL Diagram
Robustness Diagram
645
10
Content Diagram
EXTENSION DIAGRAMS
Robustness Diagram
Toolbar Button
Notation
Robustness Diagram
NOTE This functionality is available in Standard, Professional, Architect, and Enterprise
editions only. The Robustness Analysis involves analyzing the narrative text of use cases, identifying a first-guess set of objects that will participate in those use cases, and classifying these objects based on the roles they play.
Boundary or Interface objects are what actors use in communicating with the system. Entity objects are usually objects from the domain model. Control objects (are usually called controllers because they often are not real
objects), serve as the glue between boundary objects and entity objects. The Robustness analysis serves as a preliminary design within the project life cycle and provides the missing link between an analysis and a detailed design. Four basic rules apply:
1. Actors can only talk to the boundary objects. 2. The boundary objects can only talk to the controllers and actors. 3. The entity objects can only talk to the controllers. 4. The controllers can talk to the boundary objects and entity objects, and to other con-
trollers, but not to the actors. Both the boundary objects and entity objects are nouns, and the controllers are verbs. Nouns cannot talk to other nouns, but verbs can talk to either nouns or verbs.
646
10
Actor
EXTENSION DIAGRAMS
Robustness Diagram
An actor represents a role played by an external person, a process or a thing interacting with a system. One physical object may play several roles.
Boundary
(A)
Actors use the boundary objects to communicate with the system (sometimes called the interface objects.). A class with a stereotype boundary
Control
(B)
Serves as the glue between the boundary objects and the entity objects. A class with a stereotype control
Entity
(C)
The entity objects usually are objects from the domain model. A class with a stereotype entity (E)
Robustness Association
The Association with a default Association End A navigability = false and Association End B navigability = true values.
(S)
647
10
NOTE
EXTENSION DIAGRAMS
Web Diagram
Web Diagram
This functionality is available in Standard, Professional, Architect, and Enterprise editions only.
The web system consists of server applications, network, communicating protocol, and the browser. Basically, a users requests begin from starting the browser and requesting a document through a network from the server (host computer). The web server running on the host computer, catches the users request, locates the document and delivers it to the user. UML is a standard language for modeling software. However, modeling specific web components cannot be done by using just a standard UML. The Web-UML diagram provides an extension to the UML model, which enables developers to model web applications. The MagicDraw Web-UML diagram includes Web-UML elements (stereotyped UML elements) for modeling: client, server pages, web form, frame classes, java script class representation and target class, and web page component. Reference: Building Web Applications with UML by Jim Conallen Copyright 2000 by Addison Wesley Longman, Inc.
648
10
EXTENSION DIAGRAMS
Web Diagram
(SHIFT+G)
Server Page
(SHIFT+S)
Form
(SHIFT+F)
Frame
(SHIFT+E)
649
10
Target
EXTENSION DIAGRAMS
Web Diagram
Some examples
(SHIFT+T)
Java Script
(SHIFT+J)
Page
(SHIFT+P)
Builds
(B)
Link
(L)
650
10
Redirect
EXTENSION DIAGRAMS
Web Diagram
Some examples
(T)
Targeted Link
(SHIFT+L)
Frame Content
(SHIFT+O)
Submit
(U)
Object
(O)
RMI
(SHIFT+R)
651
10
IIOP
EXTENSION DIAGRAMS
CORBA IDL Diagram
Some examples
(SHIFT+I)
The CORBA IDL diagram facilitates the creation of CORBA IDL elements. The following patterns are also available for CORBA IDL: Interface, Value Type, Type Definition, Sequence, Array, Fixed, Union, Enumeration, Struct, and Exception. For more information about CORBA IDL usage in MagicDraw, see the MagicDraw Code & Database Engineering User Guide, Chapter CORBA IDL Mapping to UML. Reference: UMLTM Profile for CORBATM Specification, Version 1.0, April 2002. http://www.omg.org/ technology/documents/formal/profile_corba.htm
652
10
EXTENSION DIAGRAMS
CORBA IDL Diagram
(M)
CORBA IDL Interface
(U)
CORBA IDL Value
(V)
Generalization
(G)
Truncatable Generalization
653
10
Interface
EXTENSION DIAGRAMS
Generic DDL Diagram
(I)
The DDL diagram is used to draw database definition elements. It simplifies the creation of primary key, foreign key, triggers, etc. For a detailed description about DDL usage in MagicDraw, see MagicDraw Code & Database Engineering Users Guide, Chapter DDL Script Engineering.
654
10
EXTENSION DIAGRAMS
Oracle DDL Diagram
(T)
View
(V)
Relationship
(R)
Foreign Key
(F)
Database
(D)
Schema
(S)
655
10
EXTENSION DIAGRAMS
Oracle DDL Diagram
The DDL diagram is used to draw database definition elements. It simplifies the creation of primary key, foreign key, triggers and etc. For a detailed description about DDL usage in MagicDraw, see MagicDraw Code & Database Engineering Users Guide, Chapter DDL Script Engineering.
656
10
EXTENSION DIAGRAMS
Oracle DDL Diagram
(T)
View
(V)
Materialized View
(M)
Package
(P)
Type
Relationship
(R)
Foreign Key
(F)
657
10
Scope
EXTENSION DIAGRAMS
WSDL Diagram
Database
(D)
Schema
(S)
WSDL Diagram
NOTE This functionality is available in Architect and Enterprise editions only.
The WSDL diagram is used to draw WSDL elements. It allows the creation of all elements used in the wsdl file, except schema. The schema elements can be created using the XMLSchema diagram. WSDL plugin provides patterns to create binding elements. The WSDL plugin requires XMLSchema plugin.
658
10
EXTENSION DIAGRAMS
WSDL Diagram
(M)
WSDLporttype
(T)
WSDLbinding
(B)
WSDLport
(SHIFT+P)
WSDLservice
(S)
WSDLdefinitions
(D)
WSDLtypes
(Y)
659
10
EXTENSION DIAGRAMS
XML Schema Diagram
(I)
Xmlns
(SHIFT+L)
XSDnamespace
(P)
The purpose of the diagram is to create the structure of the xml schema file. It helps to draw the xml schema elements quickly. These elements are the stereotyped UML elements from the class and implementation diagrams. The following patterns are also available for the XML Schema: XSDcomplexType, XSDcomposition, XSDsimpleType, XSDsimpleType(XSDlist), XSDsimpleType(XSDunion), and Simple XSDrestriction. For a detailed description about XML Schema usage in MagicDraw, see MagicDraw Code & Database Engineering Users Guide, Chapter XML Schema. Reference: http://www.w3.org/TR/xmlschema-2/
660
10
EXTENSION DIAGRAMS
XML Schema Diagram
(C)
XSDsimpleType
(S)
XSDsimpleType(XSDlist)
(SHIFT+S)
XSDsimpleType(XSDunion)
(U)
XSDall
(L)
XSDchoice
(O)
XSDsequence
(Q)
661
10
EXTENSION DIAGRAMS
XML Schema Diagram
(G)
XSDattributeGroup
(T)
XSDschema
(SHIFT+M)
XSDnamespace
(P)
Aggregation
(A)
Composition
(F)
Template Binding
(B)
662
10
EXTENSION DIAGRAMS
XML Schema Diagram
(R)
XSDextension
(E)
XSDimport
(M)
XSDinclude
(D)
XSDredefine
(SHIFT+F)
xmlns
(SHIFT+L)
663
10
NOTE
EXTENSION DIAGRAMS
Time Diagram
Time Diagram
This functionality is available in Standard, Professional, Architect, and Enterprise editions only.
A Time Diagram is an extension of UML notation. The time diagram is similar to a sequence diagram, but the model elements of the time diagram have the predefined stereotypes.
664
10
EXTENSION DIAGRAMS
Struts Diagram
Lifeline <<SAshedRes>>
Message <<CRimmediate>>
Message <<SAtrigger>>
Struts Diagram
NOTE This functionality is available in Professiona, Architect. and Enterprise editions only.
665
10
EXTENSION DIAGRAMS
Struts Diagram
(C)
Class by Pattern
(SHIFT+P)
Interface
(I)
ActionForm class for struts
(G)
Action class for struts
Package
(P)
666
10
Model
EXTENSION DIAGRAMS
Struts Diagram
(M)
Interface Realization
(R)
Realization
(E)
Abstraction
(T)
Usage
(U)
Generalization
(G)
Association
(S)
667
10
EXTENSION DIAGRAMS
Networking Diagram
(A)
Composition
(F)
Networking Diagram
NOTE This functionality is available in Standard, Professional, Architect, and Enterprise editions only.
This diagram allows a visual display of the network topology. The Networking Profile contains stereotypes for the network description. Elements with icons can be drawn on the Diagram pane. The Networking Diagram is commonly used to depict hardware nodes as well as the connections between them.
668
10
EXTENSION DIAGRAMS
Networking Diagram
Application Server
DB Server
File Server
Proxy Server
Web Server
PC
Laptop
Monitor
Fax
669
10
Plotter
EXTENSION DIAGRAMS
Networking Diagram
Printer
Scanner
Modem
Router
Switch
Firewall
Database
Program
Internet Browser
Document
670
10
File
EXTENSION DIAGRAMS
Networking Diagram
Wireless Network
Internet
Building
City
Actor
User
HTTP
Ethernet
RMI
Communication Path
671
10
NOTE
EXTENSION DIAGRAMS
Business Process Diagram
BPMN (Business Process Modeling Notation) is the most recognized standard used by business users for an end-to-end business process modeling. MagicDraw with its business-oriented notation support has become one useful tool for both business and IT users. Working with business and IT models in one tool helps save time and solve model interchange problems. The Business Process Diagrams convey the business processes of different participants in a modeled system. In a MagicDraw model, Process contains the Business Process Diagram, depicting it as a graph of the Flow Objects. The BP diagrams can be used for three basic BPMN sub-models creation:
Private (internal) business processes Abstract (public) processes Collaboration (global) processes
Within and between these three BPMN sub-models, many types of Diagrams can be created (Highlevel private process activities, detailed private business processes, Collaboration Processes, etc.). Since a BPMN Diagram may depict the Processes of different Participants, each Participant may view the diagram differently.
672
10
EXTENSION DIAGRAMS
Business Process Diagram
673
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
674
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
The Intermediate Events occur between a Start Event and an End Event. It will affect the flow of the process, but will not start or (directly) terminate the process.
675
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
676
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
Task
The Task is used when the work in the Process is not broken down to a finer level of Process Model detail.
Loop Task
677
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
Compensation Task
Collapsed Sub-Process
A Sub-Process is a compound activity that is included within a Process. It can be broken down into a finer level of detail (a Process) through a set of subactivities.
Collapsed Transaction
678
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
Expanded Sub-Process
679
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
680
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
A Gateway is used to control the divergence and convergence of multiple Sequence Flows.
Data-Based XOR
Event-Based XOR
OR
Complex
AND
681
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
A Sequence Flow is used to show the order of how activities will be performed in a Process.
Compensation Association
The Compensation Association occurs outside the Normal Flow of the Process and is based on an event (a Cancel Intermediate Event) that is triggered through the failure of a Transaction or a Compensate Event. A Message Flow is used to show the flow of messages between two entities that are prepared to send and receive them.
Message Flow
682
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
Data Object
The Data Objects provide information about what activities are required to be performed and/or what they produce.
Association
Directional Association
683
10
EXTENSION DIAGRAMS
Business Process Diagram
Button
Element Description
Text Annotation
The Business Process diagram posseses smart layout features. For more information about these features, see Smart Activity Diagram layout on page 618.
684
11
MODEL ELEMENTS
(SHIFT+X)
685
11
Note
MODEL ELEMENTS
Common Model Elements in the Diagrams
Model elements
Button
Function A graphical symbol containing a textual information. Use a note to add any information needed for your diagram. Usually the note is connected to another symbol using an anchor line.
Notation
(N)
(SHIFT+N)
Comment
A graphical symbol, which gives an ability to display different remarks on the diagrams.
Anchor
(H)
Relates symbols and notes. Use an anchor to relate any symbol to a note or comment. The style of the anchor can be changed to rectilinear, oblique, or bezier. For a detailed description on editing the appearance of paths, see Drawing Relationship Paths on page 215.
686
11
Constraint NOTE
Model elements
Button (SHIFT+H)
Notation
Shows a class, package or other model elements declared within another model element.
Dependency
Image Shape
(I)
Provides a simple and quick way to insert pictures into a diagram. They can be logo, graph, table, etc. Separates different parts of a diagram with a horizontal line. Separates different parts of a diagram with a rectangular shape.
687
11
MODEL ELEMENTS
Common Model Elements in the Diagrams
Note, Comment
A note is a graphical symbol containing a textual information. It is used to add any information needed for your diagram. A note is usually connected to another element symbol using an anchor line. A comment is a graphical symbol used to display different remarks on the diagrams. To change the text display mode
1. Connect a note to an element symbol with an anchorlink. 2. From the note shortcut menu, select Text Display Mode and then Show Text, to dis-
play the text that is added to the note. Select Show Documentation, to display a documentation of the element on the note. To show the constraints and/or tagged values on the note
1. Connect a note to an element, the constraint and/or tagged value of which is speci-
fied, by an anchor link. 2. From the note shortcut menu, select Show Constraint and/or Show Tagged Value. Separate compartments with the constraint and tagged values will be displayed on the note. To remove a line between the compartments on the note
1. From the note shortcut menu, select Symbol(s) Properties. 2. Clear the Show Line Between Compartments check box in the open dialog.
Anchor
Use anchors to relate symbol to a note or comment. You can change the anchor style to rectilinear, oblique, or bezier. For a detailed description on editing the appearance of paths, see Drawing Relationship Paths on page 215.
688
11
Constraint path
The constraint for two graphical symbols (such as two classes or two associations) is shown as a dashed arrow from one element to the other. The constraint is labeled by the constraint string (in braces {}). The direction of the arrow represents a relevant information within the constraint. The client (the tail of the arrow) is mapped to the first position and the supplier (arrowhead) is mapped to the second position in the constraint. To add a constraint expression to the constraint path From the constraint path shortcut menu, choose Select Constraint and select one of the following:
Select <new>. The Select Extension Element Storage dialog box opens. Select the folder where the constraint will be stored and click OK. The Constraint Specification dialog box opens. Fill in the dialog box fields. Select an already created constraint from the list.
Image Shape
The Image Shape provides a simple and quick way to insert a picture into a diagram. This can be logo, graph, table, etc. The preferred shape size after the insertion is the actual image size. To insert a picture on the Diagram pane
1. Click the Image Shape button on the Common toolbar. The Open dialog box opens. 2. Select an image in *.gif, *.jpg, *.jpeg, *.svg, or *.png format and click Open.
Separator
You may use a horizontal separator to rule off different parts of a diagram. To set the text position of a separator name
From the separator shortcut menu, select Text Position, and then select the text position you need: Left (default), Center, or Right. Set the text position in the Project Options dialog box.
689
11
MODEL ELEMENTS
UML Extension Elements
Documentation
Define a documentation for various documents in the Comment Specification dialog box. You can also define a comment stereotypes, tagged values, and constraints. To open the Comment Specification dialog box
1. In the element Specification dialog box, click Documentation/Hyperlinks. 2. Expand the Documentation/Hyperlinks branch in the Specification tree and double
tation. TIP! If a comment contains stereotypes, tagged values, and/or constraints, you can choose to display them in the content of the note.
690
11
UML provides a set of extension mechanisms (stereotypes, tag definitions, and constraints) for specializing its elements, allowing customized extensions of UML for particular application domains. These customizations are sets of UML extensions grouped into UML profiles. There are several reasons why you may want to extend a metamodel:
Assign a terminology that is adapted to a particular platform or domain (such as
capturing EJB terminology like home interfaces, enterprise java beans, and archives).
Assign a syntax for constructs that do not have a notation (such as in the case of
actions).
Assign a different notation for the existing symbols (such as being able to use a
picture of a computer instead of the ordinary node symbol to represent a computer in a network).
Add semantics that is left unspecified in the metamodel (such as how to deal with
or continuous time).
Add constraints that restrict the way you may use the metamodel and its constructs
(such as disallowing actions from being able to execute in parallel within a single transition).
Add information that can be used when transforming a model to another model or
code (such as defining mapping rules between a model and Java code). MagicDraw goes beyond the traditional profiling. It allows developers to create a new modeling tool based on their UML profile. In the following sections, you will find information about how to work with profiles, stereotypes, and tags. For a detailed description of UML Profiling and DSL in MagicDraw, see the UML Profing and DSL Users Guide.
Stereotype
A stereotype defines how an existing metaclass may be extended. It enables the use of platform or domain specific terminology or notation in place of, or in addition to, the ones used for the extended metaclass.
691
11
MODEL ELEMENTS
UML Extension Elements
Just like a class, a stereotype may have properties, which may be referred to as tag definitions. When a stereotype is applied to a model element, the values of the properties may be referred to as tagged values. Any model element from the reference metamodel (any UML model element) can be extended by a stereotype. For example in UML, States, Transitions, Activities, Use cases, Components, Attributes, Dependencies, etc. can all be extended with the stereotypes. The stereotypes are created as separate model elements and can be drawn in the Class diagrams. According to UML, the stereotypes have to be stored in the Profiles (a subtype of Package), so the Class diagram for the stereotypes should be created in the Profile instead of the Package. For more information about working with symbols, see Chapter Working With Diagrams on page 197. To create a new stereotype
To create a new stereotype it is recommended to first create a profile (see the Section above).
Use the Stereotype button on the class diagram toolbar, Profiling Mechanism
group. The Select Metaclass dialog box opens. Specify the metaclass that you want to extend and click OK. Double-click to open the Stereotype Specification dialog box. For a detailed description of this dialog box, see Section Stereotype Specification dialog box on page 695.
From the Profile or Package shortcut menu in the Browser, select New, and then
NOTE
For more information about displaying stereotype icon on shape, see Displaying icon or image on the symbol or instead the symbol on page 285.
692
11
2. Select the Open Specification dialog box. The Image specification dialog box opens. You can see the format and location of the image, and specify the other image properties.
To order stereotypes Stereotypes can be ordered. Symbol style of the first in the list stereotype will by applied to the symbol on diagram and in Browser. To order stereotypes:
1. Invoke symbol shortcut menu, select the Stereotype command. The list of stereo-
types opens (see Figure 282 on page 694). 2. Click the Order button. The Order Stereotypes dialog box opens (see Figure 283 on page 695). 3. Click Up or Down buttons to order stereotypes.
693
11
MODEL ELEMENTS
UML Extension Elements
Figure 282 -- The Order button in the Stereotypes list, in the Class symbol shortcut menu
694
11
Saving of stereotype information in XMI Ability to choose options where to save applied stereotype information in XMI file. Information can be saved at the end of the file or inside the element information. By default stereotype information is stored at the end of XMI file. To store information inside element, open Environment Options dialog (choose Options - Environment command from main menu), and in General - Save/Load section select property Save stereotype information within element.
695
11
MODEL ELEMENTS
UML Extension Elements
shortcut menu.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Function
An image file icon. Refer to the UML Profiling and DSL manual for the description of the advanced icons for relationships.
696
11
Type
In general case, where the tag type is a data type, this specifies the range of values of the tagged values associated with the tag definition. In a special case, where the tag type refers to a metaclass that is not a data type, the tag value references model elements that are instances of the metaclass. The classifier element of a stereotype attribute. The default value for tag definition. Creates a new tag definition. Deletes an existing tag definition.
Classifier Default value Create Delete Clone Up/Down Stereotyped Elements Name
Add Remove
Applies a stereotype to the selected model element. Unapplies a stereotype from the selected model element.
Assigning a stereotype
You may assign a stereotype to an element in the following ways:
Open the corresponding element Specification dialog box. Click the "..." button in
the general pane, next to the Applied Stereotype property. Select one or more available stereotypes from the open list and click Apply. Or you may create a new stereotype by clicking New.
You may apply a stereotype to a model element easily from the model element
697
11
MODEL ELEMENTS
UML Extension Elements
2. From the model elements shortcut menu, select the Stereotype command. The stereotype menu opens. 3. The list of all stereotypes is seen. You can type the name of the stereotype for which you are searching in the text box, above the list. Or, you can create a new stereotype by clicking the New button. 4. When you find the stereotype that you want, or create a new one, select the check boxes of those stereotypes to add to the model element. 5. Click the Apply button. On the diagram pane in the element name area, type two open angle brackets <<,
type the stereotype name and type two close angle brackets. Then you may type the element name itself. For example: if you want to name element Books and assign <<table>> stereotype, in the element name area type the following: <<table>>Books. The name completion for the stereotypes works in the name editing mode, press the Ctrl+Space or Ctrl+Backspace to get a list of possible to apply stereotypes.
Show Stereotypes combo box. Select one of the six property modes for Show Stereotypes. The property modes are described in the table below.
Show Stereotypes Property Mode Shape Icon of the stereotype on the shape Name of the stereotype Image of the stereotype instead of the element shape
displayed
displayed
698
11
Shape
Text
not displayed
displayed
Icon
displayed
not displayed
displayed
displayed*
Shape Image
not displayed
displayed*
Do Not Display
not displayed
not displayed
* - To display the image of a stereotype instead of the element shape all element compartments should be suppressed. NOTE
Shape Image and Text and Shape Image properties are not added to the Relationships, Roles and Diagram Frame element properties list.
Parent topic: Stereotype on page 691. Related topics: Assigning a stereotype on page 697.
699
11
Tags
MODEL ELEMENTS
UML Extension Elements
Just like a class, a stereotype may have properties, which may be referred to as tag definitions. When a stereotype is applied to a model element, the values of the properties may be referred to as tagged values. The tag definitions are used to define new meta attributes of the extended metaclass, they are used as regular class attributes. For more infomration about working with class attributes, see Section Drag and drop the selected Opaque Behavior element from the Browser tree on the Diagram pane. on page 834. An actual instance of the tag definition is a tagged value (tag). A tag holds extra information like:
additional information that does not come with UML, for example Precondition for
Use Cases.
management data about the state and progress of the project such as author, status,
and tested.
language specific data for code generation tools.
A tagged value consists of two parts: name and value (example: Author = Joe). To create a new tag definition
1. Create a new stereotype. Open the Stereotype Specification dialog box. 2. Click the Tag Definitions tab and use the Create button to add a new tag definition for stereotype. Select the type of this property. It may be a standard UML data type or another user defined Stereotype. Regular classes should not be used as types of tag definition. 3. Click Close in the Stereotype Specification dialog box to save changes.
Refer to Section Stereotype Specification dialog box on page 695 for more information about Stereotype Specification dialog box fields not covered in this section.
700
11
701
11
Button
MODEL ELEMENTS
UML Extension Elements
Description
Up
Down
Edit
Add
Remove
select the tag definition. 2. Specify a default value in the Default Value field. 3. Create an element and assign it a stereotype. The element will have tags with assigned default values. To set a default tag value to tag with empty value MagicDraw version 15.0 and later allows setting default tag values to tag with empty value. This functionality is needed when a stereotype is already assigned to an element and a new mandatory tag definition with a default value is created for the stereotype. After creating such a tag definition, the model elements that have the modified stereotype applied will have the newly created tags unset.
702
11
The following conditions are required to set the default tag values:
1. The element should have an assigned stereotype with a specified default value prop-
erty.
2. The tag definition, to which you want to assign a default value, should contain no
value.
NOTE
The default tag values are not set when the stereotype property (tag definition) multiplicity is equal to 0.
Parent Topic: UML Extension Elements on page 690. Related topics Stereotype on page 691. Attribute on page 736.
Constraint
A Constraint represents additional semantic information attached to the constrained elements. It is an assertion that indicates a restriction that must be satisfied by a correct design of the system. The constrained elements are those elements required to evaluate the constraint specification. In addition, the context of the Constraint may be accessed, and may be used as the namespace for interpreting names used in the specification.
703
11
MODEL ELEMENTS
UML Extension Elements
A Constraint is represented as a linguistic, enclosed in braces ({}), statement in some formal (OCL, C++, and other), or a natural language. There are 14 standard constraints in UML such as association, global, and parameter. You may also define your own constraints.
704
11
NOTE
If a constraint is displayed in the Constraints tab of the Element Specification dialog box, it means this constraint is valid and applied for the element. If it is displayed in the Inner Elements list, this constraint is only owned by the element.
705
11
MODEL ELEMENTS
UML Extension Elements
Tab name
Box
Function
706
11
Enter the name of the constraint. The name of the model element to which the current constraint is assigned. Enter an expression of the constraint. Click ... button and in the Edit Specification window, choose OCL. The specification will be checked according to Object Constraint Language (OCL) Additional information can be added.
ToDo
Documentation/ Hyperlinks
Documentation
Choose a hyperlink for the tagged value. It can be a file, model element, or web site. Creates, edits, and removes tagged definitions. Creates, applies, and removes a constraint for a tag.
OCL
Object Constraint Language (OCL) is a formal language used to express constraints. These typically specify the invariant conditions that must hold for the system being modeled. Expressions can be used in a number of places in a UML model:
To specify the initial value of an attribute or association end. To specify the derivation rule for an attribute or association end. To specify the body of an operation. To indicate an instance in a dynamic diagram. To indicate a condition in a dynamic diagram. To indicate the actual parameter values in a dynamic diagram.
707
11
MODEL ELEMENTS
UML Extension Elements
Invariants on attributes The simplest constraint is an invariant on an attribute. Suppose a model contains a class Customer with an attribute age, then the following constraint restricts the value of the attribute:
context Customer inv: age >= 18
Invariants on associations One may also put constraints on the associated objects. Suppose a model contains the class Customer that has an association to the class Salesperson with the role name salesrep and multiplicity 1, then the following constraint restricts the value of the attribute knowledgelevel of the associated instance of Salesperson:
context Customer inv: salesrep.knowledgelevel >= 5
Collections of objects In most cases the multiplicity of an association is not 1, but more than 1. Evaluating a constraint in these cases will result in a collection of instances of the associated class. Constraints can be put on either the collection itself, e.g. limiting the size, or on the elements of the collection. Suppose in a model the association between Salesperson and Customer has the role name clients and multiplicity 1..* on the side of the Customer class, then we might restrict this relationship by the following constraints:
context Salesperson inv: clients->size() <= 100 and clients->forAll(c: Customer | c.age >= 40)
708
11
Pre- and postconditions In the pre- and postconditions the parameters of the operation may be used. Furthermore, there is a special keyword result which denotes the return value of the operation. It can be used in the postcondition only. For example an operation sell was added to the Salesperson class.
context Salesperson::sell( item: Thing ): Real pre: self.sellableItems->includes( item ) post: not self.sellableItems->includes( item ) and result = item.price
Derivation Rules Models often define derived attributes and associations. A derived element does not stand alone. The value of a derived element must always be determined from other (base) values in the model. Omitting the way to derive the element value results in an incomplete model. Using OCL, the derivation can be expressed in a derivation rule. In the following example, the value of a derived element usedServices is defined to be all services that have generated transactions on the account:
context LoyaltyAccount::usedServices : Set(Services) derive: transactions.service->asSet()
Initial Values In the model information, the initial value of an attribute or association role can be specified by an OCL expression. In the following examples, the initial value for the attribute points is 0, and for the association end transactions, it is an empty set:
context LoyaltyAccount::points : Integer init: 0 context LoyaltyAccount::transactions : Set(Transaction) init: Set{}
Body of Query Operations The class diagram can introduce a number of query operations. The query operations are operations that have no side effects, i.e. do not change the state of any instance in the system. The execution of a query operation results in a value or set of values without any alterations in the state of the system. The query operations can be introduced in the class diagram, but can only be fully defined by specifying the result of the operation. Using OCL, the result can be given in a single expression, called a body expression. In fact, OCL is a full query language, comparable to SQL. The use of body expressions is an illustration thereof. The next example states that the operation getCustomerName will always result in the name of the card owner associated with the loyalty account:
709
11
MODEL ELEMENTS
UML Extension Elements
Profiles
A Profile is a kind of Package that extends a reference metamodel. The primary extension construct is the Stereotype, which are defined as part of the Profiles. A profile introduces several constraints, or restrictions, on ordinary metamodeling through the use of the metaclasses defined in the package. It is a restricted form of a metamodel that must always be related to a reference metamodel, such as UML, as described below. It cannot be used without its ref-
710
11
erence metamodel, and it defines a limited capability to extend metaclasses of the reference metamodel. The extensions are defined as stereotypes that apply to the existing metaclasses. The profile is defined as a package it has package properties in the Profile Specification dialog box. For a detailed description of packages, see Package on page 842.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Profiles
The Profiles are defined using the UML extensibility mechanisms. These allow modelers to customize UML for specific domains such as software development processes. In MagicDraw, the mechanism of the profile is similar to the functionality of the modules, except that the profile is a package containing the stereotype <<profile>>, and its content is visible in both the Profiles dialog box and the UML extensions tabs of the Specification dialog boxes.
711
11
MODEL ELEMENTS
UML Extension Elements
Creating Profiles
Usually a profile contains specific stereotypes, constraints, and tagged values that you can use according to your needs. The Profiles often contain other specific model elements, which MagicDraw allows you to include in your profile. You can use your existing profile in other parts of the projects. Additionally, other users may reuse your profile as a module. To create your own profile
1. Create a profile element (in the Browser or using the Class Diagram toolbar, Profiling Mechanism group) 2. Add the stereotypes, constraints, and/or other model elements you need for extending UML.
The selected profile opens in the Browser tree as a read-only profile. You may use it in your project. You can also import and edit it, if necessary.
712
11
you want to import and click Open. The imported profile will open as an editable package in the Browser.
Exporting Profiles
If you want to use the existing profile in another project, or enable other users to use it, you need to save it in your selected directory. Exporting profiles is similar to exporting module functionality.
1. From the File menu, select Export, and then Module.
The Export Module dialog box opens. Select the profile package you want to export and add it to the Selected list. Write the description of the profile in the text box, click OK, and save it to the desired directory.
Action
An action is a named element that is the fundamental unit of an executable functionality. The execution of an action represents some transformations or processing in the modeled system, be it a computer system or otherwise. An action execution represents the run-time behavior of executing an action within a specific behavior execution. As action is an abstract class, all action executions will be the executions of a specific kind of action. When the action will be executed and what its actual inputs will be are determined by the concrete action and the behaviors in which it is used. The following are types of actions:
Call Behavior Action on page 716. Call Operation Action on page 717. Opaque Action on page 719. Send Signal Action on page 719 Any other Action.
713
11
MODEL ELEMENTS
Action
See also: Working with actions on page 720. Usage in diagrams: Activity Diagram on page 607. Parent topic: Model Elements on page 685. Related topics Specification dialog boxes on page 265. Formatting Symbols on page 283.
The Order cancel request accept event action is connected to Cancel order with the exception handler relationship.
714
11
shortcut menu. 2. Click + in the Trigger field. The Trigger specification dialog box opens. Specify the trigger, which will be assigned for the accept event action. To draw the time event To draw the accept event action with the time event shape, in the activity diagram toolbar, select the Time Event button and then click on the diagram pane. To change the position of the accept event action name
1. Select the accept event action on the diagram pane:
on the upper-right side of the shape. Now the accept event action shape looks like the following:
715
11
MODEL ELEMENTS
Action
To specify Is Unmarshal property In the Accept Event Action specification dialog box, select/clear the Is Unmarshal property, which indicates whether there is a single output pin for the event, or multiple output pins for the attributes of the event.
The Receive Order and Fill Order call behavior actions To assign a behavior to the call behavior action
From the call behavior action shortcut menu select the Behavior command. In the Call Behavior Action specification dialog box, modify the Behavior field.
NOTES
Double click the call behavior action with the assigned behavior - the behavior specification dialog box is opened or if the assigned behavior is a diagram, the diagram will be opened. After the behavior is assigned to the call behavior
To create a new diagram for the call behavior action From the call behavior action symbols shortcut menu, select New Diagram and then diagram from the list. This accelerates the creation of behavior diagrams.
716
11
To select the name display mode on the call behavior action Stereotypes from the behavior can be visible on the call behavior action. You can select to show an action name, a behavior name or both by changing the Name Display Mode property in the call behavior action symbol Properties dialog box.
In this example the call operation action has been assigned getOrder operation whose type is OrdersDB class.
The call operation action named Get supplementary
In this example the call operation action is named Get supplementary order. It has been assigned getOrder operation whose type is OrdersDB class.
The classified name of operation is hidden from the call operation action shape.
To assign an operation for the call operation action From the action shortcut menu, select the Operation command or set an operation in the Call Operation Action specification dialog box, Operation field.
717
11
MODEL ELEMENTS
Action
MagicDraw version 15.0 and later allows the display of operation name and class of operation on the call operation action shape. When an operation is assigned to the call operation action, there are three name/operation display options available:
If the call operation action is not named, the name of the class is displayed under the
operation name.
If the name of the call operation action is the same as the assigned operation name,
then the name of the class is displayed under the operation name.
If the call operation action name differs from the assigned operation name, then
<class of the operation>::<operation name> is displayed under the call operation action name.
To hide the operation name and class of the operation from the call operation action shape From the call operation action shortcut menu, clear the Show Qualified Name for Operation check box. You may also customize this property in the call operation action Properties dialog box.
NOTE
When loading a project from a version older than MagicDraw version 15.0, by default the class of the operation is not displayed on the diagram pane. The Show Qualified Name for Operation option is unchecked.
718
11
Opaque Action
The opaque action is introduced for implementation-specific actions or for use as a temporary placeholder before some other actions are chosen. The opaque action has no specific notation. There are additional Body and Language text fields in the Opaque Action specification dialog box.
call behavior action). 2. Then, a signal to fill the order request is sent to the warehouse (Fill order request send a signal action). 3. Finally, an invoice is created (Create invoice call behavior action). The relationships are represented with control flow paths. To assign a signal to the send signal action
1. Double-click the send signal action shape or select Specification from the shape
shortcut menu. The Send Signal Action specification dialog box opens.
2. Click ... in the Signal Field. The Select Element dialog box opens. 3. Select the signal or create a new one.
719
11
MODEL ELEMENTS
Action
2. Select the Any Action command. The Select Action Metaclass dialog box opens.
3. Select an action metaclass from the list or type the first letter of the metaclass. Click
OK. The action is created. 4. Click on the diagram pane. An action symbol is drawn.
720
11
ton. A menu with input pin, action input pin, or value pin opens.
3. Select the pin from the list. The pin specification dialog box opens. In the Output Pin field, select the Result box and click + button. The Output Pin
Constraints branch. At the bottom of the right side pane, click the Apply button. The Select Elements dialog box opens.
n Select the constraint storage place and click the Create button. In the
menu that opens, select the Duration Constraint command. The Duration Constraint specification dialog box opens.
3. Specify a duration interval. In the Duration Constraint dialog box, select the Expert
property display mode. Type the minimum and maximum duration for holding an activity in the Min and Max fields, e.g. type the following values: 0 sec and 30 sec. 4. Assign the events for the input and output pins:
721
11
MODEL ELEMENTS
Action
as an event.
5. Apply the created duration constraint on the action. TIP
To return to the former dialog box in the specification dialog box, click the Back button.
722
11
The sample below depicts an activity diagram with a duration constraint applied on an action.
Actor
Actors represent roles played by human users, external hardware, and other subjects. An actor does not necessarily represent a specific physical entity but merely a particular facet (that is, "role") of some entities that is relevant to the specification of its associated use cases. An actor requires task solutions from a system. This task is represented as a use case. An actor is shown as a stick man figure with the name below the figure. A general information about working with shapes is offered in Chapter 5, "Working With Diagrams."
723
11
MODEL ELEMENTS
Actor
Refer to the Specification dialog boxes on page 265 for more information on the specification elements.
Function
The constraint name. The constraint type. The Constraint Specification dialog box opens. Define the constraint in the dialog box. Removes the selected constraint element from the actor.
724
11
Association
An association in the class diagrams represents the semantic relationship between two or more classifiers, which specifies connections between their instances. An association relationship is the most general of all relationships and the most semantically weak. An association in the use case diagrams represents the participation of an actor in a use case, i.e., when instances of the actor and instances of the use case communicate with each other. This is the only relationship between actors and use cases. Sometimes an association relationship is called communication association. An association is drawn as a solid path connecting two classifier symbols. For a general information about working with symbols, see Chapter 5, "Working With Diagrams." Specify an association in the Association Specification dialog box. Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box Association End A Name Function
The name of the class A. Click the button, to open the Name dialog box. If selected, a navigable owned end of the association indicates that the association is navigable from the opposite ends, otherwise the association is not navigable from the opposite ends.
Navigable
725
11
Tab name
MODEL ELEMENTS
Association
Box Owned By
Function
If a Classifier is selected, the classifier name
association to which the association end belongs is displayed on the association end.
Multiplicity Default Value
The multiplicity value of an association end A. Click the ... button to open the Select Elements dialog box and select the value for the model elements tree. The name of the association end B. Click the button, to open the Name dialog box. If selected, a navigable owned end of the association indicates that the association is navigable from the opposite ends, otherwise the association is not navigable from the opposite ends.
If a Classifier is selected, the classifier name
Owned By
association to which the association end belongs is displayed on the association end.
Multiplicity Default Value
The multiplicity value of an association end B. Click the ... button to open the Select Elements dialog box and select the value for the model elements tree.
726
11
The Direction Arrow is graphical display most often used in top level domain class diagrams. The Direction Arrow helps to read diagram and explain diagram semantics. The Direction Arrow has no meaning in a model. Usually Direction Arrow is used in diagram where navigability is not defined yet. Direction Arrows are usually displayed for named associations. When you move on with your modeling and create mode detail diagrams with specified navigability, direction arrows and associations names usually are not displayed in this type of diagrams. See an example in Figure 289 on page 727 and Figure 290 on page 727. User and Account classes are connected with association. Navigation arrow may be displayed to either side, depending on the association name. If association name is belongs to - Direction Arrow should point from Account class to User class. If association name is has - Direction Arrow should point from User class to Account class.
Figure 289 -- The Direction Arrow points from Account class to User class
Figure 290 -- The Direction Arrow points from User class to Account class
727
11
MODEL ELEMENTS
Association
4. Drag the path to the second class (path destination) and drop it there.
NOTE
If you need to model a relationship among a number of classes, N-ary association is used.
path.
Association End
The associations ends are represented by properties, each of which is connected to the type of the end. When a property is an association end, the value or values are related to the instance or instances at the other end(s) of the association. An association end is the connection between the lines depicting an association and the icon (often a box) depicting the connected classifier. To open the Association End Specification dialog box
1. Double-click the association path. The Association Specification dialog box
appears.
2. Select the Association Ends group in the specification tree and expand it by clicking
728
11
3. Double click the selected Association End. The Property Specification dialog box
opens.
From the association end shortcut menu, select Specification.
An association end is defined as a property it has attribute properties in the Property Specification dialog box. For a detailed description of attributes, see Drag and drop the selected Opaque Behavior element from the Browser tree on the Diagram pane. on page 834. Click the Expert in the Properties field for showing more properties of the association end. Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box Type Default Value Owner Type Modifier Function
Shows an association end type - name of the class, to which the association end is related. Click the ... button to open the Select Elements dialog box and select the value for the model elements tree. Shows a class name, containing an association end as the property. Additional information about the type.
& - one class has a reference to other model elements. * - one class has a pointer to other model elements. [] one class has an array of other model elements.
Navigable
If selected, a navigable owned end of the association indicates that the association is navigable from the opposite ends, otherwise the association is not navigable from the opposite ends. The multiplicity value of an association end A. If true, the association end may only be read, not written. This property scope means that the values returned by the property have no duplicates.
729
11
MODEL ELEMENTS
Association
Tab name
Box Aggregation
Function
When placed on a target end, specifies whether the target end is an aggregation with respect to the source end. Only one end can be an aggregation.
None. The end is not an aggregate. Shared. The end is an aggregate; therefore, the other
end is a part and must have the aggregation value of none. The part can be contained in other aggregates.
Composite. The end is a composite; therefore, the
other end is a part and must have the aggregation value of none. The part is strongly owned by the composite and may not be part of any other composites.
Is Derived
Specifies whether the Property is derived, i.e., whether its value or values can be computed from other information. If the multiplicity is greater than one, then the set of related elements can be ordered or unordered.
False - the elements form an unordered set. This is the
Is Ordered
duplicates are still prohibited. This generic specification includes all ordering types.
Is Unique Qualifiers Name Type Property Default value Up Down Create
If true, the collection of values may not contain duplicates. The name of the assigned attribute of an association end. The type of the assigned attribute of an association end. Shows the owner of the qualifier - to which property it belongs. The initial value of an attribute of an association end. Moves item to an upper position in the list Moves item to a lower position in the list. The Property Specification dialog box opens.
730
11
Tab name
Box Delete
Function
shortcut menu, and then select the Edit Name subcommand, then type or edit the name directly on the Diagram pane. To make a special case of an association path (aggregation/composition)
1. Open the Property Specification dialog box. 2. Click the desired option button for an aggregation kind (None, Shared or Compos-
ite).
From the association shortcut menu, select Role A of (class name) or Role B of
diagram.
Right click the association path end and select Shared or Composite command from
check box.
Select Role A of (class name) or Role B of (class name) from the association
By default, an association is navigable on both sides and its navigability is not visible.
731
11
MODEL ELEMENTS
Association
To display the association navigability From both association ends shortcut menu, select the Show Navigability check boxes. In the Figure below the association is navigable on both sides and its navigability is visible.
NOTEs
To open the assocation ends shortcut menu, right-click on the end of the association (on the association end area) on the diagram pane. Open the association shortcut menu and select the Role A of <class name> or Role B of <class name>.
732
11
2. Type or select from the list multiplicity value (1, *, 0..*, etc.) in the Multiplicity box. Open the Association Specification dialog box and from the Multiplicity drop-
down list box, select or type the multiplicity value for the desired association end.
From the association shortcut menu, select Role A of (class name) or Role B of
(class name), then select the multiplicity value (1, *, 0..*, etc.). To add, edit, or remove a qualifier to/from an association end
A qualifier is an attribute or list of attributes whose values serve to partition the set of instances associated with an instance across an association. The qualifiers are attributes of the association. It is shown as a small rectangle attached to the end of an association path between the final path segment and the symbol of the classifier that it connects to. The qualifier rectangle is part of the association path, not part of the classifier. The qualifier rectangle drags with the path segments. The qualifier is attached to the source end of the association. 1. Open the Association End Specification dialog box, Qualifiers group. 2. Click the Create button. The Property Specification dialog box opens. Define a
qualifier. 3. To remove the qualifier, click the Delete button. To show the association ends as attributes on linked class shapes
If two classes are linked with an association path, both classes have a property created with an opposite class assigned as the property type in them. This property can be displayed on the class shape as well as an association link. From the class shortcut menu, select Symbol(s) Properties. In the open Properties dialog box, the Attribute group, select one of the possible options near the Show Association End property:
All - property and association paths will be displayed on the diagram pane. Without Association Symbol - if an association symbol is deleted, the property will
diagram pane.
733
11
MODEL ELEMENTS
Association
navigable. This improved functionality allows a proper management of the navigableOwnedEnd property for associations:
1. Able to manually change the ownership of an association end.
To change the ownership of an association end, select the Owned By command from the Association End shortcut menu and then select the desired owner.
2. Set the navigability for the association ends owned by the associations while keeping
the ownership.
734
11
Figure 295 -- Sample of Non-navigable endB, which is owned by Association 3. Support the dot notation.
The ownership of association ends by an associated Classifier is now indicated graphically. The following example shows that endA is owned by the Customer class and endB is owned by the association.
Figure 296 -- Sample of endA owned by class and endB owned by association
To enable the dot notation from the Options menu select the Project command and then select the General project options branch. Next, select the Enable dot notation for associations check box.
735
11
MODEL ELEMENTS
Attribute
Attribute
An attribute is a named property of a class that describes a range of values that can be held by the instances of that class. To create a new attribute
Double-click the selected class or select Specification from the class shortcut menu.
The Class Specification dialog box opens. Click the Attributes tab and then click the Create button. The Property Specification dialog box opens. Define a new attribute and click OK.
Select the Insert New Attribute from the class shortcut menu. Type the attribute
manipulation button. Define an attribute in the Property Specification dialog box. To open the Property Specification dialog
1. Open the Class Specification, Actor Specification, or Interface Specification dia-
log box. 2. In the Attributes tab, double-click the desired attribute in the tree, or click the Create button. Draw an association path and click on the association end.
736
11
Click the Expert in the Properties field for showing more properties of the attribute. Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Options Type Function
Shows an attribute type. It can be another project class or primitive type such as int or double or other. Select a type from drop-down combo box or click ... button and select the type from the Select Element tree. Type a value for an attribute or click ... button and enter it in the Default Value dialog box.
Default Value
737
11
Tab name
MODEL ELEMENTS
Attribute
Function
Indicates whether it is possible to navigate across the property. The multiplicity value of an attribute. If true, the property may only be read, and not written. This property scope means that the values returned by the property have no duplicates. When placed on a target end, specifies whether the target end is an aggregation with respect to the source end. Only one end can be an aggregation.
None. The end is not an aggregate. Shared. The end is an aggregate; therefore, the other end is
a part and must have the aggregation value of none. The part can be contained in other aggregates.
Composite. The end is a composite; therefore, the other end
is a part and must have the aggregation value of none. The part is strongly owned by the composite and may not be part of any other composite.
Is Derived Is Ordered
Specifies whether the property is derived, i.e., whether its value or values can be computed from other information. If the multiplicity is greater than one, then the set of related elements can be ordered or unordered.
False - the elements form an unordered set. This is the
738
11
the Association Class to draw. 3. Link the previously drawn classes with this path. An additional class with a dashed line will be created on the association between classes.
If an attribute type is another model class, this attribute can be represented as an association with a role (attribute name) between the owner class and the class of attribute type
Select Create Roles from the class shortcut menu. A list of available attributes opens. Select all or only one and an association relationship with a role is created. NOTE
This command is visible only if one or more attribute types are other model classes.
To change an attribute name The attribute name must be unique in the class scope.
1. Click the attribute in the selected class on the diagram pane or in the Browser tree. 2. Type a new name. Change an attribute name in the Attribute Specification dialog box.
To define the type of an attribute The attribute type can be of the other class, interface, or a primitive class, such as int or double.
Select the type of an attribute from the Type drop-down list box in the Attribute
739
11
MODEL ELEMENTS
Attribute
Type a colon : and the name of the attribute type just after the attribute name on the
diagram pane. If you specify a nonexistent type of an attribute, a new class is created.
Click the ... button in the Type field and select they type from the Select Elements
bute properties.
3. Select a sign in the Type Modifier drop-down list box: & - one class has a reference to other model elements.
* - one class has a pointer to other model elements. [] - one class has an array of other model elements.
an attribute can be accessed by any other elements. an attribute can be accessed by elements from the same package. an attribute can be accessed from the inside of the selected class and classes derived from that class. an attribute can be accessed only from inside of that class.
Type +, ~, -, or # visibility marks just before an attribute name directly on a
diagram.
1. Open the Attribute Specification dialog box. 2. From the Visibility drop-down list box, select the desired item (public, package, pro-
740
11
2. Click the Show Expert Properties button to enlarge the list of available attribute
properties. 3. Select the Is Static check box. To set the attribute multiplicity
1. Open the Attribute Specification dialog box (see above). 2. Click the Show Expert Properties button to enlarge the list of available attribute
properties. 3. Select or set the multiplicity value in the Multiplicity drop-down box. To set the attribute changeability The attribute changeability controls the access by operations on the class on the opposite end.
Name Is Read Only Function
When false - no restrictions on modifications. When true - the value may not be altered after the object is instantiated and its values initialized. No additional values can be added to a set.
1. Open the Attribute Specification dialog box (see above). 2. Click the Show Expert Properties button to enlarge the list of available attribute
properties.
3. Select/clear the Is Read Only check box.
Class
A class is drawn as a solid-outline rectangle with three compartments separated by horizontal lines. The top name compartment holds the class name and other general properties of the class (including stereotype); the middle list compartment holds a list of properties; the bottom list compartment holds a list of operations. The property and operation compartments are optional and you may suppress them.
741
11
MODEL ELEMENTS
Class
A class is the descriptor for a set of objects with similar structure, behavior, and relationships. The model is concerned with describing the intention of the class, that is, the rules that define it. The runtime execution provides its extension, that is, its instances. Classes are declared in the class diagrams and used in most of other diagrams. UML provides a graphical notation for declaring and using these classes as well as a textual notation for referencing classes within the descriptions of other model elements. A class represents a concept within the system being modeled. It has a data structure, behavior, and relationships to other elements. The name of a class has a scope within the package in which it is declared and the name must be unique (among class names) within its package.
Click ... and assign an existing class from a model in the Select Elements dialog box or create a new one. Click ... and assign an existing interface from a model in the Select Elements dialog box or create a new one. Name of the class port. Type, assigned to the port. Provided classifier is displayed. Required classifier is displayed. Name of classifier, owning port. Creates a new port. Removes an existing port from the class.
Realized Interfaces
Ports
742
11
Tab name
Box
Function
Signal Receptions
Manage the receptions of a class. For more information about receptions, see Reception on page 881.
Name Type Create Delete
Behaviors
Name of the behavior. Type, assigned to the behavior. Choose item from the list - activity, interaction, state machine. Removes a behavior from the class. Model element name. Model element type. The corresponding specification dialog box opens. Define the selected model element in the dialog box. Removes the selected model element from the class.
Inner Elements
Delete
you wish to add from the list. 3. Click the selected element. 4. The corresponding Specification dialog box opens. Define the class, use case or interface, and click OK. To show an inner element on the diagram
1. Select a created inner element in the Browser. 2. From the element shortcut menu, select Create Symbol.
743
11
MODEL ELEMENTS
Class
To generate operations for setting or getting private data to the selected class
From the class shortcut menu, select Tools and then Create Setters/Getters. For a detailed description, see Creating Setters / Getters on page 404.
A class can be defined as active (a border to the class shape is added). An active class specifies whether an object of the class maintains its own thread of control. A class is a generalizable element and can be defined as Abstract. To define a class as abstract and/or active
1. Double-click the selected class or select Specification from the class shortcut menu.
To show members (attributes and operations) on the classifier shape according to the visibility
From the shape shortcut menu, point to Presentation Options, and then select one of the check boxes in the Show Members subcommand. Possible choices:
All; Only Public; Not Private.
744
11
2. In the class diagram toolbar, right-click the Class button. A menu with available
options opens. Select the Structured Class element. 3. Click on the diagram. The class element with a hyperlink to a composite structure diagram is created. 4. Select the class in the Browser to see its structure. To do this, choose Select in Containment Tree on the diagram from the class shortcut menu, .
See the above example of a structured class. In the Browser you may see the created class with the composite structure diagram inside it. The class is linked with the diagram. It means that after double click the diagram, or the Browser, the composite structure diagram will be opened. For more information about hyperlink,s see Defining Hyperlinks Between Elements on page 303. The names of the class and the composite structure diagram are synchronized. Type a name for the class, for example, Order, and the name of the diagram is automatically changed to Order and vice versa. This is synchronization of a diagram name and its context name. For more information about diagram name and its context synchronization, see Diagram name and its context name synchronization on page 205.
745
11
MODEL ELEMENTS
Class
Design Patterns
In MagicDraw, you may create and edit the design patterns for the selected class. A detailed description of templates can be found in the Design Patterns of Reusable Object-Oriented Software. To create the design pattern for the selected class
1. From the class shortcut menu, select Tools, and then Apply Pattern. The Pattern
Wizard dialog box opens. 2. Select the design pattern you want to apply and select the desired options. Click OK. Select the class and then Apply Pattern from the Tools menu. For a detailed description of this dialog box, see Section Controlling Merge memory usage on page -394.
box. For a detailed description of this dialog box, see Section Project Options on page -158.
746
11
Figure 299 -- Presentation Options submenu Command Show Operations Signature Function (when selected)
747
11
Command
MODEL ELEMENTS
Class
Show Full Classifier Type Show Initial Attribute Value Show Attributes Visibility Show Operations Visibility Suppress Attributes Suppress Operations Show Only Public Members Show all Members Attributes Sort Mode By Name
By Stereotype By Visibility No Sorting
Shows the full track of the type of an attribute from the root package. Shows the initial attribute value. Shows the attribute visibility (public, package, private, or protected). Shows the operation visibility (public, package, private, or protected). Attributes compartment is suppressed. Operations compartment is suppressed. Shows only the public attributes and operations. The default settings are restored and shows all attributes and operations. Choose the sorting parameter:
Sort attributes by name. Sort attributes by stereotype Sort attributes by visibility (public, package, private, or
protected)
No sorting is executed.
protected)
No sorting is executed.
Additional information sign '' in the class attributes list, when a portion of attributes are omitted by editing a class compartment. Additional information sign '' in the class operations list, when a portion of operations are omitted by editing a class compartment. Shows the stereotypes on a class.
Show Stereotypes
748
11
Command
Shows the constraints on a class. Shows the tagged values on a class. Shows the owners (package, subsystem, or model) name on a class.
Collaboration
A collaboration is represented as a kind of classifier. It defines a set of cooperating entities to be played by instances (its roles) as well as a set of connectors that define the communication paths between the participating instances. The cooperating entities are the properties of the collaboration. A collaboration specifies a view (or projection) of a set of cooperating classifiers. It describes the required links between instances that play the roles of the collaboration as well as the required features of the classifiers that specify the participating instances. Several collaborations may describe different projections of the same set of classifiers.
749
11
MODEL ELEMENTS
Collaboration
Refer to the Specification dialog boxes on page 265 for the information of the specification elements not covered in this section.
Tab name Behaviors Box Name Type Create Function
Name of the added behavior. Type of the behavior Select the kind of behavior you want to create - Activity, Interation, or State Machine. The coresponding Specification dialog box opens.
Any behavior attached to the collaboration type applies to the set of roles and connectors bound within a given collaboration use.
Delete
750
11
Tab name
Function
Inner Elements
Name of the inner collaboration element. Type of the inner collaboration element. Select an element from the list. The corresponding Specification dialog box opens. Define the element and click Back to return to Collaboration Specification. Remove the inner element from the collaboration.
Delete
Interaction, or State Machine. Type the name of the behavior and modify it in the open Specification dialog box.
NOTE
You can edit the assigned classifier role in the Collaboration Specification dialog box, Behaviors tab.
the diagram pane and type the collaboration name. 2. Draw Part from the Composite Structure diagram toolbar and from the shortcut menu, Type submenu, select an already existing (or create a new) classifier as the part type. 3. From the Composite Structure diagram toolbar, select the Connector to connect the parts.
751
11
MODEL ELEMENTS
Combined Fragment
4. From the Composite Structure diagram toolbar, select the Collaboration Use element
to draw on the collaboration. Select an already existing, or create new collaboration for the Collaboration Use. 5. From the Composite Structure diagram toolbar, select the Role Binding path to connect the parts and Collaboration Use role, which can be selected in the Select Role dialog box.
Combined Fragment
A fragment is an abstract notion of the most general interaction unit. It is a piece of an interaction. Each interaction fragment is conceptually like an interaction by itself. Using the Combined Fragment, a fragment of a sequence diagram can be separated. MagicDraw represents twelve kinds of fragments: Alternatives, Loop, Option, Parallel, Break, Negative, Critical Region, Consider, Ignore, Weak Sequencing, Strict Sequencing, and Assertion.
Tab name General Property Interaction Operator Function
Select an operator for the fragment. Available options: seq, alt, opt, break, par, strict, loop, critical, neg, assert, ignore, consider.
752
11
Tab name
Property
Function
In the Formal Gates and Actual Gates panes are listed inside or outside combined fragment created gates. For more information about gates, see Gate on page 781.
Guard Create Delete Up Down
Operands
Separated alternative parts of the interaction fragment. Creates a new guard value. Removes a value from the list. Moves an item to an upper position in the list. Moves an item to a lower position in the list.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Component
A component represents all kinds of elements pertaining to piecing together software applications. They can be simple files, such as DLLs or executables. According to UML it is possible to list component properties. The following compartments are available for the component:
Provided/required interfaces Realizations
753
11
MODEL ELEMENTS
Component
Artifacts
For more information about working with symbols, see Chapter 5, "Working With Diagrams."
754
11
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Function
Name of the port. Type, assigned to the port. The provided classifier is displayed. The required classifier is displayed. Name of the classifier, owning a port. Creates a new port. Removes an existing port from the component.
755
11
Tab name
MODEL ELEMENTS
Component
Function
Provided/Required Interfaces
Name of the provided/required interface. Possible values - provided or required. Adds the provided/required interface. Removes the provided/required interface from the list. Name of the realizing classifier Type of the classifier (class, interface, etc.) The model element name, owning a classifier. Click button to open the classifier
Realizing Classifiers
The Select Elements dialog box opens. Select an element from the model element tree. Removes a realizing classifier from the list. Name of the behavior. Type, assigned to the behavior. Select an item from the list - activity, interaction, state machine. Removes a behavior from the class. The model element name. The model element type. Select an element from the list. The corresponding specification dialog box opens. Define the selected model element in the dialog box. Removes the selected model element from the component.
Delete
Displaying interfaces, realizations, and artifacts on the component The following component shape compartments can be displayed or hidden:
Provided/Required interfaces
756
11
the same check box values in the open Component Properties dialog box.
Connector
Specifies a link that enables communication between two or more instances. This link may be an instance of an association, or it may represent the possibility of the instances being able to communicate because their identities are known by virtue of being passed on as parameters, held in variables or slots, or because the communicating instances are the same instance. The link may be realized by something as simple as a pointer or by something as complex as a network connection. In contrast to the associations, which specify the links between any instance of the associated classifiers, the connectors specify the links between instances playing the connected parts only.
757
11
MODEL ELEMENTS
Connector
Each connector may be attached to two or more connectable elements, each representing a set of instances. For more information about working with symbols, see Chapter 5, "Working With Diagrams." Define the selected connector in the Connector Specification dialog box.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box Owner Contract Function
The name of the element, which owns a connector. Assign an activity, interaction, or state machine to a connector. Click the ... button and select the elements in the Select Elements dialog box. Possible choices:
delegation (default) assembly
Kind
758
11
group, select one of the roles. Select Specification from the shortcut menu, or double-click the role. The Connector End Specification dialog box opens.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box name Owner Function
The name of the property, representing a lifeline. The multiplicity value of the connector end.
759
11
Tab name
MODEL ELEMENTS
Connector
Function
When a connector has an association specifying the type of the connector, connector end, this property refers to the appropriate association end. Refers to the part containing the port that the connector is attached to.
Drawing a connector end The connector end information can be displayed on the diagram.
760
11
Containment
A containment shows a class, package or other model element declared within another model element. Such a declared class is not a structural part of the enclosing class but merely has scope within the namespace of the enclosing class, which acts like a package toward the inner class.
Data type
A data type is a type whose values have no identity; that is, they are pure values. It is a classifier and inherits the general features of the classifier: visibility, generalizable element properties, and operations. MagicDraw provides the following predefined data types: boolean, byte, char, date, double, float, int, Integer, long, short, void, and String. You may also create Enumeration or Primitive data types. To create a new Data Type, including Enumeration or Primitive
From the Browser, select New from the class or New Element from the package,
subsystem, or model shortcut menu, and then select Data Type, Enumeration, or Primitive.
761
11
NOTE:
MODEL ELEMENTS
Data type
In the Class, Package, Subsystem, and Model Specification dialog boxes, Inner
Elements tab, click Create and select a data type. You may create an enumeration by clicking the Enumeration button from the class diagram toolbar:
762
11
Tab name
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Box Owner Function
General Set general information about the data type Inner Elements
Shows an element, which contains the data package. The default data packages contain the UML Standard Profile. Displays a constraint name. Shows an item type, in this case Constraint. Click the button to open the Constraint Specification dialog box. The Constraint Specification dialog box opens. Define the constraint. Removes the selected constraint from the inner elements list.
Name Type
Create Delete
Enumeration
The enumeration defines a kind of data type whose range is a list of predefined values, called enumeration literals. An Enumeration may contain operations, but they must be pure functions (this is the rule for all data type elements).
763
11
MODEL ELEMENTS
Data type
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box Owner Function
764
11
Tab name
Function
Enumeration Literals
The name of the enumeration literal. The owner of the enumeration literal. Click the button to open the Enumeration Literal Specification dialog box and edit the information about the enumeration literal. The Enumeration Literal Specification dialog box opens. Define a new enumeration literal. Removes the selected enumeration literal from the enumeration. Displays a constraint name. Shows an item type, in this case Constraint. Click the button to open the Constraint Specification dialog box. The Constraint Specification dialog box opens. Define the constraint. Removes the selected constraint from the inner elements list.
An enumeration literal defines an element of the runtime extension of an enumeration data type.
Inner Elements
enumeration symbol.
765
11
MODEL ELEMENTS
Decision Node
Primitive
A primitive defines a predefined data type without possessing any relevant UML substructure; that is, it has no UML parts. A primitive data type may have an algebra as well as operations defined outside of UML (for example, mathematically). The primitive data types used in UML include Integer, Unlimited Integer, and String.
Decision Node
Decisions are made using guard conditions. They help protect transitions that depend on a guarding condition. The symbol used for the decision is a large diamond shape, which may have one or more incoming transitions and two or more outgoing transitions. A decision in an activity diagram is used much like a choice or junction point in the state diagrams. Decision points allow to separate and merge the transition paths back together. The Decision Node can be converted to a Merge Node. Right-click to open the shortcut menu and select Convert to Merge Node.
Dependency
A dependency is a relationship signifying that a single or a set of model elements requir es other model elements for their specification or implementation. This means that the complete semantics of the depending elements is either semantically or structurally dependent on the definition of the supplier element(s).
766
11
NOTE
A dependency is shown as a dashed arrow between classes or packages. The model element at the tail of the arrow (the client element) depends on the model element at the arrowhead (the supplier element). The arrow can be labeled with an optional stereotype and an optional individual name. You may also draw a dependency between a class and other class elements, such as attributes and operations.
For more information about working with the symbols, see Chapter 5, "Working With Diagrams." Example of the dependency relationships See the example of dependency relationships in the Figure below.
767
11
MODEL ELEMENTS
Dependency
The Dependency and Its Kinds Specification dialog boxes Dependency, abstraction, and usage relationships defined in the dialog box of the same structure. They differ from one another only by the corresponding Specification name.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box name Source Target Function
Shows the name of the dependencys supplier element. Shows the name of the dependencys client element.
768
11
Term
The OMG UML specification (UML 2.2: Superstructure) states: A template binding represents a relationship between a templateable element and a template. A template binding specifies the substitutions of actual parameters for the formal parameters of the template.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box name Source Target Function
Shows the name of the dependencys supplier element. Shows the name of the dependencys client element.
769
11
Tab name
MODEL ELEMENTS
Dependency
Function
The name of the template parameter. The type of the template parameter. A reference to a formal template parameter of the target template signature. The Select Template Parameter dialog box opens. Select the item from the list and click OK. Removes the template parameter substitution.
Abstraction
An abstraction is a relationship that relates two elements or sets of elements that represent the same concept at different levels of abstraction or from different viewpoints. In the metamodel, an abstraction is a dependency in which there is a mapping between the supplier and the client. Define an abstraction relationship in the Abstraction Specification dialog box. For a detailed description of this dialog box, see The Dependency and Its Kinds Specification dialog boxes on page 768.
Usage
A usage is a relationship in which one element requires another element (or set of elements) for its full implementation or operation. In the metamodel, a usage is a dependency in which the client requires the presence of the supplier. Define a usage relationship in the Usage Specification dialog box. For a detailed description of this dialog box, see The Dependency and Its Kinds Specification dialog boxes on page 768.
Package Merge
A package merge is a directed relationship between two packages, that indicates that the contents of the two packages are to be combined. It has a dependency relation with the applied stereotype <<merge>>.
770
11
Define a merge relationship in the Dependency Specification dialog box. For a detailed description of this dialog box, see The Dependency and Its Kinds Specification dialog boxes on page 768.
Package Import
A package import is defined as a directed relationship that identifies a package whose members are to be imported by a namespace. It is a relationship between an importing namespace and a package, indicating that the importing namespace adds the names of the members of the package to its own namespace. It is dependency relation with applied stereotype <<import>>. Define an import relationship in the Dependency Specification dialog box. For a detailed description of this dialog box, see The Dependency and Its Kinds Specification dialog boxes on page 768. To draw the Package Import link, select the Package Import path to draw in the Class diagram toolbar, from the Abstraction group.
Element Import
An element import is defined as a directed relationship between an importing namespace and a packageable element. The name of the packageable element or its alias is to be added to the namespace of the importing namespace. It has a dependency relation with the applied stereotype <<import>>. Define an import relationship in the Dependency Specification dialog box. For a detailed description of this dialog box, see The Dependency and Its Kinds Specification dialog boxes on page 768. To draw the Element Import link, select the Element Import path to draw in the Class diagram toolbar, from the Abstraction group, .
Access
An access relationship shows that elements can only be accessed from a package, and it cannot be referenced.
771
11
MODEL ELEMENTS
Deployment Specification
path to draw.
4. Open the Package Import Specification dialog box and set the Visibility property to
private.
Deployment
To draw a deployment link
1. In the implementation diagram toolbar, click the Deployment button and draw a
Deployment check box to display the deployed artifacts on the node instance shape.
Deployment Specification
The Deployment Specification is a type of Artifact. To draw the Deployment Specification on the diagram pane In the Implementation diagram toolbar, right-click the Artifact button group. In the open list, select the Deployment Specification to draw.
The Deployment Specification is a general mechanism to parameterize a Deployment relationship. To specify the Deployment relationship
1. Create the Deployment Specification.
772
11
2. Between the Deployment relationship and Deployment Specification draw the Depen-
Exception Handler
An Exception Handler is an element that specifies a body to execute in case the specified exception occurs during the execution of the protected node. The Exception Handler may be drawn from an Output Pin to an Input Pin or from an Action to an Input Pin:
773
11
MODEL ELEMENTS
Extend
Extend
A relationship from an extending use case to an extended use case that specifies how and when the behavior defined in the extending use case can be inserted into the behavior defined in the extended use case. The extension takes place at one or more specific extension points defined in the extended use case. Define the extend relationships in the Extend Specification dialog box.
774
11
Group name General
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Box Condition Function
An expression specifying the condition, which must be fulfilled if the extension is to take place.
Select predefined extension points you wish to assign to the extend relationship in the Extension Points dialog box. Remove an already created extension point from the use case. Move the selected extension point to an upper position. Move the selected extension point to a lower position.
Unassign Up Down
775
11
MODEL ELEMENTS
Flow Final Node
2. Expand the Extension Points group and then click on the created extension point.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box name Owner Function
The name of the use case, which owns the extension point.
776
11
See the following example for the flow final element notation in a MagicDraw project.
For more information about defining the flow final node, see Containment on page 761.
Fragment
MagicDraw represents twelve kinds of fragments: Alternatives, Loop, Option, Parallel, Break, Negative, Critical Region, Consider, Ignore, Weak Sequencing, Strict Sequencing, and Assertion.
Alternative Fragment
The alternative fragment models ifthenelse constructions.
777
11
MODEL ELEMENTS
Fragment
Combined Fragment
The UML Combined Fragment element allows the expressions of interaction fragments to be defined in the sequence diagram. The combined fragments provide a means to define special conditions and subprocesses for any sections of lifelines in the sequence diagram by specifying an area where the
778
11
conditions or subprocesses apply. Using the Combined Fragment, a fragment of the sequence diagram can be separated. To draw a Combined Fragment
In the Sequence diagram toolbar, select the Alternatives element to draw. From the combined fragment shortcut menu select the Covered Lifelines command
and in the Covered Lifelines dialog box, select the lifelines to display.
In the Sequence diagram toolbar, Options group, select the Parallel combined
fragment to draw.
Draw the Critical Region combined fragment from the Sequence diagram toolbar,
779
11
MODEL ELEMENTS
Function Behavior
Function Behavior
Term
The OMG UML specification (UML 2.2: Superstructure) states: A function behavior is an opaque behavior that does not access or modify any objects or other external data. Primitive functions transform a set of input values to a set of output values by invoking a function. They represent functions from a set of input values to a set of output values. The execution of a primitive function depends only on the input values and has no other effect than to compute output values. A primitive function does not read or write structural feature or link values, nor otherwise interact with object memory or other objects. Its behavior is completely self-contained. Specific primitive functions are not defined in the UML, but would be defined in domain-specific extensions. Typical primitive functions would include arithmetic, Boolean, and string functions. During the execution of the function, no communication or interaction with the rest of the system is possible. The amount of time to compute the results is undefined. FunctionBehavior may raise exceptions for certain input values, in which case the computation is abandoned.
The function behavior allows modeling external functions that take only inputs and produce outputs. It has no effect on the specified system. To create the function behavior In the Browser tree, right-click the Data package. In the shortcut menu, select the New Element command and then select Function Behavior .
780
11
Gate
Term
The OMG UML specification (UML 2.2: Superstructure) states: A Gate is a connection point for relating a Message outside an InteractionFragment with a Message inside the InteractionFragment. Gates are connected through Messages. A Gate is actually a representative of an OccurrenceSpecification that is not in the same scope as the Gate. Gates play different roles: we have formal gates on Interactions, actual gates on InteractionUses, expression gates on CombinedFragments.
MagicDraw version 15.0 and later allows the display of messages leaving or entering a sequence diagram, interaction use, or combined fragment. The Gate is a connection point for representing a message from the outside to the current sequence diagram, interaction use, or combined fragment. Gates can be used in three cases:
For passing and returning arguments to InteractionUse, which calls some Interaction. For displaying exceptions as messages that stops an interaction execution and
leaves it.
For calling sequence blocks represented as CombinedFragments.
Gate has no notation. Gates are created as message ends when drawing messages to/from a diagram frame, an interaction use, or a combined fragment. Parent topic: Model Elements on page 685. Usage in diagrams: Sequence Diagram on page 587. Related topics: Model on page 825. Lifeline in the Sequence Diagram on page 812. Combined Fragment on page 752. Interaction Use on page 803.
781
11
MODEL ELEMENTS
Gate
combined fragment).
NOTES
You can view the created gates of message in the Message specification dialog box. In the Send Event list box you may see formal gate and the Receive Event lists the actual gate. The Gate uses text from the message as an identification name. For example, a message name or a message operation.
the diagram with the formal gates. The Select Formal Gate dialog box opens.
Draw a reply message from the interaction use, which refers to the diagram with the
You can also view the formal and actual gates in the gates Interaction specification dialog box, Interaction Use dialog box, Combined Fragment dialog box, and the Actual Gates and Formal Gates panes.
an actual gate of the formal gate on page 782). 2. Select one of the listed formal gates and click OK. An actual gate is created. Or from the message shortcut menu, select the Select Formal Gate command. The Select Formal Gate dialog box opens.
NOTE
The Select Formal Gates command exists only if there are formal gates.
782
11
783
11
MODEL ELEMENTS
Gate
The formal gate and actual gate usage in the sequence diagram
See Figure 310 on page 784 where the getBalance message is drawn from the diagram frame to the theirBank lifeline. The getBalance message has a gate.
See Figure 311 on page 785 where the actual gate is presented. The Balance Lookup interaction use refers to the Balance Lookup sequence diagram. The getBalance message (see the 2nd message) has selected the formal gate and automatically repeats the data of the getBalance message from the Balance Lookup diagram.
784
11
785
11
Term
MODEL ELEMENTS
Generalization
Generalization
The OMG UML specification (UML 2.2: Superstructure) states: A generalization is a taxonomic relationship between a more general classifier and a more specific classifier. Each instance of the specific classifier is also an indirect instance of the general classifier. Thus, the specific classifier inherits the features of the more general classifier. Where a generalization relates a specific classifier to a general classifier, each instance of the specific classifier is also an instance of the general classifier. Therefore, features specified for instances of the general classifier are implicitly specified for instances of the specific classifier. Any constraint applying to instances of the general classifier also applies to instances of the specific classifier. For more information about working with symbols, see Chapter 5, "Working With Diagrams." Define the generalization in the Generalization Specification dialog box. Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box General Specific Function
The name of the parent element. The name of the child element.
786
11
NOTE
This command is available if the same tree contains the selected generalization path.
Generalizable elements
A generalizable element is a model element that may participate in a generalization relationship.
Name Is Abstract Function
Specifies whether the generalizable element may or may not have a direct instance. True indicates that an instance of the generalizable element must be an instance of a child of the generalizable element. False indicates that there may be an instance of the generalizable element that is not an instance of a child. An abstract generalizable element cannot be instantiated since it does not contain all the necessary information. Specifies whether the generalizable element is with descendants. True indicates that it may not have any descendant. False indicates that it may have some descendants (whether or not it actually has any descendants at the moment.)
Is Leaf
To define a generalizable model element (class, package, use case, etc.) as abstract or leaf
1. Open the corresponding Specification dialog box. 2. Select the Is Abstract or Is Leaf check box(es) in the General tab.
787
11
MODEL ELEMENTS
Generalization
Generalization sets
Each generalization is a binary relationship that relates classifier to a more specific classifier. The Generalization Set defines a particular set of generalization relationships that describes the way in which a general classifier may be divided using specific types. For example: the Person class can be specialized as either a Male Person or a Female Person. Furthermore, the Person may be specialized as an employee. The Female Person and Male Person constitute one Generalization Set and the Employee another:
The label next to the generalization designates the name of the Generalization Set to which the generalization belongs.
788
11
The generalization set may be drawn as two or more generalization lines drawn to the same arrowhead. In this case it is labeled once. Drawing such a tree helps to understand the grouping of generalizations sets quickly .
The generalization set may contain only generalizations that have the same General element. The following is the example of generalizations, which may not have the same generalization set:
From the above example, the generalization, which is between the Flower and Rose classes, may not belong to the kind of tree generalization set, because its general element is Flower and the general element for the kind of tree generalizations is Tree. MagicDraw only lists all generalization sets that are allowed to assign. If a generalization set created in project does not have any generalizations, it may contain any generalization sets.
789
11
MODEL ELEMENTS
Generalization
click "..." button. In the open Select Elements dialog box assign an existing generalization set or click the Create button to create new generalization set.
NOTE!
In the Generalization Set list many generalization sets can be listed, but in this case on the diagram pane, near the generalization, only the first in the list is displayed.
On the diagram pane, select a generalization. From the
generalization shortcut menu, select the Generalization Set command. In the opened list, select the generalization set or click the New button and in the indicated place create a new Generalization Set to which the current generalization is assigned.
On the diagram pane select some generalizations, which you want to
assign to the generalization set. From the shortcut menu, select the Generalization Set command.
NOTE!
The Generalization Set command is enabled only if all selected generalizations have the same general element.
Draw or move a generalization line to a generalization set tree or to a
generalization that belongs to a generalization set. The newly created generalization is assigned to the same generalization set.
790
11
The Generalization Set dialog box Specify the Generalization set in the Generalization Set dialog box.
791
11
Tab name General
MODEL ELEMENTS
Generalization
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Box Is Disjoint Function
Indicates whether or not a set of specific Classifiers in a Generalization relationship has a common instance. If the value is true, the Classifiers for a particular GeneralizationSet have no members in common; that is, their intersection is empty. The default value of the Is Disjoint property is false. Indicates whether or not a set of specific Classifiers is covering for a particular general classifier. When the value is true, every instance of a particular general Classifier is also an instance of at least one of its specific Classifiers for the Generalization Set.
In the Generalization Set dialog box, the Generalization list box lists the generalizations which are assigned to the current generalization set. To assign a generalization:
1. Near the Generalization list click the "..." button. The list of available generalizations
opens. 2. Near the generalization you want to assign to the generalization set, select the check box. 3. Click the Apply button.
NOTE!
The generalizations that belong to other sets are allowed to be selected. Selecting such a generalization removes it from the previous set and adds it to the current one.
If the Show Powertype check box is selected, on the diagram pane, next to the generalization, the label of Powertype of Generalization Set is displayed instead of the Generalization Set name. The default Show Powertype property value is false.
792
11
If the Show Complete/Disjoint check box is selected, on the diagram pane, next to the generalization, the values of Is Covering and Is Disjoint properties are displayed on the diagram. The default Show Complete/Disjoint property value is false. To group the generalizations to the generalization set trees
1. Select a general classifier on the diagram pane. 2. From the classifier shortcut menu, select the Make Generalization Set Tree com-
mand. The generalizations are grouped to trees, according to the generalization sets. When the Make Generalization Set Tree command is selected, a tree is created for each generalization set. The generalizations, which do not belong to any generalization set, are grouped to a separate tree. For example:
Include
An include (uses) relationship from the use case A to the use case B indicates that an instance of the use case A will also contain the behavior as specified by B. The include relationship is used when there are common parts of the behavior among two or more use cases. Each common part is then extracted to a separate use case, to be included by all base use cases having this part in common. Since the primary use of the include relationship is to reuse
793
11
MODEL ELEMENTS
Include
the common parts, what is left in the base use case is usually not complete in itself but dependent on the included parts for meaning and context. This is reflected in the direction of the relationship, indicating that the base use case depends on the addition but not vice versa. Define the extend relationships in the Include Specification dialog box.
Refer to the Specification dialog boxes on page 265 for information about specification elements not covered in this section.
Tab name General Box Owner Function
The name of the use case, which owns the include relationship.
Name of the use case to where the relationship goes. Name of the use case from where the relationship comes.
794
11
Information Flow
An Information Flow specifies that one or more information items circulates from its sources to its targets. Information flows require some kind of information channel for transmitting information items from the source to the destination. An information channel is represented in various ways depending on the nature of its sources and targets. It may be represented by connectors, links, associations, or even dependencies. For example, if the source and destination are parts in some composite structure diagrams such as a collaboration, then the information channel is likely to be represented by a connector between them. Or, if the source and target are objects (which are a kind of InstanceSpecification), they may be represented by a link that joins the two, and so on. The information flow and the information item notation are added. You may draw them using the Information Flows toolbar in the class or composite structure diagram:
You can also create information flows in the associations in cthe lass diagram and on the connectors in the composite structure diagrams:
3. Draw classes and associations. 4. From the association shortcut menu select command Symbol(s) Properties and
select the Show conveyed information A and Show conveyed information B checkboxes.
795
11
MODEL ELEMENTS
Information Item
Information Item
The InformationFlows package provides mechanisms for specifying the exchange of information between entities of a system at a high level of abstraction. The Information flows describe a circulation of information in a system in a general manner. They do not specify the nature of the information nor the mechanisms by which this information is conveyed (message passing, signal, common data store, parameter of operation, etc.). They also do not specify sequences or any control conditions. It is intended that, while modeling in detail, representation and realization links will be able to specify which model element implements the specified information flow, and how the information will be conveyed. An information item is an abstraction of all kinds of information that can be exchanged between objects. It is a kind of classifier intended for representing information in a very abstract way, the one which cannot be instantiated. One purpose of information items is to be able to define preliminary models, before making a detailed modeling decisions on types or structures. Another purpose of information items and information
796
11
flows is to abstract complex models by using a less specific but more general representation of the information exchanged between entities of a system. In a classifier, the information item can be represented as a name inside a rectangle. The black triangle icon on top of this rectangle indicates that it is an information item.
the information Items (or any conveyed classifiers) can be displayed on any relationship:
1. Select the information item on the diagram pane and drag it on the relationship
Instance
An instance specification specifies the existence of an entity in a modeled system and completely or partially describes the entity. The description may include:
797
11
MODEL ELEMENTS
Instance
instance. If the only classifier specified is abstract, then the instance specification only partially describes the entity.
A kind of instance based on its classifier or classifiers - for example, an instance
specification whose classifier is a class describes an object of that class, while an instance specification whose classifier is an association describes a link of that association.
A specification of values of structural features of the entity. Not all structural features
of all classifiers of the instance specification need to be represented by slots, in which case the instance specification is a partial description.
A specification of how to compute, derive, or construct the instance (optional).
MagicDraw allows you to create the instances of classifiers class, interface, enumeration, use case, actor, node, component, artifact, and other classifiers. The instances are shown using a rectangle by underlining the name string of an instance element. The instance of an actor is shown as an actor stick man figure with the actors name string below the symbol. For more information about working with symbols, see Chapter 5, "Working With Diagrams." Define the selected instance in the Instance Specification dialog box. An instance is an individual unit with its own identity and value. Each instance has a descriptor model element. To open the Instance Specification dialog box
798
11
Select Specification from the instance shortcut menu or double-click the instance shape.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box name Owner Classifier Name Type Owner Function
The name of the element, containing an instance. The name of the assigned classifier. The name of the artifact or instance. An element, which appears as a type of deployed artifact. The name of the element, containing deployed artifact.
List of an artifacts or artifact instances that has been deployed to a deployment target.
799
11
Tab name Slots
MODEL ELEMENTS
Instance
Function
The name, which is the owner of the attribute. The name of the attribute. The name of an instance, to which the current instance is set as a default value.
A named slot in an instance, which holds the value (the instance that is the value of the AttributeLink) of an attribute (the attribute from which the AttributeLink originates).
button. The Select Elements dialog box opens. Move the classifier from All to the Selected list and click OK. To assign/unassign an existing classifier for an instance in the Instance Specification dialog box
1. Double-click an instance shape or select Specification from the shape shortcut
menu.
2. The Instance Specification dialog box appears. Click the ... button in the Classifi-
ers property. To assign a new classifier, select an element in All and click the Add button to move it to the Selected list.
To unassign the assigned classifier, select an element in the Selected list
menu.
800
11
2. The Instance Specification dialog box opens. Click the Slots tab. 3. Click the Edit Value button and type the name of the value.
To display slot type on the instance symbol Slot type can be optionally displayed on Instance or Part shapes. Property Show Slot Type is added to slot symbol properties (select command Symbol(s) Properties from instance shortcut menu to invoke Properties dialog). Slot type name (see Figure 315 on page 801), slot type qualified name (see Figure 316 on page 801) or no slot type (see Figure 317 on page 802) may be displayed next to slot.
801
11
MODEL ELEMENTS
Instance Specification
To select slot in a diagram Slot can be selected in a diagram. This allows the deletion of a slot straight from the diagram and to attach a note to a slot.
Instance Specification
An instance specification represents an instance in a modeled system. In the implementation diagram Node Instance, Component Instance, Artifact Instance elements are the same Instance Specification elements with an assigned component, node or artifact. To create a Component Instance
1. In the Implementation diagram toolbar, click the Component Instance button. The
Select Components dialog box opens. 2. Select a component from the list or click the Create button to create a new one. Click OK.
802
11
TIP!
The same is valid for the Node Instance and Artifact Instance creation. Use the Node Instance button to create the Instance Specification with assigned Node and the Node Instance will have a Node shape.
To display specification value on the Instance Specification symbol Specification value can be optionally displayed on the Instance Specification symbol. Check box Show Specification Value is added to Instance Specification properties (select command Symbol(s) Properties from instance shortcut menu to invoke Properties dialog).
Assigning Instance Specification as Default Value quickly You can drag Instance Specification element on Classifier property on a diagram to assign it as default value. Drag and drop is available only if Instance Specification classifiers are compatible with Property type and if Property is editable.
Interaction Use
Interactions are units of behavior of an enclosing Classifier. They focus on the passing of information with Messages between the Connectable Elements of the Classifier.
803
11
MODEL ELEMENTS
Interface
A reference to the interaction can be created. Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section. To add a reference to an element
In the Interaction Use specification dialog box, click the Refers To drop down list. A
list of interactions, created in the project, opens. Click ... button, to add the interaction from the Select Element tree. Click the Create button to create a new interaction.
From the interaction use shortcut menu select the Refers To command. In the
appeared list select the interaction or create a new one. To add an actual gate
1. Add a reference to the diagram, from which the diagram frame formal message is cre-
ated. 2. To the current interaction use draw an actual message with the selected formal gate.
For more information about working with gates, see Gate on page 781.
Interface
An interface is a specifier for the externally-visible operations of a class, component, or other classifiers (including subsystems) without a specification of the internal structure. Each interface often specifies only a limited part of the behavior of an actual class. The set of interfaces realized by a classifier is its provided interfaces, which represent the obligations that instances of that classifier have to their clients. They describe the services that the instances of that classifier offer to their clients. All options associated with an interface can be set in the Interface Specification dialog box.
804
11
Tab name
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Box name Function
Signal Receptions
Manage the receptions of an interface in the Signal Receptions pane. For more information about signal receptions, see Reception on page 881.
Name Type Create
Inner Elements
The model element name. the model element type. Select an element from the list. The corresponding (class, use case, interface, enumeration, data type, primitive, collaboration, or constraint) specification dialog box openss. Define the selected model element in the dialog box. Remove the selected model element from an interface.
Add class, use case, interface, enumeration, data type, primitive, collaboration, or constraint to an interface
Delete
class to an interface.
805
11
MODEL ELEMENTS
Interface
2. Suppress the attributes and operations of the interface (from the interface shortcut
menu, Presentation Options submenu, select the Suppress Attributes and Suppress Operations check boxes.).
face.
2. Suppress the attributes and operations of the interface (from the interface shortcut
menu, Presentation Options submenu, select the Suppress Attributes and Suppress Operations check boxes.).
Working with s is similar to working with classes. For more information, see Working with classes on page 742. A general information about working with shapes is offered in Chapter 5, "Working With Diagrams."
806
11
Term
807
11
MODEL ELEMENTS
Interface
In the Composite Structure diagram you cannot draw provided and required interfaces itself, but with the new functionality of MagicDraw you can display preexisting port with the required and provided interfaces as images.
Figure 321 -- Provided and required interface in the Composite Structure diagram
Lollipop and fork symbols in the Composite Structure diagram are implemented as small attachments to a Port symbol (like name label). It is not the same as the independent standalone notation of the interface, it is only part of port symbol. It is important for Composite Structure diagrams where real Interfaces (as Classifiers) can not be used. It is an optional notation, a port does not display provided or required interfaces by default. Displaying provided/required interfaces in the Composite Structure diagram
1. Create provided and required interfaces in the Class diagram. See section To draw a
Provided Interface on page 805 and section To draw a Required Interface on page 806. 2. In the Composite Structure diagram, select Related Elements from the port shortcut menu and then Display Provided/Required Interfaces. Or, in the individual Port symbol Properties dialog box, select the Show Provided Interfaces and Show Required Interfaces check boxes.
808
11
As Port can provide or require many interfaces, displayed or hidden interfaces can be managed in the Edit Compartment dialog box.
Internal transition
In all other cases, the action label identifies the event that triggers the corresponding action expression. These events are called internal transitions and are semantically equivalent to self transitions except that the state is not exited or re-entered. This means that the corresponding exit and entry actions are not performed. For more information on defining transitions, see The join vertices are used to merge several transitions emanating from the source vertices in different orthogonal regions. The transitions entering a join vertex cannot have guards or triggers. on page 877.
809
11
MODEL ELEMENTS
Lifeline
Specify the internal transition in the Transition Specification dialog box. For a detailed description of this dialog box, see Transition Specification dialog box on page 901. To define an internal transition
1. Double-click the state or select Specification from the state shortcut menu. The
internal transition. To remove the internal transition, click the Delete button. The Information Flow can be related to any relationship.
Lifeline
A lifeline represents an individual participant in the Interaction. The lifeline represents only one interacting entity. It is shown using a rectangle symbol. For more general information about working with symbols, see Chapter 5, "Working With Diagrams."
810
11
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Set a general information about the lifeline. Box Owner Represents Function
The name of the interaction, which owns a lifeline. The property name, which represents a lifeline in an interaction.
811
11
MODEL ELEMENTS
Lifeline in the Sequence Diagram
When an object receives a message, an activity starts in that object. An activation (focus of control) shows the period during which an object is performing an action either directly or through a subordinate procedure. The activation bar is used to denote that activity. To change the activation bar size
1. Click the desired activation bar on the Diagram pane.
NOTE
2. Drag the activation bar to the desired direction. After resizing, the lines on the activation bar are thickened, but the size may not change automatically.
To add a recursive message to a lifeline Click the Recursive Message button on the diagram toolbar and click the lifeline on the desired place where you wish to draw this message.
812
11
Link
Link is instance specification with assigned classifier - association. An instance specification whose classifier is an association represents a link and is shown using the same notation as for an association, but the solid path or paths connect instance specifications rather than classifiers. End names can adorn the ends. Navigation arrows can be shown, but if shown, they must agree with the navigation of the association ends. You can show role names and navigability on the link symbol (seeFigure 323 on page 813). Properties Show End A, Show End B, and Show Navigability are added to link shortcut menu and symbol properties. These properties are displayed according classifier association.
Manifestations
An artifact embodies or manifests a number of model elements. It owns the manifestations, each representing the utilization of a packageable element. To create the manifestations, simply draw the Manifestation link from an artifact to a component.
813
11
MODEL ELEMENTS
Message
To display the manifested artifacts on the component shape From the component shortcut menu select Presentation Options and then clear the Suppress Artifacts check box.
Message
A Message is an element that defines one specific kind of communication in an Interaction. A communication can be, for example, raising a signal, invoking an Operation, creating or destroying an Instance. The Message specifies not only the kind of communication given by the dispatching Execution Specification, but also the sender and the receiver. A message is shown as a line from the sender message end to the receiver message end. The form of the line or arrowhead reflect the properties of the message:
Name
Function
Asynchronou s Message
814
11
Name
Function
Synchronous Message
The operation that should be completed before the caller resumes the execution. A call message represents the request to invoke a specific operation. A send message specifies the sending of a request to invoke a specific operation. The reply message returns the values to the caller of the previous call, completing the execution of the call. A create message specifies the creation of a specific operation. Destroy message represents the destruction of the instance described by the lifeline. The message is connected directly to an object (not lifeline). A large X mark is displayed on the objects lifeline in the messages destination.
Call Message
Send Message
Reply Message
Create Message
Destroy Message
815
11
MODEL ELEMENTS
Message
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box name Signature Owner Send Event Function
The definition of the message sort, depending on its type. Note that this field is not editable. The name of the interaction, which owns the message. The name of the sender interaction.
816
11
Tab name
Function
The name of the receiver interaction. The type of the action: synchCall, asynchCall, asynchSignal, . Click the button to select a type from the list:
synchCall asynchCall asynchSignal createMessage deleteMessage reply
Arguments
A list of arguments opens. Select an argument and specify the value in the Argument field. Removes an argument from the list. Move the selected item to an upper position. Move the selected item to a lower position.
817
11
MODEL ELEMENTS
Message
command.
2. Increase, decrease, and/or change the level of numbering in the Change Communi-
Figure 325 -- Change Communication Numbering dialog box Box name Number Name Edit Function
The number of the message. The type, name of the action of the corresponding message. The Type Number dialog box opens. Type the number of the message.
818
11
Function
Increases the selected number to one point. Decreases the selected number to one point. Saves changes and exits the dialog box. Exits the dialog box without saving changes. Displays the MagicDraw Help.
819
11
MODEL ELEMENTS
Message
2. Select it on the diagram pane. Click on the smart manipulator at the end of the mes-
3. The new operation, the name of which is as same as that of the message, is created.
The parameters, if provided, are added to the operation. -or From the message shortcut menu, select the Create New Operation command.
NOTE:
The possibility to create a new operation exists only if the lifeline to which the message is drawn has an assigned type. The type element is not a read only type and it may have operations.
the message name to create a new signal reception. 4. The new signal reception, the name of which is as same as that of the message, is created for a type of a lifeline. The parameters, if provided, are added to the signal reception.
820
11
-or-
From the message shortcut menu, select the Create New Signal Reception
command.
select the Show Predecessors check box. To change the activator number of the messages
1. Select the Activator command from the current message shortcut menu. 2. Select the number of activators that you want to assign for the current message and
predecessors. NOTE:
If you change the activator number to one of the predecessor message, this number also changes for other predecessors.
Define the selected message in the Message Specification dialog box. For a detailed description of this dialog box, see Section Message Specification dialog box on page -816.
821
11
MODEL ELEMENTS
Message in Sequence Diagram
822
11
Figure 326 -- Nested activation 2. Modeling of parallel execution for an active object. Create an outgoing message for the activation that has the Show Entire
823
11
MODEL ELEMENTS
Message in Sequence Diagram
Figure 327 -- Parallel execution for an active object 3. Modeling of callback messages. Create an incoming message (the modeled callback message) for the
activation that has an outgoing message to the activation for which the modeled message acts as an outgoing message.
Select the created message and select the Create Nested Activation
824
11
Model
A model contains a (hierarchical) set of elements that together describe the physical system being modeled. It may also contain a set of elements that represents the environment of the system, typically Actors, together with their interrelationships, such as Associations and Dependencies. A model is presented as a package with a small triangle in the upper right corner of the large rectangle. The triangle can be shown in the tab.
825
11
MODEL ELEMENTS
Node
Themodel is defined as a package it has package properties - in the Model Specification dialog box. For a detailed description of packages, see Package on page 842.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Node
Any computer or device that is relevant to the implemented system can be shown as a node. The node is drawn as a three-dimensional cube with a name inside it. Devices in a system are typically represented with a stereotype that specifies the device type. The nodes can be represented as types and as instances. It is shown as a figure that looks like a 3-dimensional view of a cube. For more information about working with symbols, see Chapter 5, "Working With Diagrams."
826
11
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Function
Name of the port. Type, assigned to the port. The provided classifier is displayed. The required classifier is displayed. The name of classifier, owning a port. Create a new port. Remove an existing port from the node.
827
11
Tab name
MODEL ELEMENTS
Node
Function
Deployed Artifacts
Name of the deployed artifact. Type of the item - artifact. Add an artifact to the list. Remove an artifact from the list. Name of the behaviors. Type, assigned to the behavior. Select an item from the list - activity, interaction, and state machine. Remove a behavior from the class. Name of the nested node. Type of the classifier (class, interface, etc.). Click button to open the classifier
Behaviors
Nested Nodes
Name Type
Select a node, device, or execution environment from the list. The element Specification dialog box opens. Remove a node from the list. The model element name. The model element type. Select an element from the list. The corresponding specification dialog box openss. Define the selected model element in the dialog box. Remove the selected model element from the node.
Delete
828
11
829
11
MODEL ELEMENTS
Node
830
11
A sequence node is a structured activity node that executes its actions in order. A loop node is a structured activity node that represents a loop with the setup, test, and body sections.
Object
To convert a pin to an object:
1. Draw an Input, Output, or Value Pin on the Action:
2. Select an Output, Input or Value Pin on the diagram pane and from its shortcut menu
831
11
MODEL ELEMENTS
Object Flow
Object Flow
To split an Object Flow:
1. Draw an Object Flow relation between two Actions.
2. From the Object Flow shortcut menu, select the Split Object Flow command.
Object Node
An object node is an activity node that indicates an instance of a particular classifier, possibly in a particular state, may be available at a particular point in the activity. It can be used in a variety of ways, depending on where the objects are flowing from and to, as described in the semantics section. For more information about working with symbols, see Chapter 5, "Working With Diagrams."
832
11
Define the selected object node in the Central Buffer Node Specification dialog box.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box name Type Function
A list of classifiers. Select a classifier you wish to assign to an object node shape. Click the button to open the Select Element dialog box for selecting the type from the elements tree. Click the ... button to assign an existing final state or state from the model in the Select Elements dialog box, or click Create for defining a new one.
833
11
MODEL ELEMENTS
Opaque Behavior
cation dialog box opens. Specify a new state, which will be assigned to an object node.
Opaque Behavior
A behavior with implementation-specific semantics. The Opaque Behavior is introduced for implementation-specific behavior or for use as a place-holder before one of the other behaviors is chosen. To create a new Opaque Behavior:
1. In the Browser, select a package. 2. From the package shortcut menu, select New Element and then Opaque Behavior.
Enter the name for a newly created element. To create an Opaque Behavior symbol Drag and drop the selected Opaque Behavior element from the Browser tree on the Diagram pane.
834
11
Operation
Entries in the operation compartment are strings that show the operations defined on classes as well as those that are supplied by the classes. An operation is a service that can be requested to perform by an instance of the class. It has a name and a list of arguments. Usually class attributes are accessed through the operations. The operations are used to perform specific actions, such as system calls, utility functions, and queries. The operation signature provides all information needed to use that operation. To create a new operation
Double-click the selected class or select Specification from the class shortcut menu.
The Class Specification dialog box opens. Click the Operations tab and then click the Create button. The Operation Specification dialog box opens. Define a new operation and click OK.
Select Insert New Operation from the class shortcut menu. Type an operation name
manipulation button. Define an operation in the Operation Specification dialog box. To open the Operation Specification dialog box
1. Double-click the class /actor or select Specification from the class/actor shortcut
menu. The Class Specification / Actor Specification dialog box opens. 2. Click the Operations tab. Double-click the desired operation in the tree, or click the Create button. The Operation Specification dialog box opens.
835
11
MODEL ELEMENTS
Operation
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Set a general information for the operation Box Owner Function
Shows a class, which contains the current operation. The value of the Owner field cannot be changed. It is automatically defined when an operation is created. Shows an operation type. It can be another project class or primitive type such as int or double. Select the type from the list or create a new one by clicking ... button. Click the ... button to open the Select Elements dialog box. The Activity, Interaction, or State Machine elements can be assigned from the model.
Type
Method
836
11
Tab name Parameters
Function
Shows the parameter name. Shows the parameter type. It can be a classifier or a data type. An expression whose evaluation yields a value to be used when no argument (operation) is supplied for the parameter. Specifies what kind of parameter is required:
return - return parameter. in - an input parameter (may not be modified). out - an output parameter (can be modified to
Direction
Move the list up. Move the list down. The Parameter Specification dialog box opens. Removes the parameter.
operation type.
Type a colon : and the name of the operation type just after the operation name on
the diagram pane. If you specify a nonexistent type of an operation, a new class is created.
837
11
MODEL ELEMENTS
Operation
Parameter. The Parameter Specification dialog box opens. The Parameter Specification dialog box The Parameter Specification dialog box defines an operation argument. To open the Parameter Specification dialog box
1. Open the Operation Specification dialog box.
838
11
2. Click the Parameters tab, expand tree, and then double-click the desired parameter.
Click the Show Expert Properties button for showing more properties of the parameter. Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Set general information about the parameter Box Owner Type Function
The name of the operation, which contains the parameter. Shows the parameter type. It can be a classifier or a data type. Select a type from the list or create a new one by clicking the ... button.
839
11
Tab name
MODEL ELEMENTS
Operation
Function
Default Value
An expression whose evaluation yields a value to be used when no argument (operation) is supplied for the parameter. Select the direction kind:
return - return parameter. in - an input parameter (may not be modified). out - an output parameter (can be modified to
Direction
The operation does not have an implementation, and one must be supplied by a descendant. This operation scope means that the values returned by the parameter have no duplicates. The operation does not change the state of the system.
840
11
show. 3. Select the Is Abstract, Is Static, and/or Is Query check box(es) in the General tab. To set the operation visibility
Visibility name Public + Package ~ Private - Protected # Function
The operation can be accessed by any other object from the outside. The operation can be accessed by an element from the same package. The operation can be accessed only from that class. The operation can be accessed from the inside of that class and the classes derived from that class.
1. Open the Operation Specification dialog box. 2. From the Visibility drop-down list box, select Public, Package, Private, or Pro-
tected.
NOTE
841
11
Name Sequential
MODEL ELEMENTS
Package
The callers must coordinate, so that only one call to an Instance (on any sequential Operation) is made at a time. If simultaneous calls occur, then the semantics and the integrity of the system can not be guaranteed. Multiple calls from concurrent threads may occur simultaneously to one Instance (on any guarded Operation), but only one is allowed to commence. The others are blocked until the performance of the first Operation is complete. It is the responsibility of the system designer to ensure that deadlocks do not occur due to simultaneous blocks. The Guarded Operations must perform correctly (or block themselves) in case a simultaneous sequential Operation or guarded semantics cannot be claimed. Multiple calls from concurrent threads may occur simultaneously to one Instance (on any concurrent Operation). All of them may proceed concurrently with correct semantics. The Concurrent Operations must perform correctly in case a simultaneous sequential or the guarded Operation, or concurrent semantics cannot be claimed.
1. Open the Operation Specification dialog box. 2. Select the Expert mode from the Properties field. More properties for the operation
Guarded
Concurrent
show.
3. Select the concurrency type in the Concurrency drop-down list box.
Package
A package groups classes and other model elements together. All types of UML model elements can be organized into packages. Each diagram must be owned by one package and the packages themselves can be nested within other packages. Subsystems and models are special kinds of packages. The packages may have dependency, generalization, realize, containment, and association relationships. These relationships are usually derived from the relationships between the classes inside those packages.
842
11
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section. To add inner elements to the selected package
1. Open the Package Specification dialog box. 2. Click the Inner Elements tab. 3. Click the Create button, and then click an element you wish to add. 4. After selecting the element, the corresponding element Specification dialog box
opens. If you select a diagram, the Diagram Specification dialog box opens.
5. Define the information and click Back to return to Package Specification.
843
11
MODEL ELEMENTS
Parameter
To change the package header (name, stereotypes, tagged values, and constraints) position
From the package shortcut menu, select Header Position and then Top or In Tab. Select Symbol(s) Properties from the package shortcut menu, and then Header
Position Top or In Tab in the Properties dialog box. To show the list of elements assigned to a package on the package shape
Select Show Elements List from the package shortcut menu.
Parameter
Parameters synchronization with Arguments
After you have modeled certain references between elements, arguments will be created automatically according to the parameters. Such synchronization increases modeling speed and helps to avoid invalid models. The table below lists parameter and argument synchronizations.
Link to synchronization description 1
"Synchronization between Operation parameters and Behavior parameters" "Synchronization between Activity parameters and Activity Parameter Nodes" "Synchronization between Operation parameters and pins on Call Operation Action"
844
11
4
"Synchronization between Interaction parameters and Interaction Use arguments". "Synchronization between Interaction Parameters and Lifelines"
Created arguments have the same number, order, and name as the parameters. Some properties of the parameters are cloned to argument properties, such as name, type, direction, and multiplicity for a particular argument. Changes made in parameters are reflected in arguments. Changes to arguments are not reflected in parameters. Exception: synchronization between Activity Parameters and Activity Parameter Node. When synchronization case is removed, arguments created on synchronization are not removed, but synchronization between parameters and arguments is not working anymore. For synchronization to work it should match criteria, such as number, order, or other criteria that should be the same for the parameter and argument. To turn on/off the parameters and arguments synchronization for the whole project,select/clear the Auto synchronize Parameters and Arguments check box in the Project Options dialog box. After the synchronization is turned off, arguments will not be created and modified on parameters creation and modification. By default the Auto synchronize Parameters and Arguments check box is selected. The new in MagicDraw 15.5 Active Validation functionality improves the parameters and arguments synchronization. Active Validation functionality displays unsynchronized elements on diagram pane and in Browser. You can also use the Parameters Synchronization dialog for automatic and manual synchronization solving. For more information about the active validation see "Active Validation", on page 551.
845
11
MODEL ELEMENTS
Parameter
parameters is changed, the order of Arguments is changed too. This is valid if arguments have ordering possibility. 3. The same properties. The parameter properties should be the same as the argument properties. Such as name, type, multiplicity, direction. 4. Properties change. Change the parameter property and the argument property changes. Some of the properties are changed only the first time and after the second change the parameter property is not changed and synchronization is not performed anymore. 5. Each couple of parameters and arguments should be synchronized. If one of them is not synchronized, the other is not synchronized as well. Note that synchronization is checked in element scope.
846
11
Term
operation;
Behavior - Activity,
Function Behavior, Interaction, Opaque Behavior, Protocol State Machine, State Machine.
Synchronization between operation parameters and behavior parameters works in the following way: after you have assigned a behavior to the operation with parameters, arguments to the behavior will be created automatically. How synchronization works After the operation parameters have been modified, arguments change in the following way:
Create operation parameter - argument is created and properties cloned according to
according to parameter properties only on the first parameter name change. For example, for operation create not named parameter. Assign behavior as method to the operation. To behavior not named parameter is created. Now name the operation parameter. Behavior parameter name automatically changes to the operation parameter name. Change the operation parameter the second time. The title of behavior parameter is not changed.
Remove operation parameter - behavior argument is removed if it does not have links
or values. For example, operation parameter is synchronized with activity parameter. Activity parameter is included to other synchronization - activity parameter is synchronized with activity parameter node (see Synchronization between Activity parameters and Activity Parameter Nodes on page 851). In this case, after the
847
11
MODEL ELEMENTS
Parameter
operation parameter is removed, the activity parameter is not removed, because it has link. Validation of Synchronization Synchronization between Parameter and Argument is valid when:
The type is compatible. The type of parameter and behavior parameter should be
compatible. This means that the type of operation parameter and the type of behavior parameter should be the same or inherited.
The direction is the same. The direction of the operation parameter and the behavior
behavior parameter should be the same. If one of the rules is not valid, operation parameters and behavior parameters will not be synchronized anymore. Sample
1. Create a class named Computer, with an operation called Collect, and with parame-
848
11
Figure 335 -- Project before synchronization 3. Assign activity diagram Collect Computer to the operation Collect as behavior. To do
this from the operation shortcut menu in the Browser, select the Behavior Diagram and then Assign. Activity of activity diagram is assigned as a method to the operation
849
11
MODEL ELEMENTS
Parameter
automatically. The text after the name of activity will appear in the Browser: specifies Collect.
Figure 336 -- Project after synchronization between Operation Parameters and Behavior Parameters 4. The following operation parameters are created to the activity of activity diagram
automatically: Accepted Computers, Production Materials, Rejected Computers. The Collect operation parameters are synchronized with Collect Computer activity parameters.
850
11
Terms
Argument - Activity Parameter Node. Synchronization between activity parameters and activity parameter nodes works in the following way: after you have created a parameter to the activity, an activity parameter node of the activity will be created automatically. How synchronization works How synchronization works on parameter edit:
Create a parameter in the activity. After you have created the parameter, the
argument for parameter will be created automatically. If the parameter direction is inout - two activity parameter nodes will be created.
Remove a parameter from the activity. After you have removed the parameter from
the activity, the argument will be removed as well. If two arguments were created for one inout parameter, both arguments will be removed.
851
11
MODEL ELEMENTS
Parameter
dialog box appears. Select the existing activity parameter or click the Create button to create a new one.
parameter node from the activity, the assigned activity parameter will be removed as well.
NOTES
In the Select Activity Parameters dialog box, the following activity parameters are not displayed:
Inherited parameters Parameters which already have Activity Parameter Nodes.
Sample
1. In the Collect Computer activity create Accepted Computers parameter. 2. The Accepted Computers activity parameter node is created in activity automatically.
852
11
.
853
11
Terms
MODEL ELEMENTS
Parameter
Argument - Pin of Call Operation Action; Pin of Call Behavior Action. How synchronization works How synchronization works on parameter edit:
854
11
Action or to the Call Behavior Action will be created automatically. If parameter direction is inout, two Pins to one parameter will be created.
Remove parameter. After parameter is removed, the argument is removed
automatically if it does not have links or values. How synchronization works on argument edit:
Create pin. Create to the Call Operation Action or the Call Behavior Action input or
output pin. The Select Operation Parameter dialog box appears for the Call Operation Action element and the Select Behavior Parameter dialog box appears for the Call Behavior Action.
arguments and after you have changed properties, no changes will be done to the parameters. Synchronization validation Synchronization between Parameters and Argument is valid if:
The direction is compatible. The parameter direction and the pin direction should be
compatible.
855
11
Sample
MODEL ELEMENTS
Parameter
The types are compatible. The parameter type and the pin type should be the same
or inherited.
Figure 340 -- Project before synchronization 2. Create the call operation action named Determine users that have reserved book.
856
11
3. Assign an operation to the call operation action. Pins to the call operation action will
be created automatically.
Figure 341 -- Project after synchronization between Operation Parameter and Pin of Call Operation Action
Argument - Interaction Use Argument, Message Arguments. Synchronization between interaction parameters and interaction use arguments works in the following way: after you have reffered an interaction use to the interaction with parameter, an argument to the interaction use will be created automatically. The parameter of interaction is synchronized with interaction use argument. Synchronization between operation parameter and message arguments works in the following way: after you have created the message with an assigned operation, the arguments to the message will be created automatically.
857
11
MODEL ELEMENTS
Parameter
Sample
1. Create a class with Collect operation and with Production Material parameter. Create
the sequence diagram. Draw a lifeline with assigned type - Computer class. To the lifeline, draw a call message.
858
11
2. Assign the Collect operation to the call message. An argument will be added to the
message automatically. To see the created argument, open the Message specification dialog box and select the Arguments branch. In the sequence diagram on the message, you can see the parameter name with argument name (in this example, the argument is not named).
859
11
MODEL ELEMENTS
Parameter
860
11
Displaying parameters as lifelines in already existing sequence diagram You can also display parameters as lifelines in already existing sequence diagram:
1. From the sequence diagram shortcut menu, select Related Elements and thenselect
Display Parameters as Lifelines. The Display Parameters as Lifelines dialog box appears. 2. Select parameters and click OK. 3. Lifelines for the selected parameters are created. Sample
1. Create an interaction with a parameter.
861
11
MODEL ELEMENTS
Parameter
2. In the Interaction, create the sequence diagram. The Display Parameters as Life-
Figure 346 -- The Display Parameters as Lifelines dialog box 3. Select parameters, which will be created as lifelines in the sequence diagram. Click
OK.
4. Lifelines are created in the interaction, which is drawn on the sequence diagram.
862
11
There are two ways to open the Parameter Synchronization dialog box:
Select the not synchronized element in the Browser. From the shortcut menu, select
the Validation > validation group > Parameter Synchronization dialog opens.
Select the invalid element on the diagram. In the symbol smart manipulator, click the
invalid element indicator. From the menu that open, select the Parameter Synchronization dialog (see Figure 349 on page 864).
863
11
MODEL ELEMENTS
Parameter
The parameters synchronization dialog box presents the elements those parameters and arguments are not synchronized and provides the possibility to restore the synchronization. In the Parameters Synchronization dialog box, the parameters with arguments are synchronized according to the general synchronization rules, which are described in Rules of synchronization between parameters and arguments on page 846. The Parameters group presents information about particular element parameters (see Figure 350 on page 865) and the Arguments group presents information about particular element arguments (see Figure 351 on page 866). To edit the parameter or argument, click on the icon in the Edit column (see Figure 352 on page 867). The Is In Synch? column displays if parameter and argument are synchronized (see Figure 353 on page 868). Green tick indicates that parameter and argument are synchronized. Red cross indicates that parameter and argumetn are not synchronized.
864
11
865
11
MODEL ELEMENTS
Parameter
866
11
867
11
MODEL ELEMENTS
Parameter
Automatic Synchronization To synchronize parameters with arguments automatically, in the Parameters Synchronization dialog box, click the Automatic Synchronization button (see Figure 354 on page 869). According to the available synchronization the following available commands appears:
1. Synchronize Parameters with Arguments by restoring initial order and creating miss-
ing ones.
Missing arguments will be created. Not synchronized Arguments order will be changed and not synchronized
868
11
Manual Synchronization You can manualy synchronize parameters with arguments using the Up/Down/Remove buttons or click the Manual Synchronization button (see Figure 355 on page 871). Click the Up/Down/Remove buttons to move up/down or remove parameters or arguments.
869
11
MODEL ELEMENTS
Parameter
In the Parameters Synchronization dialog box table select not synchronized parameter/ argumet and click the Manual Synchronization butoon to synchronize manualy. See the description of the manual synchronization commands in the table bellow.
Command <-Clone Clone-> <-Update Description
Select the <-Clone command to create parameter with the same properties. Select the Clone-> command to create parameter with the same properties. Select the <-Update command to update parameter not synchronized properties in order to be synchronized. The Update item is available if argument exist and there are properties to update. Select the <-Update command to update argument not synchronized properties in order to be synchronized. The Update item is available if parameter exist and there are properties to update.
Update->
870
11
Port
A port is a property of a classifier that specifies a distinct interaction point between that classifier and its environment, or between the (behavior of the) classifier and its internal parts. Ports are connected to the properties of the classifier by connectors through which requests can be made to invoke the behavioral features of the classifier. A Port may specify the services a classifier provides (offers) to its environment as well as the services that a classifier expects (requires) from its environment. It has the ability to specify that any requests arriving at this port are handled.
871
11
MODEL ELEMENTS
Port
The Class model element and Component model elements may have any number of Ports. Define a port in the Port Specification dialog box.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Set a general information for the port. Box Owner Is Behavior Function
The name of a class or component, which contains the port. Specifies whether requests arriving at this port are sent to the classifier behavior of this classifier. Such a port are referred to as a behavior port. Any invocation of a behavioral feature targeted at a behavior port will be handled by the instance of the owning classifier itself, rather than by any instances this classifier may contain.
872
11
Tab name
Box Is Service
Function
If the value of the Is Service check box is true, it indicates that this port is used to provide the published functionality of a classifier. If the value of the Is Service check box is false, it indicates that this port is used to implement the classifier but is not part of the essential externally. Shows the name of the provided/required interface. Shows the type of the interface that specifies a port. Drop down menu opens. Select the Provided or Required item and select an interface in the open Select Interface dialog box. Removes an item from the Provided/Required Interfaces list.
Provided/Required Interfaces
Remove
play from All to the Selected list. To draw a Port In the Implementation diagram toolbar, select a Port element to draw on a class shape.
873
11
MODEL ELEMENTS
Pseudo State
Draw a Realize path from a port to an interface to depict the Provided Interface. Draw Usage path from port to interface to depict Required Interface.
Pseudo State
The Pseudo state is typically used to connect multiple transitions into more complex state transitions paths. For example, by combining a transition entering a fork pseudo state with a set of transitions exiting the fork pseudo state, we get a compound transition that leads to a set of orthogonal target states. For more information about working with symbols, see Chapter 5, "Working With Diagrams."
874
11
Figure 357 -- Pseudo State Specification dialog box Tab name General Property Owner Kind Function
The region, containing a pseudo state. The kind, showing the purpose of the pseudo state.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Initial
Every object belongs to a particular state as soon as it is created. So, it is useful to explicitly show that particular state. A solid filled circle represents the initial state of an object. There can only be one initial state for an object. The initial state denotes the starting place for a transition, the target of which is a composite state.
875
11
MODEL ELEMENTS
Pseudo State
Final state
The final state symbol (a circle surrounding a smaller solid circle) is used to represent the object destruction. The final state is optional in the diagram because there is a system that runs without interruption after the start of the activities. Also, there can be several final states in the same state diagram, denoting that the life of the object may finish depending on several conditions.
Terminate
Entering a terminate pseudo state implies that the execution of the state machine by means of its context object is terminated. The state machine does not exit any states nor does it perform any exit actions other than those associated with the transition leading to the terminate pseudo state.
Entry Point
An entry point connection point reference as the target of a transition implies that the target of the transition is the entry point pseudo state as defined in the submachine of the submachine state. As a result, the regions of the submachine state machine are entered at the corresponding entry point pseudo states.
Exit Point
An exit point connection point reference as the source of a transition implies that the source of the transition is the exit point pseudo state as defined in the submachine of the submachine state that has the exit point connection point defined. When a region of the submachine state machine has reached the corresponding exit points, the submachine state exits at this exit point.
Deep History
The Deep History represents the most recent active configuration of the composite state that directly contains this pseudo state; e.g. the state configuration that was active when the composite state was last exited. A composite state can have at most one deep history vertex.
876
11
Shallow History
The Shallow History represents the most recent active substate of its containing state (but not the substates of that substate). A composite state can have at most one shallow history vertex. A transition coming to the shallow history vertex is equivalent to a transition coming to the most recent active substate of a state.
Junction
The junction vertices are semantic-free vertices that are used to chain multiple transitions together. They are used to construct the compound transition paths between states. For example, a junction can be used to combine multiple incoming transitions into a single outgoing transition representing a shared transition path (this is known as merge). Conversely, it can be used to split an incoming transition into multiple outgoing transition segments with different guard conditions.
Choice
The choice vertices, when reached, result in the dynamic evaluation of the guards or the triggers of its outgoing transitions. This realizes a dynamic conditional branch. It allows splitting of transitions into multiple outgoing paths such that the decision on which path to take may be a function of the results of prior actions performed in the same run-to-completion step.
Fork/Join
The fork vertices are used to split an incoming transition into two or more transitions terminating on the orthogonal target vertices (i.e. vertices in different regions of composite state). The segments going out of a fork vertex must not have guards or triggers. The join vertices are used to merge several transitions emanating from the source vertices in different orthogonal regions. The transitions entering a join vertex cannot have guards or triggers.
877
11
MODEL ELEMENTS
Realization
Realization
The realization is a specialized abstraction relationship between two sets of model elements, one represents a specification (the supplier) and the other represents an implementation of the latter (the client). The realization can be used to model stepwise refinement, optimizations, transformations, templates, model synthesis, framework composition, etc. The realization relationship is drawn as a dashed line with a solid triangular arrowhead (a dashed generalization symbol). The client (the one at the tail of the arrow) supports at least all of the operations defined in the supplier (the one at the arrowhead), but not necessarily the data structure of the supplier (attributes and associations). For more information about working with symbols, see Chapter 5, "Working With Diagrams." The realization paths can be grouped in a tree. This feature makes the appearance of the diagram more structural and understandable.
NOTE
triangular arrowhead. An Interface Realization is a specialized Realization relationship between a Classifier and an Interface. This relationship signifies that the realizing classifier conforms to the contract specified by the Interface.
Realization. A solid line that represents a relationship
<<substitute>> stereotype. A substitution is a relationship between two classifiers. It signifies that the substituting classifier complies with the contract specified by the contract classifier. This implies that instances of the substituting classifier are runtime substitutable where instances of the contract classifier are expected.
878
11
To create a realization tree if a class or an interface already has a number of realization paths attached to it
Select the Make Sub Tree command from the class or the interface shortcut menu.
shortcut menu.
Select a tree head and select the Ungroup Tree command from the tree shortcut
menu. To specify the selected realization path in the Specification dialog box
Double-click the path. Select Specification from the path shortcut menu. Select the path and press ENTER.
879
11
MODEL ELEMENTS
Realization
Realization and its kinds Specification dialog boxes The realization, interface realization, and substitution relationships are defined in the dialog box of the same structure. They differs from one another only by the corresponding Specification name..
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box Source Target Mapping Function
The name of the child element. The name of the parent element. Type a value, or click the ... button and edit the value in the Edit Mapping dialog box. Note: Available in the Substitution Specification dialog box only.
880
11
Creating the realizing classifiers The realizing classifiers are a set of Realizations owned by the Component. The Realizations reference the Classifiers of which the Component is an abstraction (i.e., that realize its behavior). To create a Realization relationship between a component and a classifier:
1. Drag the classifier shape to the component shape. 2. Select a classifier or component and select Related Elements from its shortcut
menu, then select the Display Paths command. The realization relationship will be displayed on the diagram pane.
Reception
Term
The OMG UML specification (UML 2.2: Superstructure) states: A reception is a declaration stating that a classifier is prepared to react to the receipt of a signal. A reception designates a signal and specifies the expected behavioral response. The details of handling a signal are specified by the behavior associated with the reception or the classifier itself.
Signal receptions can be specified for classes or interfaces. Parent topic: Model Elements on page 685.
881
11
MODEL ELEMENTS
Reception
Related topics: Specification dialog boxes on page 265. Formatting Symbols on page 283. Class on page 741. Interface on page 804. To create a new reception
Double-click the selected class or select Specification from the class shortcut menu.
The Class specification dialog box opens. Click the Signal Receptions tab and then click the Create button. The Select Signal dialog box opens. Select a signal or create a new one. Click OK. The Signal Reception specification dialog box opens. Specify a new reception and click OK.
Select a class in the Browser tree. From the class item shortcut menu, select New
manipulation button.
NOTE The signal reception compartment is suppressed and the smart manipulator button is not visible by default.
Drag-and-drop the signal symbol on the class or interface shape in the diagram pane.
The signal reception with the assigned signal is created. You may also drag a signal from the Browser to the class or interface shape on the diagram pane. To open the Signal Reception specification dialog box
1. Open the Class specification, or the Interface specification dialog box. 2. In the Signal Receptions tab, double-click the desired signal reception in the tree, or
Refer to Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
882
11
select a signal. You may also click the ... button. In the Select Element dialog box, select a signal or click the Create button to create a new one. To display the signal reception on the diagram pane
The signal reception compartment is added to the class and interface shape. This compartment is hidden by default. To show the signal reception compartment:
From the symbol shortcut menu, select the Presentation Options command, then
element Properties dialog box, clear the Suppress Signal Receptions command. To show/hide the signal receptions in the Signal Reception compartment
Select the Edit Compartment command from the symbol shortcut menu. Select the Signal Reception command. The Edit Compartment dialog box opens. Only those signal receptions will be displayed in the Signal Reception compartment that are displayed in the Selected list.
element Properties dialog box, clear the Suppress Signal Receptions check box.
883
11
MODEL ELEMENTS
Send Signal Action
continues the execution immediately. Any reply message is ignored and is not transmitted to the requester. For more information about working with symbols, see Chapter 5, "Working With Diagrams." Define the selected send signal action in the Send Signal Action Specification dialog box.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box name Signal Function
Click the ... button to assign an existing signal from the model in the Select Elements dialog box, or click Create to assign a new one.
884
11
State
A state is a condition during the lifetime of an object or an interaction during which the object meets certain conditions, performs an action, or waits for an event. The state is defined by the concepts of duration and stability. An object may not be in an unknown or undefined state. A state may have two compartments to provide more information about that state:
The first compartment is the name compartment, it contains the state name, for
actions of the state. For more information about working with symbols, see Chapter 5, "Working With Diagrams."
885
11
MODEL ELEMENTS
State
MagicDraw supports four types of states: State, Composite State, Orthogonal State, and Submachine State. Define the selected state in the Composite State Specification dialog box.
886
11
Tab name General
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Box name State Invariant Connection Actions group box Entry Behavior Type Behavior Element Function
Contains the state actions, events and buttons for editing the list.
Type text or click ... to open the Edit State Invariant dialog box. Click + to open the Connection Point Reference dialog box. Specify the information for the connection.
Select a type from the activity, interaction, or state machine items list. Click ... and select an element from the activity, interaction, or state machine items list. The corresponding dialog box opens. Select a type from the activity, interaction, or state machine items list. Click ... and select an element from the activity, interaction, or state machine items list. The corresponding dialog box opens. Select a type from the activity, interaction, or state machine items list. Click ... and select an element from the activity, interaction, or state machine items list. The corresponding dialog box opens. The name of the inner state. The type of the inner state. The region, to which an inner state was added.
Inner States
887
11
Tab name Internal Transitions
MODEL ELEMENTS
State
Function
The name of the internal transition. The Transition Specification dialog box opens. Define the transition. Remove the selected transition from the state.
A set of transitions that, if triggered, occurs without exiting or entering the state.
To display region name on the state symbol Region name can be optionally displayed on the State symbol on a diagram. To display or hide region name:
On a diagram from the State symbol shortcut menu check or clear the Show Region
box.
888
11
added and the state shape enlarges. To change the state to the orthogonal state
1. From the State diagram toolbar, select the State to draw on the diagram pane. 2. From the state shortcut menu, select the Add New Region command. The region is
889
11
MODEL ELEMENTS
State
3. Open the state shortcut menu again and add the second region to the state.
ing State Machine from the list, or click New to create a new one.
NOTE :
To change the state to the submachine state, all regions from the state should be removed. To do this, select the state on the diagram pane and from the shortcut menu, select the Remove Region command.
Composite State
A composite state either contains one region or is decomposed into two or more orthogonal regions. Each region has a set of mutually exclusive disjoint subvertices and a set of transitions. A given state may only be decomposed in one of these two ways. Any state enclosed within a region of the composite state is called a substate of that composite state. It is called a direct substate when it is not contained by any other state; otherwise it is referred to as an indirect substate. Each region of the composite state may have an initial pseudostate and a final state. A transition to the enclosing state represents a transition to the initial pseudostate in each region. For more information about working with symbols, see Chapter 5, "Working With Diagrams." Define the selected composite state in the State Specification dialog box. For a detailed description of this dialog box, see State Specification dialog box on page 886. For more information on working with states, see State on page 885. To add a new region to the composite state
Select Add New Region from the composite state shortcut menu.
890
11
To remove a region from the composite state (at least two regions have to be left)
Select Remove Region from the composite state shortcut menu and select a region you want to remove.
Submachine
A submachine state specifies the insertion of the specification of a submachine state machine. The state machine that contains the submachine state is called the containing state machine. The same state machine may be a submachine more than once in the context of a single containing state machine. The submachine state is semantically equivalent to a composite state. The regions of the submachine state machine are the regions of the composite state. The entry, exit, behavior actions, and internal transitions, are defined as part of the state. The submachine state is a decomposition mechanism that allows factoring of the common behaviors and their reuse. For more information about working with symbols, see Chapter 5, "Working With Diagrams." Define the selected submachine in the State Specification dialog box. For a detailed description of this dialog box, see State Specification dialog box on page 886. For more information on working with states, see State on page 885.
the diagram pane on the submachine state shape. The Select Entry/Exit Point dialog box opens. 2. Select entry point to define the entry into the submachine state or exit point to define the exit from the submachine state. The Connection Point Reference is drawn on the submachine state with a defined entry or exit point.
891
11
MODEL ELEMENTS
State
To see the assigned entry/exit point, open the Connection Point Reference dialog box. The Entry or Exit properties will display the defined entries. To assign the entry/exit points to the Connection Point Reference Select the Connection Point Reference on the diagram pane. Open the shortcut menu and select the Select Entry/Exit Point command.
NOTE:
In the Select Entry/Exit Point dialog box, only these entry and exit points are listed, which are created at the same State Machine as the submachine state. If there are no entry/exit points at the same state machine, the Select Entry/Exit Point dialog box is not opened when drawing the Connection Point Reference.
opens. Type the condition and close the dialog box by submitting changes. The State Invariant value is displayed on the diagram pane on the state shape in brackets:
892
11
In the Do Activity, Entry or Exit group, the Behavior Type combo box, assign one of the behaviors: Activity, Interaction, or State Machine.
Subsystem
A subsystem is treated as an abstract single unit. It groups model elements by representing the behavioral unit in a physical system. To draw a subsystem
1. In the Use Case diagram toolbar, select the Subsystem element to draw.
893
11
MODEL ELEMENTS
Swimlane
Swimlane
Actions and subactivities can be organized into swimlanes in the activity diagrams. The swimlanes are used to organize responsibility for actions and subactivities according to the class. They often correspond to the organizational units in a business model. The swimlanes limit and provide a view on the behaviors invoked in the activities. They consist of one or more partitions. They may be vertical and horizontal. An activity diagram can be divided visually into swimlanes, each separated from the neighboring swimlanes by vertical or horizontal solid lines on both sides. Each swimlane represents a responsibility for part of the overall activity, and may eventually be implemented by one or more objects. The relative ordering of the swimlanes has no semantic significance, but may indicate some affinity. Each action is assigned to one swimlane. Transitions may cross lanes. There is no significance to the routing of a transition path.
894
11
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
Tab name General Box name Owner Function
Shows the name of the activity diagram where the partition is placed.
Click the ... button to open the Select Elements dialog box. Assign a model element that represents the partition.
895
11
MODEL ELEMENTS
Swimlane
box.
Type the name directly on the Diagram pane.
The Horizontal and Vertical Swimlanes The following is an example of vertical swimlanes:
To add an additional partition Select a swimlane on the diagram pane and from the shortcut menu, select Insert Vertical Swimlane or Insert Horizontal Swimlane.
896
11
mand. 3. Insert as many horizontal and vertical swimlanes as you need. The following is an example of the multidimensional swimlanes:
To add model elements to a swimlane If a swimlane is already drawn in the activity diagram, drawing an action (or any other element) will highlight the swimlane in blue. This means that the action shape will depend on the swimlane symbol.
NOTE:
If the model elements depend on a swimlane symbol, they will be deleted if the swimlane symbol is deleted.
897
11
MODEL ELEMENTS
Swimlane
The multidimentional swimlanes, with added elements, shown in the Figure below.
898
11
The OMG UML specification (UML 2.2: Superstructure) states: A parameterable element is an element that can be exposed as a formal template parameter for a template, or specified as an actual parameter in a binding of a template. The OMG UML specification (UML 2.2: Superstructure) states: A templateable element is an element that can optionally be defined as a template and bound to other templates. The OMG UML specification (UML 2.2: Superstructure) states: A classifier template parameter exposes a classifier as a formal template parameter.
menu. The Class Specification dialog box opens. Click the Template Parameters tab. 2. To add or edit a parameterized class, click the Create button. The Select Template Parameter Type dialog box opens. Select the type from the model tree and click OK. 3. To remove the selected parameterized class, click the Delete button.
899
11
MODEL ELEMENTS
Template / Parameterized class
Select the Expert mode from the Properties field to show more properties of the template parameter. Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section
Tab name General Box name Parametered Element Owner Function
The name of the element, which was parametered by a template parameter. The name of the element, which contains the template parameter.
900
11
Transition
A transition is a directed relationship between a source vertex and a target vertex. It may be part of a compound transition, which takes the state machine from one state configuration to another, representing the complete response of the state machine to an occurrence of an event of a particular type. Define the selected transition in the Transition Specification dialog box.
Refer to the Specification dialog boxes on page 265 for information about the specification elements not covered in this section.
901
11
Tab name
MODEL ELEMENTS
Transition
Function
A guard is an expression that is attached to a transition as a fine-grained control over its execution. The guard is evaluated when an event instance is dispatched by the state machine. The name of the model element, which is the target of the transition. The name of the model element, which is the source of the transition. The type of the event The type of the affected action. Click ... and select an element from the activity, interaction or state machine items list. The corresponding dialog box opens.
Target Source Trigger group box Event Type Effect group box Behavior Type Behavior Element
902
11
Name
Event types
Description Any Receive Event
A transition trigger associated with AnyReceiveEvent specifies that the transition is to be triggered by the receipt of any message that is not explicitly referenced in another transition from the same vertex. A call event represents the reception of a request to cause a specific operation. It is distinct from the call action that caused it. It may cause the invocation of a behavior that is the method of the operation referenced by the call request, if that operation is owned or inherited by the classifier that specified the receiver object. A change event models an event that occurs when an explicit boolean expression becomes true as a result of a change in value of one or more attributes or associations. A change event is raised implicitly and is not the result of some explicit change event actions. An expression specifies the change event: a keyword when followed by an expression. A creation event models the creation of an object. A destruction event models the destruction of an object. An execution event models the beginning or the end of an execution occurrence. A send operation event specifies the sending of a request to invoke a specific operation on an object. A send signal event specifies the sending of a message to a receiver object. A signal event represents the reception of a particular (asynchronous) signal. The Signal Event is a child of the Event. A Time Event models the expiration of a specific deadline. Note that the time of occurrence of a time event instance (i.e., the expiration of the deadline) is the same as the time of its reception. An expression specifies the corresponding time deadline: a keyword after, followed by an expression.
Call Event
Change Event
Creation Event Destruction Event Execution Event Send Operation Event Send Signal Event Siganl Event Time Event
903
11
MODEL ELEMENTS
Use Case
typed will be the signal name. If such typed signal already exists in the project, and this signal is included in the Signal Event, the Signal Event is assigned to the transition.
Call Event. The name of the operation is displayed on a transition. If an existing
operation name is typed on the transition (if this operation is assigned to the Call Event), the Call Event in this operation will be assigned to the transition.
Change Event. To add the Change Event to a transition, type the following: when ().
Use Case
A use case represents a typical interaction between a user and a system. It captures some of the functionalities and data that the user works with. It is a type of behavioral classifier that represents a declaration of an offered behavior. Each use case specifies a type of behavior, including the variants, that the subject can perform in collaboration with one or more actors. The subject of a use case could be a physical system or any other element that may have the behavior, such as a component, a subsystem, or a class. An extension point is a reference to one location within a use case where an action sequences from other use cases can be inserted. Each extension point has a unique name within theuse case and a description of the location within the behavior of the use case. A use case is shown as an ellipse with the the name inside it. The extension points are listed in the Extension Points compartment of the use case.
904
11
Define the selected use case in the Use Case Specification dialog box.
Refer to the Specification dialog boxes on page 265 for information about specification elements..
Group name General Box Load Profile Function
Loads the Use Case description profile that contains specific extensions. NOTE
This functionality is available in Standard, Professional, Architect, and Enterprise editions only.
905
11
Group name Behaviors
MODEL ELEMENTS
Use Case
Function
The type of the created element. The name of the created element. The list of elements to create opens. Select the element and define the properties in the open properties list. Remove the selected diagram from the use case. Define a new extension point. Remove the selected extension point from the use case. Type the name for a newly created diagram. The type of the created diagram. The list of diagrams opens. Select a diagram or constraint and define properties in the open properties list. Remove the selected inner element from the use case.
From the drop down list, select an activity, state machine, or interaction to create within a use case.
Delete Extension Points Create Delete Inner elements Name Type Create Delete
From the drop down list, choose diagrams or constraints to create as an inner element of the use case.
For more information about working with symbols, see Chapter 5, "Working With Diagrams." To add an extension point for the use case
1. Open the Use Case Specification dialog box. 2. Click the Extension Points group. 3. Click Create. The Extension Point properties window opens. Here you may specify
You may create an extension point directly on a diagram: Draw an extension path between two use cases. Then click YES in the message window. Once it is created, specify its name. You may define a use case as abstract (for the detailed description, see Generalizable elements on page 787.)
906
11
907
11
IMPORTANT
MODEL ELEMENTS
Value Specification
The properties are mapped to tags, which can be listed in the Specification dialog box, Tags group. If the tags cannot be seen, apply <<requirementUseCase>> stereotype to the use case. The tag definitions from the UseCase Description profile are only visible in generated reports, not on the diagrams. For a detailed description about reports, see in Controlling Merge memory usage on page 394. For a detailed description of working with tag definitions, see in Specification dialog boxes on page 265.
To display the tag definitions from the UseCase Description profile on the diagram
1. Open the UseCase Description profile UseCase_Profile.xml as a project (this profile
its Specification dialog box. 3. In the Applied Stereotype field, remove <<InvisibleStereotype>>. 4. Save the project. 5. Reload the profile in the project you are working: from the UseCase Description Profile shortcut menu in the Browser tree, select Modules, and then Reload Module.
Value Specification
To create a Value Specification using the Browser shortcut menu Now you can create a standalone Value Specification in a model using the Browser shortcut menu. To create Value Specification from the element shortcut menu in Browser choose New Element, Value Specification (see Figure 366 on page 909). NOTE
Since MagicDraw 16.0 version Value Specifications are displayed in the Containment tree of the Browser.
908
11
909
For more information about working with toolbars, see Toolbars on page 82.
910
Title
Description
opens. Select the Blank Project icon. Specify the file name in the Name text box. Click the ... button to select a location to store the newly created project in your computer. Click OK. Open Project (Ctrl+O) Save Project (Ctrl+S) Print Active Diagram To print an open diagram. (Ctrl+P) Print Preview The Print Preview dialog box opens showing how your diagram looks before printing. Search for an element, symbol or diagram in the project according to your selected criteria. To open an existing project, press the Open Project button. To save the current project.
911
Toolbar button
Title
Description
Undo the last action you performed while drawing the diagram on the Diagram pane (moving, dragging, resizing, cutting, copying, pasting, deleting, selecting, editing shapes, setting project and shape properties, etc.). Actions are reversed in the order you have performed them. The Undo command is unavailable until you perform an action after loading an existing project or creating a new project. By default, the limit of the undo mechanism is 100 steps backwards. To change the limit, select Environment from the Options menu. The Environment Options dialog box opens. Change the Undo List Size property. Each command has an easily recognized name. You will be able to see the command history and undo or redo action history. The main window will have two lists of commands: one for the undo commands, another one for the redo commands.
Restore the Undo action (moving, dragging, resizing, cutting, copying, pasting, deleting, selecting, etc.). The Redo command is unavailable until you use the Undo command. A combo box displaying a list of open projects.
912
Toolbar button
Title
Description
You will see the name and location of the currently open project. To see a list of all open projects, click the small arrow on the right side of the drop-down list box.
913
Toolbar button
Description Click the ToolTips Style button and select the kind of tool tips you wish to display in symbols on the diagram pane:
Do not show do not show tips
(default).
Object name show the symbol
name and location path from the Data package in the following style: <Element Name> [<path>]
Object Documentation show
the documentation associated with the desired symbol. NOTE To see the tool tips, drag the cursor over the desired symbol on the diagram.
Use the diagram main toolbar to change the symbol layout, path style, symbol properties style, diagram zoom as well as symbol copy/paste, cut, or delete actions.
Toolbar button Layout group Title Description
914
Apply the recommended layout tool with default options to the active diagram. Press the small arrow near the Quick Diagram Layout button to see other available layouts.
Layout the selected shapes according to their width. After the layout, the same width will be apply to the shapes (according to the widest). Layout the selected shapes according the their height. After the layout, the same height will be applied the the shapes (according to the highest). Layout the selected shapes according to their width and height. After the layout, the same width and height will be applied to the shapes according to the widest and highest shape. Center the selected shapes on a horizontal line. Center the selected shapes on a vertical line. Space the selected shapes evenly. The space between the selected shapes is equally distributed on a horizontal line. Space the selected shapes evenly. The space between the selected shapes is equally distributed on a vertical line.
Center Horizontally
Center Vertically
915
To remove all angles of a path, press the Remove Break Points button. To change a path style to rectilinear lines, press the Rectilinear button. To reset the path labels to the default position, press the Reset Labels Position button. Press the button to apply the selected fill color or press the small arrow near the button to select another color. If a new style was set, it will be applied for all newly created elements after drawing them on the diagram pane. The selected symbol style will be changed to its default style. (The default symbol style is defined in the Project Options dialog box, Symbol property styles branch). All shapes of the same style are selected, for example, all classes will be selected. Using the view group buttons, you can change the view of the diagram by zooming it in and out. NOTE You can also change the diagram view in the Browser, Zoom panel.
Fill Color
Edit group
916
Using the Edit group buttons, you can copy or delete symbols from the diagram pane. NOTE After a symbol is deleted from the diagram pane, it does not mean that the element is deleted from the project.
917
Icon
Title
Description
Toggle Floating
Press the Toggle Floating button, the window is split and you can move the window to any desired position. Press the Toggle auto-hide button, the current Browser window is hidden. The tab of the hidden window is displayed on the left side of MagicDraw (in vertical position). Bring the mouse over the hidden window tab and the window is displayed. Close the current window.
Toggle auto-hide
Close
Toggle Floating
Toggle auto-hide
918
Containment Tree tab at the top of the Browser. The Containment tree displays a model data, and groups it in logical sets.
Icon
Title
Description
To show/hide full information of the operations, attributes, and relationships in the Containment Tree. To show/hide stereotypes near the element name.
To show/hide Code Engineering Sets branch in the Browser. To show/hide modules and profiles in the Browser.
A new tab with a package name and tree content will be opened in the Browser.
919
tance tree represents the classifiers, packages, data types, stereotypes hierarchy of your project. The inheritance according to the UML Specification is shown using a generalization relationship.
Icon
Title
Description
The generalization hierarchies are displayed in the tree. If a classifier has no generalization relationship, it will not be visible on the tree.
Invert Tree
The hierarchy of general classifiers and children is displayed in the Inheritance tree. After inverting the tree, the classifier tree view will be changed, making the child a root classifier.
920
Icon
Title
Description
If the Group by Diagram Type button is pressed, diagrams are listed in the packages by diagram type.
Icon
Title
Description
Group by Profiles
If the Group by Profiles button is pressed, groups of profiles and the elements inside them are listed. If the group by Metaclass button is pressed, groups of Metaclasses are displayed as packages and the elements are listed inside them.
Group by Metaclass
921
Icon
Title
Description
Find
Press the Find button and the Find dialog box opens.
Clear Results
Press the Clear Results button to remove elements from the Search Results tree. Press the Show Stereotypes button to display stereotypes beside the element.
Show Stereotypes
922
Diagram Icons
Icon Diagram Description
Class diagram
A class diagram is a graphic representation of the static structural model. It shows classes and interfaces, along with their internal structure and relationships. The classes represent the types of objects that are handled in a system.a A use case is a description of the functionality (a specific usage of a system) that a system provides. A collaboration diagram illustrates the various static connections between objects and it models their interactions. A sequence diagram is a time-oriented view of the interaction between objects.
A state diagram describes the lifecycle of an object and its behavior (such as a procedure or operation), or a behaviored feature (such as a use case).
Collaboration diagram
Sequence diagram
State diagram
A protocol state machine is always defined in the context of a classifier. It specifies which operations of the classifier can be called in which state and under which condition, thus specifying the allowed call sequences on the classifier operations.* The purpose of an activity diagram is to focus on flows driven by the internal processing (as opposed to external events). The Implementation diagrams help developers describe the logical software structure inside a computer system or across a large distributed system. A composite structure diagram allows a decomposition and modeling of the internal structure of classifiers.
Activity diagram
Implementation diagram
923
Icon
Diagram
Description
Business Process diagram The Business Process Diagrams convey business processes of different participants in a modeled system. In a MagicDraw model, the Process contains a Business Process Diagram, depicting it as a graph of Flow Objects. CORBA IDL diagram CORBA IDL diagram facilitates the creation of CORBA IDL elements. Also the following patterns are available for CORBA IDL: Interface, Value Type, Type Definition, Sequence, Array, Fixed, Union, Enumeration, Struct, and Exception. In the free form diagram you may draw all types of element shapes and also describe the business workflow. A generic DDL diagram is used to draw database definition elements. The Generic DDL diagrams simplify the creation of primary key, foreign key, triggers, and so forth. A networking diagram allows a visual display of a network topology. The Networking Profile contains stereotypes for a network description. Use the Oracle DDL diagram to draw database definition elements. This diagram is based on the Generic DDL diagram. The robustness diagram represents robustness analysis. It includes elements from the class diagram and actors from the use case diagram with predefined stereotypes. A struts diagram is an extension of the UML notation. It contains the same model elements which belong to the class diagram, except they have predefined stereotypes. A time diagram is similar to a sequence diagram, except the model elements of the time diagram have predefined stereotypes.
Networking diagram
Robustness diagram
Struts diagram
Time diagram
924
Icon
Diagram
Description
WSDL diagram
A WSDL diagram is used to draw WSDL elements. It enables you to create all the elements used in a wsdl file. A web system consists of server applications, network, communicating protocol, and the browser. The purpose of this diagram is to create the structure of an xml schema file. The Diagram allows a quick drawing of xml schema elements. The openArchitectureWare (oAW) is a popular model driven development & architecture framework based on Eclipse. This framework consists of various components, which allow you to manipulate models in various ways. The oAW Metamodeling diagram is used together with the oAW's uml2ecore transformer to simplify the metamodel preparation.
Web diagram
Content Diagram
The purpose of the content diagram is to generate or represent a project structure (diagrams). The relations between diagrams are represented. The content table works as a table of contents of a project. The Dependency Matrix is a method of visualizing and representing dependency criteria. Diagrams, UML and extended UML elements serve as row and column entries. The cells in the matrix show where these elements are associated or related.
Dependency Matrix
a) Material from the OMG UML Specification has been duplicated with permission.
925
relationships on page 939, and the icons used in modules/profiling mechanism are listed in the section Icons from Modules and Profile mechanism on page 945.
Icon Title Description
Abstract class
An abstract class is a class, which represents the conceptual set of the classifiers. In the Class specification dialog box select the Is Abstract option and a class icon changes to the icon of the abstract class.
An accept event action is an action that waits for the occurrence of an event that meets the specified conditions.a
Action
An action is a named element that is the fundamental unit of an executable functionality. The execution of an action represents some transformation or processing in the modeled system, be it a computer system or otherwise.* An activity element is created on the activity diagram creation. An activity final node is a final node that stops all flows in an activity.* An actor represents the roles played by the human users, external hardware, and other subjects.* An artifact represents a physical piece of information that is used or produced by a software development process.* An instance of an artifact.
Activity
Actor
Artifact
Artifact Instance
926
O F
IC O N S
Icon
Title
Description
Association Class
An Association Class can be seen as an association that also has class properties, or as a class that also has association properties. Not only it connects a set of classifiers, but also defines a set of features that belong to the relationship itself, not to any of the classifiers.* An attribute is a named property of a class that describes a range of values that can be held by instances of that class. The call operation action transmits an operation call request to the target object, where it may cause the invocation of an associated behavior.* An object node is an activity node that indicates an instance of a particular classifier, possibly in a particular state, may be available at a particular point in the activity.* The choice vertices, when reached, result in the dynamic evaluation of the guards of the triggers of its outgoing transitions.* A class is the descriptor for a set of objects with similar structure, behavior, and relationships. A collaboration is represented as a kind of classifier and it defines a set of cooperating entities to be played by instances (its roles) as well as a set of connectors that define communication paths between the participating instances.* A collaboration use represents a particular use of collaboration to explain the relationships between the properties of a classifier.* A combined fragment defines an expression of interaction fragments. It is defined by an interaction operator and the corresponding interaction operands.*
Attribute
Choice
Class
Collaboration
Collaboration Use
Combined Fragment
927
Icon
Title
Description
Comment
A comment gives an ability to display different remarks on diagrams.* It may be attached to multiple elements. A component represents all kinds of elements that pertain to piecing together software applications. They can be simple files, such as DLLs or executables. An instance of a component that may reside on a node instance. A composite state is a state with one region. There is a set of two or more states placed within a region. These are known as substates. The substates describe states within a state. An orthogonal state is a state with two or more regions. In each region, you may draw one life cycle with both a beginning and an end. A conditional node is a structured activity node that represents an exclusive choice among some number of alternatives.* A connection point reference represents the use of entry/exit points. A constraint is a condition or restriction expressed in a natural language text or in a machine readable language for the purpose of declaring some of the semantics of an element.* A data store keeps all tokens that enter it, copies them when they are chosen to move downstream. Incoming tokens containing a particular object replace any tokens in the object node containing that object.*
Component
Component Instance
Composite State
Orthogonal State
Conditional Node
Data Store
928
Icon
Title
Description
Data Type
A data type is a type whose instances are identified only by their value.* A deep history represents the most recent active configuration of the composite state that directly contains this pseudostate.* Decisions are made using guard conditions. They help protect transitions that depend on a guarding condition. The pseudo states are typically used to connect multiple transitions into more complex state transitions paths.* A node deploys and provides a place to store and/or execute an artifact. An instance of a deployment specification element.
Deep History
A device is a physical computational resource. For example; a piece of hardware such as a desktop computer, a processor, a server, or a human work unit such as a department or team. An device instance is an instance of a device.
Device Instance
Duration
A duration defines a value specification that specifies the temporal distance between two time instants.* A duration constraint defines a constraint that refers to a duration interval.* A value specification is an abstract metaclass used to identify a value or values in a model. It may make reference to an instance or it may be an expression denoting an instance or instances when evaluated.*
Duration Constraint
Element Value
929
Icon
Title
Description
Entry Point
An entry point connection point reference as the target of a transition implies that the target of the transition is the entry point pseudostate as defined in the submachine of the submachine state.* An enumeration is a kind of data type, whose instances may be any of a number of user-defined enumeration literals. An enumeration literal defines an extension element of an enumeration data type. An event is the specification of some occurrences that may potentially trigger effects by an object.* An execution environment is a node that offers an execution environment for specific types of components that are deployed on it in the form of executable artifacts.* An instance of execution environment.
Enumeration
Enumeration Literal
Execution Environment
An exit point connection point reference as the source of a transition implies that the source of the transition is the exit point pseudostate as defined in the submachine of the submachine state that has the exit point connection point defined.* An expansion node is an object node used to indicate a flow across the boundary of an expansion region.* An expansion region is a structured activity region that executes multiple times corresponding to the elements of an input collection.*
Expansion Node
Expansion Region
930
Icon
Title
Description
Final State
A special kind of state signifying that the enclosing region is completed. If the enclosing region is directly contained in a state machine and all other regions in the state machine also are completed, then it means that the entire state machine is completed.*
An activity may have more than one activity final node. The first one reached stops all flows in the activity.* A function behavior is an opaque behavior that does not access or modify any objects or other external data.* An icon with a small arrow image on the left-bottom side indicates that element has a hyperlink to another element/symbol, file, or web page. For more information about hyperlinks, see Defining Hyperlinks Between Elements on page 303.
Hyperlink
Informaction Flows
The InformationFlows package provides mechanisms for specifying the exchange of information between entities of a system at a high level of abstraction.* An information item is an abstraction of all kinds of information that can be exchanged between objects.*
Information Item
Initial Node
An initial node is a control node at which a flow starts when the activity is invoked.* An input pin is a pin that holds input values to be consumed by an action.* An output pin is a pin that holds output values produced by an action.* An instance specification is a model element that represents an instance in a modeled system.*
931
Icon
Title
Description
Interaction
An interaction is a unit of behavior that focuses on the observable exchange of information between connectable elements.* An interaction operand is contained in a combined fragment. It represents one operand of the expression given by the enclosing combined fragment.* An interaction use refers to an Interaction. The InteractionUse is a shorthand for copying the contents of the referred Interaction where the interaction use is.* An interface is a specifier for the externally-visible operations of a class, component, or other classifier (including subsystems) without a specification of the internal structure. An interruptible region contains activity nodes. When a token leaves an interruptible region via edges designated by the region as the interrupting edges, all tokens and behaviors in the region are terminated.* The junction pseudo state corresponds to the merge and the static conditional branch. A lifeline represents an object. The lifeline runs from the beginning of the interaction, at the top of the diagram, to the end of the interaction at the bottom of the line. A literal boolean is a specification of a boolean value.*
Interaction Operand
Interaction Use
Interface
Interruptible Region
Junction
Lifeline
Literal Boolean
Literal Integer
Literal Null
932
Icon
Title
Description
Literal String
A literal unlimited natural is a specification of an unlimited natural number.* A loop node is a structured activity node that represents a loop with the setup, test, and body sections.* A class whose instances are classes. Metaclasses are typically used to construct metamodels. An operation is a behavioral feature of a classifier that specifies the name, type, parameters, and constraints for invoking an associated behavior.* A model is an abstraction of a physical system from a particular point of view. A system boundary element consists of use cases related by the exclude or include (uses) relationships. This icon depicts Model with applied Model Library stereotype. The model library is a package that contains model elements that are intended to be reused by other packages.*
Loop Node
MetaClass
Method (Operation)
N-ary Association
An n-ary association is an association among two or more classes (a single class may appear more than once). A node is a computational resource upon which artifacts may be deployed for execution. The nodes can be interconnected through communication paths to define the network structures.*
Node
933
Icon
Title
Description
Node Instance
A node instance is an instance of a node where the component instances may reside. An opaque actions is an action with implementationspecific semantics.* A behavior with implementation-specific semantics.* The Opaque Behavior is introduced for implementationspecific behavior or for use as a place-holder before one of the other behaviors is chosen.* An opaque expression is an uninterpreted textual statement that denotes a (possibly empty) set of values when evaluated in a context.* This icon depicts a Package with applied Model Library stereotype. The model library is a package that contains model elements that are intended to be reused by other packages.*
Opaque Action
Opaque Behavior
Opaque Expression
Package
A package groups classes and other model elements together. A parameter is a specification of an argument used to pass the information on to or out of an invocation of a behavioral feature.* A port is a property of a classifier that specifies a distinct interaction point between that classifier and its environment or between the (behavior of the) classifier and its internal parts.* A primitive type defines a predefined data type, without any relevant substructure.*
Parameter
Port
Primitive Type
934
Icon
Title
Description
A protocol state machine is always defined in the context of a classifier. It specifies which operations of the classifier can be called in which state and under which condition, thus specifying the allowed call sequences on the classifiers operations.* A reception is a declaration stating that a classifier is prepared to react to the receipt of a signal.* A region is an orthogonal part of either a composite state or a state machine. It contains states and transitions.* A send signal action is an action that creates a signal instance from its inputs, and transmits it to the target object, where it may cause the discharge of a state machine transition or the execution of an activity.* A sequence node is a structured activity node that executes its actions in order.* A shallow history represents the most recent active substate of its containing state.* Not all module contents are visible in the using project. A module has a shared part and a private part. Only the contents of the shared part are visible in the working project. The shared packages are marked with a hand image. For more information about project partitioning, see Project Partitioning on page 172.
Sequence Node
Shallow History
Shared Package
Signal
A signal is a specification of send request instances communicated between objects.* A slot specifies that an entity modeled by an instance specification has a value or values for a specific structural feature.*
Slot
935
Icon
Title
Description
State Machine
A state machines can be used to express the behavior of part of a system.* A state specifies how the object reacts to events occurring around it. A stereotype is an extension mechanism that defines a new and more specialized element of the model based on an existing element. A structured activity node is an executable activity node that may have an expansion into the subordinate nodes as an activity group.* A submachine state specifies the insertion of the specification of a submachine state machine.* A subsystem is a unit of hierarchical decomposition for large systems.* An instance of the subsystem.
State
Stereotype
Submachine State
Subsystem
Subsystem Instance
Swimlane
Actions and subactivities can be organized into a Swimlane in the activity diagrams. The swimlanes are used to organize responsibility for actions and subactivities according to a class. A fork node is a control node that splits a flow into multiple concurrent flows.* A joint node is a control node that synchronizes multiple flows.*
Template Parameter
936
Icon
Title
Description
A template parameter substitution relates the actual parameter(s) to a formal template parameter as part of a template binding.* A template signature bundles the set of formal template parameters for a templated element.* A time constraint specifies the combination of min and max timing interval values. A time expression defines a value specification that represents a time value.* An time observation is a reference to a time instant during an execution. It points out the element in the model to observe and whether the observation is made when this model element is entered or when it is exited.* A time event specifies a point of time by an expression. The expression might be absolute or might be relative to some other point of time.* A trigger specification may be qualified by the port on which the event occurred.* A trigger relates an event to a behavior that may affect an instance of the classifier.*
Time Event
Trigger
Use Case
A use case is a kind of behavior-related classifier that represents a declaration of an offered behavior.* A value pin is an input pin that provides a value by evaluating a value specification.*
Value Pin
937
Icon
Title
Description
Variable
a) Material from the OMG UML Specification has been duplicated with permission.
938
Icons of relationships
Icon Title Description
Relations branch
Most of the relationships are included in the Relations branch in the Browser. An abstraction is a dependency relationship that relates two elements or sets of elements that represent the same concept at different levels of abstraction or from different viewpoints.a An aggregation describes a special type of association designed to help cope with complexity. An assembly connector is a connector between two components that defines that one component provides the services that another component requires.* An association answers to the question why two classes of objects need to know about one another.
Abstraction
Aggregation association
Assembly Connector
Association
Communication Path
The communication path is a subclass of association. It specifies the relationship between nodes by defining the number of nodes that may be connected (multiplicity), and the nature of the connection, via the name of the path or a stereotype. An association class can be seen as an association that also has class properties, or as a class that also has association properties. Not only it connects a set of classifiers, but also defines a set of features that belong to the relationship itself, not to any of the classifiers.* A call message represents the request to invoke a specific operation. A composition is used for aggregations where the life span of the member object depends on the life span of the aggregate.
Association Class
Call Message
Composition
939
Icon
Title
Description
Connector
A connector specifies a link that enables communication between two or more instances.* A constraint is a condition or restriction expressed in a natural language text or in a machine readable language for the purpose of declaring some of the semantics of an element.* A control flow is an edge that starts an activity node after the previous one is finished.* A create message is message designating the creation of another lifeline object.* A delegation connector is a connector that links the external contract of a component (as specified by its ports) to the internal realization of that behavior by the component parts.* A dependency indicates a semantic relationship between two model elements (or two sets of model elements). A deployment is a relationship between the location and the artifact. A delete message is message designated to terminate another lifeline.* A directed relationship represents a relationship between a collection of source model elements and a collection of target model elements.*
Constraint
Control Flow
Create Message
Delegation Connector
Dependency
Deployment
Delete Message
Direct Association
940
Icon
Title
Description
An aggregation describes a special type of association designed to help cope with the complexity. A directed relationship represents a relationship between a collection of source model elements and a collection of target model elements.*
A composition is used for aggregations where the life span of the member object depends on the life span of the aggregate. A directed relationship represents a relationship between a collection of source model elements and a collection of target model elements.*
Element Import
An element import is defined as a directed relationship between an importing namespace and a packageable element.* An exception handler is an element that specifies a body to execute in case the specified exception occurs during the execution of the protected node.* A relationship from an extending use case to an extended use case that specifies how and when the behavior defined in the extending use case can be inserted into the behavior defined in the extended use case.* An extension point identifies a point in the behavior of a use case where that behavior can be extended by the behavior of some other (extending) use case, as specified by an extend relationship.* A generalization is the relationship from the child element (the more specific element, such as a subclass) to the parent (the more general element, such as a super class) that is fully consistent with the first element and that provides additional information.
Exception Handler
Extend
Extension
Generalization
941
Icon
Title
Description
Generalization Set
A generalization set defines a particular set of generalization relationships that describe the way in which a general classifier may be divided using specific types.* An include (uses) relationship from the use case A to the use case B indicates that an instance of the use case A will also contain the behavior as specified by B. The behavior is included at the location which is defined in A. An information flow specifies that one or more information items circulates from its sources to its targets.* An interface realization is a specialized realization relationship between a behavioral classifier and an Interface.* An instance specification whose classifier is an association represents a link and is shown using the same notation as for an association, but the solid path or paths connect the instance specifications rather than the classifiers.* A manifestation is the concrete physical rendering of one or more model elements by an artifact.* A package merge is a directed relationship between two packages that indicates that the contents of the two packages are to be combined.*
Include
Information Flow
Interface Realization
Link
Manifestation
Package Merge
942
Icon
Title
Description
Message
A message is a named element that defines one specific kind of communication in an Interaction. A communication can be, for example, raising a signal, invoking an operation, creating or destroying an Instance. The message specifies not only the kind of communication given by the dispatching execution specification, but also the sender and the receiver.* The message was generated by an asynchronous send action.*
Send Message
Object Flow
An object flow is a technique used to capture how objects participate in activities and how they are affected by the activities.* A package import is defined as a directed relationship that identifies a package whose members are to be imported by a namespace. A profile application is used to show which profiles have been applied to a package.* A protocol transition specifies a legal transition for an operation.* A realization is a specialized abstraction relationship between two sets of model elements, one representing a specification (the supplier) and the other represents an implementation of the latter (the client).* A component realization concept is specialized in the Components package to (optionally) define the Classifiers that realize the contract offered by a component in terms of its provided and required interfaces.*
Package Import
Profile Application
Protocol Transition
Realization
Component Realization
943
Icon
Title
Description
Reply Message
A reply message is a reply message to an operation call.* A role binding is a mapping between features of the collaboration type and features of the classifier or operation. This mapping indicates which connectable element of the classifier or operation plays which role(s) in the collaboration.* A substitution is a relationship between two classifiers which signifies that the substitutingClassifier complies with the contract specified by the contract classifier.* A template binding represents a relationship between a templateable element and a template.* A state transition usually has an event attached to it, but it is not necessary to attach one. If an event is attached to a state transition, the state transition will be performed when the event occurs. A usage is a relationship in which one element requires another element (or set of elements) for its full implementation or operation.*
Role Binding
Substitution
Template Binding
Transition
Usage
a) Material from the OMG UML Specification has been duplicated with permission.
944
Module
If you have (or developing) a large model, which has several weakly dependent parts, it is advisable to split it into several module files. Partitioning has a package level granularity. A Profile is a kind of Package that extends a reference metamodel. The primary extension construct is the Stereotype, which is defined as part of Profiles.a This icon depicts a profile with applied Model Library stereotype. A package that contains model elements that are intended to be reused by other packages.*
Profile
Shared Package
Not all module contents are visible in the working project. A module has a shared part and private part. Only the contents of the shared part are visible in the working project. The shared packages are marked with a hand image.
a) Material from the OMG UML Specification has been duplicated with permission.
For more information about working with modules and profiling mechanism, see Project Partitioning on page 172.
945
INDEX
A
About (command) 81, 83 abstract class 724, 744 operation 840 Abstract (generalizable element) 266, 787 action state 609 activation bar 588, 812 active class 744 activity diagram 607 actor 582 working with 723 aggregation 576 creating 731 Align (command) 71 assigning classifier to classifier role 811 classifier to collaboration 751 classifier to instance 800 model element to a package 311 state to object flow state 834 association 576 in class diagram 725 in use case diagram 725 n-ary 728 navigability of 731 with a role 739 association class 727 association end multiplicity of 732 qualifier of 733 visibility of 732 asynchronous message/stimulus 814 attribute 736 creating new 736 defining initial value of 800 multiplicity 741 scope of 740 show only public 748 type modifier of 740 type of 739, 883 attributes controlling the list of 744 representing as association 739 sorting of 748 suppressing compartment 748
B
binding dependency 769 browser changing position 88 changing size 88 closing or reopening 88 code engineering sets in 91 Containment tree 88 creating model elements and diagrams in 99 Diagrams tree 93 displaying full information in 89 Documentation tab 101 functions of 86 Inheritance tree 95 Model Extensions tree 96 multiple selections 100 sorting alphabetically 88 structure 86 Zoom tab 102 Browser (command) 79
C
Call (event type) 903 Center (command) 71 Change (event type) 903
946
INDEX
changeable 741 Check Syntax (command) 74 class 741 active 744 creating setters and getters 404 defining as abstract, leaf, root and/or active 724, 744 description of 742 design patterns 746 inner elements of 743 owner of 311 show/hide package name 311 suppressing attributes 748 suppressing operations 748 class diagram 572 elements in 573 wizard 441 classifier assign to an instance 800 assigning to a collaboration 751 assigning to classifier role 811 classifier role assigning classifier to 811 in sequence diagram 588 Close All Diagrams (command) 80 Close All Projects (command) 61 closing all opened projects 140 diagram 199 code engineering checking syntax 92 creating new set 91 editing set 91 code generation 92 changing properties of 91 collaboration assigning classifier to 751 collaboration diagram changing numbering in 818 compartments of class 741 component 622, 753 diagram 620 instance 622 Component View package 139 composition 731 concurrency of operation 842 concurrent operation 842 constraints show-hide on symbol 284 showing on class 749 content diagram 641 Contents (command) 81, 82 Copy (command) 64 Copy as EMF (command) 65 Copy as JPG (command) 65 copying/cutting among different projects 99 in the Browser 99 of text 229 symbol on a diagram 228 using drag and drop 227 CORBA IDL diagram 652, 665 creating backup file 146 displaying already created relationships 478 elements and diagrams in Browser 99 new attribute 736 new code engineering set 91 new diagram 198 new operation 835 new project style 289 paths between shapes 215 creating:stereotypes 692 Cut (command) 64
D
data creating several shapes of the same 211 Data package 138 data types 761 DDL diagram 654 defining
947
INDEX
model elements 265 Delete (command) 64 deleting all model elements 100 from the Browser 99 symbol or model element 213 dependency binding 769 permission 770 usage 770, 771 deployment diagram 621 design patterns 746 destroying sequence object 812 diagram closing 199 creating 198 defining properties of 295 information table 209 opening 198 renaming 200 saving as image 255 diagrams activity 607 class 572 collaboration 584 content 641 CORBA IDL 652, 665 DDL 654 implementation 620 robustness 646 sequence 587 state 596, 602 use case 581 web 648 WSDL 658 XML Schema 660, 664, 672 Diagrams menu 72 display related elements 477 documentation of MagicDraw 35 drag and drop copying 227 from browser to diagram 228 multiple symbols 227 source code files 228 drawing more than one shape 210 shape 209 symbol from the Browser 99
E
Edit menu 63 editing code engineering set 91 editions of MagicDraw 21 Entertainment with UML (command) 81 enumeration 763, 871 enumeration literal 765 Environment (command) 73 event 597 Exit (command) 62 extend 774 extension point 904 adding to use case 906
F
features of MagicDraw 21 File menu 60 Fit In Window (command) 67
G
generalizable elements 787 defining as 787 generalization grouping into tree 786 generate code from the selected set 92 Generate Framework (command) 74 getter 404 grid 232 size 232 snapping to 232 style 233
948
INDEX
visibility of 232 Grid (command) 68 grouping diagrams in Browser 93 generalization paths into tree 786 of model elements 842 realizations into tree 879 Guarded 842 Interface Style (command) 73 internal transition 809
J
JVM (Java Virtual Machine) for Mac OS X 44 for Solaris 44 for Windows 44
H
Help menu 81 HTML text 307 hyperlink 307 for model element 304 hyperlink: for model element 304
L
layout 233 Layout menu 69 Leaf class 744 Leaf (generalizable element) 787 lifeline 812 link in class diagram 579 in collaboration diagram 585 in implementation diagram 629 link attribute 834 link to self 585 Look and Feel (command) 73 Look and Feel themes 136
I
image available formats 255 saving as 255 implementation diagram 620 Import Project (command) 61 include 583, 793 initial value defining for attribute 800 showing on attribute 748 inner elements of class (inserting) 743 installation other platforms 45 system requirements 42 UNIX 45 using no install 45 Windows 44 instance 626 assign classifier to 800 of component 622 of node 623 interface 625 interface style making changes to 135 multiple windows 136
M
Mac OS X installation 45 JVM 44 Magic Draw UML on the Web (command) 81 MagicDraw appearance of 135 documentation 35 editions 21 features 21 support 36 updating 48 main toolbar 85 Make Same Height (command) 71 menus 60 message changing numbering of 818
949
INDEX
defining action for 817 diagonal 591 in collaboration diagram 586, 587 note anchor 688 numbering changing 818 numbers show/hide on collaboration diagram 817
asynchronous 814 synchronous 815 in sequence diagram 822, 825 predecessor of 821 recursive 592 to self 591 uninterpreted 590 Message Window (command) 80
model development of 20 static structural 572 model element defining 265 saving as image 255 model management 572 moving of all model elements 100 symbol 227 MS Office copying to 228 multiple windows 136 multiplicity of an attribute 741 of association end 732
O
object flow state assigning state 834 defining classifier for 834 Open Project (command) 60 opening diagram 198 diagram from Browser 94 last project on startup 147 project 147 specification dialog box 265 operation concurrency 842 creating new 835 defining 835 defining as abstract, leaf, or root 841 functions of 835 parameter of 838 return type 840 return type of 837 show only public 748 showing signature of 747 visibility 841 operations controlling the list of 744 generation of setters and getters 744 managing 407 sorting of 748 suppressing compartment 748 Options menu 73 ordering of attributes 748 of operations 748
N
name specifying for a shape 210 n-ary association 728 navigability of association 731 New Project (command) 60 Next Diagram (command) 72 node 622, 826 note 686, 688 adding hyperlink to 307 retrieving documentation 690 text as HTML in 307
P
package 574, 624, 842
950
INDEX
adding inner elements 843 changing header position 844 Component View 139 Data 138 dependency wizard 446, 450 showing assigned model elements 844 parameter of an operation 838 parameterized class 899 defining of 899 partition 894 paste 228 with new data 228 Paste (command) 64 Paste With New Data (command) 64 path 197 changing style of 216 defining properties of 295 drawing 215 Paths (command) 65 patterns See design patterns permission 770 predecessor 821 presentation options for class 746 Previous Diagram (command) 72 primitive 766 Print Active Diagram 62 Print Options (command) 62 Print Preview (command) 62 printing 258 project dividing into modules 170 multiple projects 139 opening of 147 packages of 138 Project (command) 73 Projects (command) 62 properties changing code generation 91 pseudostate 597
Q
qualifier of association end 733 Quick Reverse (command) 74
R
realization grouping into tree 879 Redo (command) 63 Refresh (command) 67 registering MagicDraw 48 relationship displaying on diagram 478 renaming diagram in Browser 94 Retrieve DB Structure (command) 74 return type of an operation 840 reverse changed files 92 code engineering set 92 robustness diagram 646 Root class 744
S
Save (dialog box) 145 Save As Image (dialog box) 255, 256, 257 Save Project As (command) 60 saving 145 as image 255 formats 145 in .mdf format 145 project 145 project as template 148 Select All (command) 65 selection 224 all symbols of the same type 224 multiple 224 multiple (in the Browser) 100 of all model elements 100
951
INDEX
of all symbols 224 of symbol 224 separator 689 adding hyperlink to 307 sequence diagram model elements in 588 overview 587 Sequential 842 setter 404 shape defining properties of 295 definition 197 drawing more than one shape 210 drawing of 209 shortcut keys assigning 137 Signal (event type) 903 signal receipt trigger event for 715, 719 Solaris JVM 44 sorting of attributes 748 of operations 748 Space evenly (command) 71 state 598, 603, 609, 885 state diagram model elements in 597, 603 state machine 597 statechart diagram See state diagram stereotypes defining properties of 295 show/hide on a symbol 284 showing on class 748 stereotypes:creating of 692 stimulus changing numbering 817 changing numbering of 818 defining action for 817 main information about 586, 587 Submit a Bug (command) 81, 83 support for MagicDraw 36 swimlane 894 symbols 197 defining properties 283 formatting 295 moving 227 presentation of
constraint 229 note 686 note anchor 229 separator 229 text box 229 synchronous 815 system boundary 583
T
tagged values show/hide on a symbol 284 showing on class 749 template saving as 148 text box 229 adding hyperlink 307 text as HTML in 307 text editor choosing 92 Time (event type) 903 Tip of the Day (command) 81, 82 toolbars 82, 910 Tools menu 73 transition 613 to self 602, 607 type modifier 740 type of an attribute showing full path 748
U
Undo (command) 63 Unix installation 45 Unlock Key (command) 81
952
INDEX
updating MagicDraw 48 usage 770, 771 use case adding extension point 906 extension point 904
V
View menu 67 visibility for operation 841 of association end 732 showing on attribute 748 showing on operation 748
W
web diagram 648 Window menu 79 Windows JVM 44 wizards 316, 439 workspace 139 WSDL diagram 658
X
XMI 146 XML Schema diagram 660, 664, 672
Z
Zoom 1:1 (command) 67 Zoom In (command) 67 Zoom Out (command) 67 Zoom To Selection (command) 67 zooming 231 adjusting step size 232 fit in window 231 to maximum size 231 to original size 231 using Browser 102 zoom in 231 zoom out 231
953