UModel

UModel® 2013

UModel® 2013 Enterprise Edition is an affordable UML modeling application with a rich visual interface and superior usability features to help level the UML learning curve, and includes many high-end functions to empower users with the most practical aspects of the UML 2.4 specification. UModel is a 32/64-bit Windows application that runs on Windows Server 2003/2008, Windows XP, Windows Vista and Windows 7. 64-bit support is available for the Enterprise and Professional editions.

UModel® 2013 supports:

· all 14 UML 2.4 modeling diagrams
· Support for the Model Driven Architecture (MDA) which allows conversion between different programming languages (Enterprise edition only)
· Ability to import and export SQL databases into UModel (Enterprise/Professional editions only)
· Teamwork support - allowing concurrent project editing
· 3-way project merging
· Protocol State Machines
· SysML 1.2 diagrams (Enterprise/Professional Edition only)
· Sequence Diagram generation directly from source code
· Code generation from State Machine diagrams (Enterprise/Professional Edition only)
· UModel API and plugin (Enterprise/Professional Edition only)
· Built-in Scripting environment and Form editor (Enterprise/Professional Edition only)
· Visual Studio integration (Enterprise/Professional Edition only)
· Eclipse integration (Enterprise/Professional Edition only)
· Support for Version Control systems
· XML Schema diagrams
· Business Process Modeling Notation 1.0 and 2.0 (Enterprise/Professional Edition only)
· Multiple layers per UML diagram (Enterprise/Professional Edition only)
· import of Java, C# and Visual Basic binaries
· hyperlinking of diagrams and modeling elements
· syntax coloring in diagrams
· cascading styles
· unlimited Undo and Redo
· sophisticated Java, C# and Visual Basic code generation from models
· reverse engineering of existing Java, C#, and Visual Basic source code
· complete round-trip processing allowing code and model merging
· XMI version 2.4 for UML 2.0, 2.1, & 2.1.2, 2.2, 2.3, 2.4 - model import and export
· generation of UModel project documentation

These capabilities allow developers, including those new to software modeling, to quickly leverage UML to enhance productivity and maximize their results.

UML®, OMG™, Object Management Group™, and Unified Modeling Language™ are either registered trademarks or trademarks of Object Management Group, Inc. in the United States and/or other countries.

Last updated: 9/7/2012

Top Next

© 2012 Altova


Introducing UModel

Altova web site: AltovaWebLink Introduction to Altova UModel

The UML is a complete modeling language but does not discuss, or prescribe, the methodology for the development, code generation and round-trip engineering processes. UModel has therefore been designed to allow complete flexibility during the modeling process:

· UModel diagrams can be created in any order, and at any time; there is no need to follow a prescribed sequence during modeling.

· Code, or model merging can be achieved at the project, package, or even class level. UModel does not require that pseudo-code, or comments in the generated code be present, in order to accomplish round-trip engineering.

· Code generation is customizable: the code-generation in UModel is based on SPL templates and is, therefore, completely customizable. Customizations are automatically recognized during code generation.

· Code generation and reverse-engineering currently support Java versions 1.4.x, 5.0 and 1.6, C# versions 1.2, 2.0, 3.0, and 4.0 and Visual Basic versions 7.1, 8.0 and 9.0. A single project can support Java, C#, or VB code simultaneously.

· Support for UML templates and generics.

· XML Metadata Interchange (XMI version 2.4) for UML 2.0 / 2.1.1 / 2.1.2 / 2.2 / 2.3 / 2.4

· When adding properties, or operations UModel provides in-place entry helpers to choose types, protection levels, and all other manner of properties that are also available in industrial-strength IDEs such as XMLSpy, Visual Studio or Eclipse.

· Syntax-coloring in diagrams makes UML diagrams more attractive and intuitive.

· Modeling elements and their properties (font, colors, borders etc.) are completely customizable in an hierarchical fashion at the project, node/line, element family and element level.

· Customizable actors can be defined in use-case diagrams to depict terminals, or any other symbols.

· Modeling elements can be searched for by name in the Diagram tab, Model Tree pane, Messages and Documentation windows.

· Class, or object associations, dependencies, generalizations etc. can be found/highlighted in model diagrams through the context menu.

· The unlimited levels of Undo/Redo track not only content changes, but also all style changes made to any model element.

Please note:

This document does not attempt to describe, or explain, the Unified Modeling Language (UML); it describes how to use the UModel modeling application, to model code and achieve round-trip engineering results.

Previous Top Next


What's new in UModel

The 2013 Release version of UModel includes the following major and minor enhancements:

· Support for UML 2.4
· Support for SysML 1.2
· Spellchecker, with extended spell-checking features
· Abiltity to show .NET Properties as associations
· Ability to ignore getters/setters when generating Sequence Diagrams for a project
· Support for UML exception pins
· The Eclipse plugins now run under Eclipse 4.2

A new Umodel edition has been introduced for the 2012 Release, namely the Basic edition. The Basic edition has all the functionality of the previous Professional edition.

The Professional edition has all the functionality of the previous Enterprise edition, i.e. support for SQL databases, SysML and BPMN diagrams, diagram layers, Automation support (COM API), as well as Visual Studio and Eclipse integration.

The Enterprise editon has all the above, plus support for Model Driven Architecture, which allows transformation of UML elements between different programming languages.

The new functionality of each of the specific versions is listed below.

The 2012 Release R2 version of UModel includes the following major and minor enhancements:

· Ability to generate code from a sequence diagram
· UModel supports logical files of the IBM iSeries database and shows logical files as views.
· Supportfor IBM DB2 logical files. A logical file in IBM iSeries editions of the DB2 database represents one or more physical files. A logical file allows users to access data in a sequence or format that can be different from the physical file. Users who connect to IBM iSeries computers may encounter existing databases constructed with logical files. These were previously not accessible, but are now supported in Version 2012 Release 2.

The 2012 Release version of UModel includes the following major and minor enhancements:

· Support for the Model Driven Architecture (MDA) which allows transformation of UML elements between different programming languages
· Support for Eclipse 3.7
· UModel API can now be accessed via Java
· Database engine now supports direct ODBC and JDBC connections
· Snap line positioning during drag-and-drop

The 2011 Release 3 version of UModel includes the following major and minor enhancements:

· Ability to show VS .NET (C# or VB.NET) properties in their own compartment
· Support for VS .NET 4.0 in scripting editor
· Ability to use VS .NET 4.0 assemblies in scripting editor
· Support for .NET templates, out parameters and javascript enumerators in scripting editor
· Ability to create new directories following the Java namespace hierarchy
· Small enhancements in SPL to sorting of collections by name and kind as well as new string comparison functions

The 2011 Release 2 version of UModel includes the following major and minor enhancements:

· Support for BPMN 2.0 including the the diagram types: Choreography, Collaboration and standard BPMN 2.0 Business Process Diagram.
· Ability to upgrade BPMN 1.0 diagrams to BPMN 2.0 at any time. Both diagram types can coexist in the same project however.
· Code generation from State Machine diagrams in Java, VB.NET, or C#
· Ability to customize UML Documentation using StyleVision Power Stylesheets (SPS).
· Ability to automatically add operations to State Machine activities
· Ability to toggle region names in States

The 2011 version of UModel includes the following major and minor enhancements:

· Ability to import and export SQL databases into UModel
· Teamwork support: ability to split up projects into several sections allowing concurrent project editing
· Ability to create a 3-way project merge
· State Machine diagrams: automatic creation of operations when creating transitions
· Sequence diagrams: automatic creation of operations (incl. parameters), by typed calls in messages

The 2010 Release 3 version of UModel includes the following major and minor enhancements:

· Support for Visual Studio 2010:
Supports new solution and project files, predefined include files supplied for .NET framework 4.0
· Support for C# 4.0
New C# 4.0 features are supported by round-trip engineering, binary import and sequence diagram generation
· Ability to create Protocol State Machines
· New autolayout output option: Block
· Ability to ignore operation names when generating Sequence diagrams
· Ability to define Argument variables for external tools

The 2010 Release 2 version of UModel includes the following major and minor enhancements:

· 64-bit support
· Support for UML 2.3
· Ability to automatically split generated sequence diagrams into smaller sub diagrams
· HTML Documentation generation includes manually defined hyperlinks between elements
· Creation of separate sequence diagrams for the getter or setter part of a property (C#, or VB.NET)
· Scripting editor improvements (goto brace, goto brace extend, etc.)

Please note:

The following modifications in code engineering have been made due to the new UML version 2.3 (please see Projects and code engineering Java / C# / VB.NET code to/from UModel for more information):

The class modifiers “sealed” (C#), “NotInheritable” (VB.NET) and “final” (Java) are now mapped to UML “isFinalSpecification”.

The Java modifier “final” for fields and methods are now mapped to UML “leaf”.

The 2010 version of UModel includes the following major and minor enhancements:

· Support for SysML version 1.1
· New Form Editor / Scripting environment
· Support for Eclipse 3.5

Code engineering:

· Ability to resolve aliases when reverse-engineering code
· Cancelling of code generation from source code for VS.NET and Eclipse
· small improvements in sequence diagram generation

UModel API

· general improvements
· custom ActiveX controls can be displayed in UModel dialog boxes

User Interface:

· Comments entered in the documentation window can now be shown/edited in diagrams
· Tagged values can now be shown in new compartment in: classes, interfaces, etc.
· Hyperlinks can now be defined in the Documentation window
· Hyperlinks to elements in the Model Tree are now possible
· UML containment lines can now be displayed

Documentation generation:

· CSS code can be saved in HTML files, or externally
· Generated image files can be saved in a specified subdirectory

File system:

· Save Copy As is now supported

The 2009 version of UModel includes the following major and minor enhancements:

· Support for UML 2.2

· Sequence Diagram generation directly from source code

· UModel API and IDE plugin, allowing you to automate common tasks as well as directly read and modify UML data structures

· Support for Version Control Systems in the standalone version as well as Eclipse and Visual Studio versions: MS SourceSafe, CVS, SubVersion, Rational ClearCase etc.

· New UML Profile Diagram

· Detection and handling of types and namespaces when refactoring code

· Goto feature for lifelines in sequence diagrams

· Improved hierarchy window display

· Ability to save UModel project files in "pretty print" format

· Improved partial documentation functionality

· Ability to open UModel projects from a URL

· Ability to load/save currently open diagrams with the project file.

The 2008 Release 2 version of UModel includes the following major and minor enhancements:

· Support for OMG Business Process Modeling Notation.

· Support for Visual Basic .NET 9.0 and C# 3.0 as well as Visual Studio 2008, Java 1.6

· Multiple Layers per UModel diagram

· Merging of projects is now supported

· User-defined Stereotype styles and how to define them

· Enhanced Autocompletion capabilities

· Automatic generation of ComponentRealizations

· Importing multiple XML Schemas from a directory

· Automatic generation of namespace directories for generated code

· Support for ObjectNodes on Activity diagrams

· Ability to generate relative links for UML documentation

· UML conformant visibility icons in class diagrams

· Support for Collection Associations

The 2008 version of UModel includes the following major and minor enhancements:

· Visual Basic code generation from models, and reverse engineering of Visual Basic code.

· Visual Studio integration (Enterprise Edition only).

· Eclipse integration (Enterprise Edition only).

· Abilty to save all project diagrams as images in one go.

· Multiline lifeline titles in sequence, communication and timing diagrams.

· Support for event subelements in State Machine Diagrams: ReceiveSignalEvent, SignalEvent, SendSignalEvent, ReceiveOperationEvent, SendOperationEvent and ChangeEvent.

· New 'go to operation' option for call messages on Sequence and Communication Diagrams.

· Signals can now have generalizations and own attributes.

· Enhanced tagged value support

· Ability to Find & Replace modeling elements.

Sequence diagrams:

· Automatic generation of (syntactically correct) replies when adding messages to sequence diagrams.

· Static operation names are underlined in Sequence diagrams.

Ehanced "Override/Implement Operations" dialog.

· Operations from bound templates can be made visible and also be overridden

· Show which operations are abstract or undefined


UModel tutorial

This tutorial describes, and follows, the general sequence used when creating a modeling project in UModel.

The major portion of the tutorial deals with the forward-engineering process, i.e. using UModel to create UML diagrams and generate code as the precursor to the round-trip engineering sections that follow. The round-trip engineering sections, describe the process from both code and model vantage points.

The tutorial describes the following UML diagrams, and how to manipulate the various modeling elements within them. The following diagrams and follow-on tasks are discussed:

Forward engineering process:

· Use cases
· Class diagrams
· Object diagrams
· Component diagrams
· Deployment diagrams

Round-trip process (model - code - model)

· Code generation from UModel
· Add a new operation to the external code
· Merge the external code back into UModel.

Round-trip process (code - model - code)

· Import code produced by XMLSpy from a directory (or from a project file)
· Add a new class to the generated model in UModel
· Merge the updated project with the external code.

All the files used in this tutorial are initally available in the C:\Documents and Settings\All Users\Application Data\Altova folder. When any single user starts the application for the first time, the example files for that user are copied to C:\Documents and Settings\<username>\My Documents\Altova\UModel2013\UModelExamples\ folder. Therefore do not move, edit, or delete the example files in the initial ...\All Users\.... directory.

BankView-start.ump

is the UModel project file that constitutes the initial state of the tutorial sample. Several model diagrams as well as classes, objects, and other model elements exist at this stage. Working through the tutorial adds new packages, model diagrams and many other elements that will acquaint you with the ease with which you can model applications using UModel. Please note that the syntax check function reports errors and warnings on this file, the tutorial shows you how to resolve these issues.

BankView-finish.ump

is the UModel project file that constitutes final state of the tutorial sample, if you have worked through it step by step. This project file is the one used when generating code and synchronizing it with UModel.

· The OrgChart.zip file supplied in the folder is used for the round-trip engineering process. Please unzip it in the ...\UModelExamples folder before starting the section.

Additional example files for both Java and C# programming languages are also available in the same directory, i.e. Bank_Java.ump, Bank_CSharp.ump and Bank_MultiLanguage.ump. These project files also contain Sequence diagrams which are described later in this documentation.

A section describing how to start a project from scratch and generate code, is included in the Projects and code engineering section.


Starting UModel

Having installed UModel on your computer:

1. Start UModel by double-clicking the UModel icon on your desktop, or use the Start | All Programs menu to access the UModel program.

UModel is started with a default project "NewProject1" visible in the interface.

Note the major parts of the user interface: the three panes on the left hand side and the empty diagram pane at right.

Two default packages are visible in the Model Tree tab, "Root" and "Component View". These two packages cannot be deleted or renamed in a project.

To open the BankView-start project:

1. Select the menu option File | Open and navigate to the ...\UModelExamples\Tutorial folder of UModel. Note that you can also open a *.ump file through a URL, please see Switch to URL for more information.
2. Open the BankView-start.ump project file.

The project file is now loaded into UModel. Several predefined packages are now visible under the Root package. Note that the main window is empty at the moment.

The Model Tree pane supplies you with various views of your modeling project:

· The Model Tree tab contains and displays all modeling elements of your UModel project. Elements can be directly manipulated in this tab using the standard editing keys as well as drag and drop.

· The Diagram Tree tab allows you quick access to the modeling diagrams of you project wherever they may be in the project structure. Diagrams are grouped according to their diagram type.

· The Favorites tab is a user-definable repository of modeling elements. Any type of modeling element can be placed in this tab using the "Add to Favorites" command of the context menu.

The Properties pane supplies you with two views of specific model properties:

· The Properties tab displays the properties of the currently selected element in the Model Tree pane or in the Diagram tab. Element properties can defined or updated in this tab.

· The Styles tab displays attributes of diagrams, or elements that are displayed in the Diagram view. These style attributes fall into two general groups: Formatting and display settings.

· The Hierarchy tab displays all relations of the currently selected modeling item, in two different views. The modeling element can be selected in a modeling diagram, the Model Tree, or in the Favorites tab.

The Overview pane displays various tabs:

· The Overview tab which displays an outline view of the currently active diagram

· The Documentation tab which allows you to document your classes on a per-class basis.

· The Layer tab allows you to define multiple layers for any UModel diagram. Single, as well as multiple, layers can be shown, locked and hidden. Layers allow you to make logical groupings of modeling elements on a diagram.

Modeling element icon representation in the Model Tree

Package types:

ic-mod-package UML Package

ic-java-non-ns Java namespace root package

ic-csharp-ns C# namespace root package

ic-vb-namespace Visual Basic root package

ic-xsd-pack XML Schema root package

ic-code-pack Java, C#, VB code package (package declarations are created when code is generated)

Diagram types:

ic-d-activity | Activity diagram | ic-d-package | Package diagram
ic-mod-diagram | Class diagram | ic-d-profile | Profile diagram
ic-d-commun | Communication diagram | ic-seq-diag | Sequence diagram
ic-comp-diag | Component diagram | ic-d-statem | State Machine diagram
ic-d-compstr | Composite Structure diagram | ic-d-timing | Timing diagram
ic-mod-node-diag | Deployment diagram | ic-d-usecase | Use Case diagram
ic-d-interOv | Interaction Overview diagram | ic-d-schema | XML Schema diagram
ic-mod-object | Object diagram | ic-d-bpmn | Business Process Modeling Notation

Element types:

An element that is currently visible in the active diagram is displayed with a blue dot at its base. In this case a class element.

ic-mod-obj-instance Class Instance/Object

ic-slot Class instance slot

ic-mod-class-not-ins Class

ic-mod-property Property

ic-mod-operation Operation

ic-mod-param-auto Parameter

ic-actor2 Actor (visible in active use case diagram)

ic-mod-usecase Use Case

ic-mod-component Component

ic-mod-node Node

ic-mod-artifact Artifact

ic-mod-interface Interface

ic-mod-relations Relations (/package)

ic-constraint Constraints


Use cases

Altova web site: AltovaWebLink UML Use Case diagrams

The aim of this tutorial section is to:

· Add a new package to the project
· Add a new Use Case diagram to the project
· Add use case elements to the diagram, and define the dependencies amongst them
· Align and size elements in the diagram tab.

To add a new package to a project:

1. Right click the Root package in the Model Tree tab, and select New Element | Package.
2. Enter the name of the new package e.g. Use Case View, and press Enter.

Please see Packages for more information on packages and their properties.

Adding a diagram to a package:

1. Right click the previously created Use Case View package.
2. Select New Diagram | UseCase Diagram.

A Use Case diagram has now been added to the package in the Model Tree view, and a diagram tab has been created in the diagram pane. A default name has been provided automatically.

3. Double click the supplied name, in the Model Tree tab, change it to "Overview Account Balance", and press Enter to confirm.

Please see Diagrams for more information on diagrams and their properties.

Adding Use case elements to the Use Case diagram:

1. Right click in the newly created diagram and select New | Actor.

The actor element is inserted at the click position.

2. Click the Use Case icon ic-use-case in the icon bar and click in the diagram tab to insert the element.

A UseCase1 element is inserted. Note that the element, and its name, are currently selected, and that its properties are visible in the Properties tab.

3. Change the title to "get account balance", press Enter to confirm. Double click the title if it is deselected.

Note that the use case is automatically resized to adjust to the text length.

Model elements have various connection handles and other items used to manipulate them.

Note: Use CTRL+Enter to create a multi-line use case name.

Manipulating UModel elements: handles and compartments

1. Double click the Actor1 text, of the Actor element, change the name to "Standard User" and press Enter to confirm.
2. Place the mouse cursor over the "handle" to the right of the actor.

A tooltip containing "Association" appears.

3. Click the handle, drag the Association line to the right, and drop it on the "get account balance" use case.

An association has now been created between the actor and the use case. The association properties are also visible in the Properties tab. The new association has been added to Model Tree under the Relations item of the Use Case View package.

4. Click the use case and drag it to the right to reposition it.

The association properties are visible on the association object.

5. Click the use case to select it, then click the collapse icon on the left hand edge of the use case ellipse.

The extension points compartment is now hidden.

Please note:

A blue dot next to an element icon usecase10, in the Model Tree tab, signifies that the element is visible in the current diagram tab. Resizing the actor adjusts the text field which can be multi line. A line break can be inserted into the text using CTRL+Enter.

Finishing up the use case diagram:

Using the methods discussed above:

1. Click the Use Case icon in the icon bar and simultaneously hold down the CTRL keyboard key.
2. Click at two different vertical positions in the diagram tab to add two more use cases, then release the CTRL key.
3. Name the first use case "get account balance sum" and the second, "generate monthly revenue report".
4. Click on the collapse icon of each use case to hide the extensions compartment.

5. Click the actor and use the association handle to create an association between Standard user and "get account balance sum".

To create an "Include" dependency between use cases (creating a subcase):

1. Click the Include handle of the "get account balance sum" use case, at the bottom of the ellipse, and drop the dependency on "get account balance".

An "include" dependency is created, and the include stereotype is displayed on the dotted arrow.

Inserting user-defined / customized actors:

The actor in the "generate monthly revenue report" use case is not a person, but an automated batch job run by a Bank computer.

1. Insert an actor into the diagram using the Actor icon in the icon bar.
2. Rename the actor to Bank.
3. Move the cursor over to the Properties tab, and click the browse ic-browse icon next to the "icon file name" entry.
4. Click the Browse icon to select the user-defined bitmap, Bank-PC.bmp.
5. Deselect the "Absolute Path" check box to make the path relative. Preview displays a preview of the selected file in the dialog box.

6. Click OK to confirm the settings and insert the new actor.
7. Move the new Bank actor to the right of the lowest use case.
8. Click the Association icon ic-association in the icon bar and drag from the Bank actor to the "generate monthly revenue report" use case.

This is an alternative method of creating an association.

Please note:

The background color used to make the bitmap transparent has the RGB values 82.82.82.

Dragging elements - Snap lines

When dragging components in a diagram, guide lines appear allowing you to align an element to any other element in the diagram. This option can be enabled/disabled using the menu option Tools | Options | View - Alignment group "Enable Snap lines".

Aligning and adjusting the size of elements:

1. Create a selection marquee by dragging on the diagram background, making sure that you encompass all three use cases starting from the top.

Note that the last use case to be marked, is shown in a dashed outline in the diagram, as well as in the Overview window.

All use cases are selected, with the lowest being the basis for the following adjustments.

2. Click the Make same size icon ic-makesame-size in the title bar.
3. Click the Center Horizontally icon ic-cent-vert to line up all the ovals.

The use case elements are all centered and of the same size.

Please note:

You can also use the CTRL key to select multiple elements.


Class Diagrams

Altova web site: AltovaWebLink UML Class diagrams

The aim of this tutorial section is to:

· Add a new abstract class called Account, as well as attributes and operations
· Create a composite association from Bank to Account

To open a different diagram in UModel:

1. Click the Diagram Tree tab.
2. Expand the Class Diagrams package to see its contents.

All class diagrams contained in the project are displayed.

3. Double click the ic-mod-diagram BankView Main diagram icon.

The Class diagram appears as a tab in the working area.

Please note:

You could of course, double click the Class diagram icon in the Model Tree tab below the BankView package to achieve the same thing.

Two concrete classes with a composite association between them, are visible in the class diagram.

To add a new class and define it as abstract:

1. Click the class icon ic-class in the icon bar, then click to the right of the Bank class to insert it.
2. Change the Class1 name to e.g. "Account", press Enter to confirm, (double click the name if it becomes deselected).

Note that the Properties tab displays the current class properties.

3. Click the "abstract" check box in the Properties pane to make the class abstract.
4. Click in the "code file name" text box, and enter Account.java to define the Java class.

The class title is now displayed in italic, which is the identifying characteristic of abstract classes.

To add properties to a class:

1. Right click the Account class and select New | Property, or press the F7 key.

A default property "Property1" is inserted with stereotype identifiers << >>.

2. Enter the Property name "balance", and then add a colon character ":".

A drop-down list containing all valid types is displayed.

3. Enter the "f" character through the keyboard, and press Enter to insert the return value datatype "float".

Please note that drop-down lists are case sensitive!

4. Continue on the same line by appending "=0" to define the default value.
5. Press the F7 keyboard key to add a second property to the class.
6. Enter Id: and select String from the drop-down list.

To add operations to a class:

1. Right click the Account class and select New | Operation, or press the F8 key.
2. Enter Account() as the constructor.

Using the method described above:

3. Add two more operations namely getBalance:float and getId:String.

Using the autocomplete function while defining operations:

4. Create another operation, using F8, collectAccountInfo and enter the open parenthesis character "(".

Entering the "i" character opens the drop-down list allowing you to select one of the operation direction parameters: in, inout, or out.

5. Select "in" from the drop-down list, enter a "space" character, and continue editing on the same line.
6 Enter "bankAPI" and then a colon.
7. Select IBankAPI from the drop-down list, add the close parenthesis character ")", and enter a colon ":".

8. Press the "b" key to select the boolean datatype, then Enter to insert it.
9. Press Enter to end the definition.

Please note:

Clicking the visibility icon to the left of an operation ic-mod-operation, or property ic-mod-property, opens a drop-down list enabling you to change the visibility status. Note that these visibilty icons can be changed to the UML conformant symbols.

Deleting class properties and operations from a Class Diagram:

1. Press F8 then Enter, to add a default operation "Operation1" in the Account class.
2. Click Operation1 and press the Del. key to delete it.

A delete prompt appears asking if you want to delete the element from the project. Click Yes to delete Operation1 from the class as well as from the project.

Please note:

If you only want to delete the operation from the class in the diagram, but not from the project, press the CTRL+Del. key. You can also enable a prompt that queries you when deleting objects, please see "Tools | Editing" for more information.

Finding (deleting) class properties and options from the Model Tree:

Properties and options can also be deleted directly from the Model Tree. To do this safely, it is important to first find the correct property. Assuming you have inserted "Operation1" in the Account class (press F8, then Enter to insert):

1. Right click Operation1 in the Account class.
2. Select the option "Select in Model Tree" or press F4.

The Operation1 item is now highlighted under Account in the Model Tree tab.

3. Press the Del key to delete the operation from the class and project!

Note that almost any modeling element can be found in the Model Tree when pressing F4.

Please note:

It is also possible to navigate from the Properties pane to the Model Tree when viewing an attributes properties, please see: the Properties in the User Interface section.

Creating an composition association between the Bank and Account classes:

1. Click the Composition icon ic-comp-ass in the title bar, then drag from the Bank class to the Account class. The class is highlighted when the association can be made.

A new property (Property1:Account) is created in the Bank class, and an composite association arrow joins the two classes.

2. Double click the new Property1 entry in the Bank class and change it to "accounts", being sure not to delete the Account type definition (displayed in teal/green).
3. Press the End keyboard key to place the text cursor at the end of the line, and
4. Enter the open square bracket character "[" and select "*" from the dropdown list, to define the multiplicity, and press Enter to confirm.


Creating derived classes

The aim of this tutorial section is to:

· Add a new Class diagram called Account Hierarchy to the project
· Insert existing classes, and create a new Savings account class
· Create three derived classes of the abstract base class Account, using Generalizations

To create a new Class Diagram:

1. Right click the bankview package (under Design-phase | BankView | com | altova) in the Model Tree tab, and select New Diagram | Class Diagram.
2. Double click the new ClassDiagram1 entry and rename it to "Account Hierarchy", and press Enter to confirm.

The Account Hierarchy tab is now visible in the working area.

Inserting existing classes into a diagram:

1. Click the Account class in the bankview package (under com | altova | bankview), and

2. Drag it into the Account Hierarchy tab.
3. Click the CheckingAccount class (of the same package) and drag it into the tab.
4. Place the class below and to the left of the Account class.
5. Use the same method to insert the CreditCardAccount class. Place it to the right of the CheckingAccount class.

Adding a new class:

1. Right click the diagram background (to the right of CreditAccountClass) and select New | Class.

A new class is automatically added to the correct package, i.e. bankview which contains the current class diagram Account Hierarchy.

2. Double click the class name and change it to SavingsAccount.

3. Press the F7 key to add a new property.
4. Enter "interestRate", then a colon, and press "f" to select the float datatype from the dropdown list and press Enter twice to select and confirm the entry.
5. Press F8 and add the operation/constructor SavingsAccount().
6. Use the same method, F8, to add the operation getMinimumBalance:float.

7. Click in the "code file name" text box, in the Properties tab, and enter SavingsAccount.java to define the Java code class.

Reusing/copying existing Properties/Operations:

Properties and operations can be directly copied, or moved, from one class to another. This can be achieved using drag and drop, as well as the standard keyboard shortcuts:

· within a class in the diagram tab
· between different classes in the diagram tab
· in the Model Tree view
· between different UML diagrams, by dropping the copied data onto a different diagram tab.

Please see "Cut, copy and paste in UModel Diagrams" for more information.

1. Expand the Account class in the Model Tree.
2. Right click the collectAccountInfo operation and select Copy.

3. Right click the SavingsAccount class in the Model Tree and select Paste.

The operation is copied into the SavingsAccount class, which is automatically expanded to display the new operation.

The new operation is now also visible in the SavingsAccount class in the Class Diagram.

Please note:

You can use the Copy/Paste keyboard shortcuts (CTRL C, or V), as well as drag and drop in the Model Tree to achieve the same effect. You might have to disable the sort options to drop the operation between specific items.

Creating derived classes - Generalization/Specialization:

At this point the class diagram contains the abstract class, Account, as well as three specific Account classes. We now want to define, or create a generalization/specialization relationship between Account and the specific classes i.e. to create three derived concrete classes.

1. Click the Generalization icon ic-generalize in the icon bar and hold down the CTRL key.
2. Drag from CreditCardAccount (the class in the middle) and drop on the Account class.
3. Drag from the CheckingAccount class and drop the arrowhead of the previously created generalization.
4. Drag from the SavingsAccount class and drop the arrowhead of the previously created generalization: release the CTRL key at this point.
5. Generalization arrows are created between the three subclasses, and the Account superclass.


Object Diagrams

Altova web site: AltovaWebLink UML Object diagrams

The aim of this tutorial section is to:

· Show how class and object diagrams can be combined in one diagram, to give you a snapshot of the objects at a given point of time
· Create Objects/Instances and define the relationships between them
· Format association/links
· Enter real-life data into objects/instances

To open the Object diagram:

1. Double click the Sample Accounts diagram icon under the bankview package (or under Object Diagrams in the Diagram Tree tab).

The Bank class and two related objects/instances are displayed in the object diagram.

AltovaBank:Bank is the object/instance of the Bank class, while John's checking: CheckingAccount is an instance of the class CheckingAccount.

Inserting a class into an Object diagram:

· Click the Account class icon [image] in the Model Tree, and drag it into the "Sample Accounts" tab.

The composite association defined previously, in BankView Main diagram, is automatically created.

To add a new object/instance by selecting its type:

1. Click the InstanceSpecification icon ic-instance-spec in the icon bar, then click under the John's Checking object in the diagram tab.
2. Change the name of the instance to John's Credit, and press Enter.

While the instance is active, all its properties are visible in the Properties tab.

3. Click the classifier combo box and select the entry CreditCardAccount from the drop-down list.

Note that right clicking an instance specification and selecting Show/Hide Node content allows you show/hide object content.

To add a new object in the Model Tree view (then insert it into a diagram):

1. Right click the bankview package in the Model Tree tab, and select New element | InstanceSpecification.
2. Change the default object name to John's Saving, and press Enter to confirm.

The new object is added to the package and sorted accordingly.

While the object is still selected in the Model Tree tab,

3. Click the classifier combo box, in the Properties tab, and select SavingsAccount.

4. Drag the John's Saving object/instance from the Model Tree tab, into the Sample Accounts tab, placing it below John's credit.

Creating "links" between objects:

Links are the instances of class associations, and describe the relationships between objects/instances at a fixed moment in time.

1. Click the existing link (association) between the AltovaBank and John's Checking.
2. In the Properties tab, click the classifier combo box and select the entry Account - Bank.

The link now changes to a composite association, in accordance with the class definitions.

3. Click the InstanceSpecification icon ic-instance-spec in the icon bar, and position the cursor over the John's Credit class.

The cursor now appears as a + sign.

4. Drag from John's Credit object to AltovaBank to create a link between the two.
5. Use the classifier combo box in the Properties tab to change the link type to Account - Bank.
6. Use the method outlined above to create a link between John's Saving and AltovaBank.

Please note:

Changes made to the association type in any class diagram, are now automatically updated in the object diagram.

Formatting association/link lines in a diagram:

1. Click the lowest link in the diagram, if not active, and drag the corner connector to the left.

This allows you to reposition the line both horizontally and vertically.

Use this method to reposition links in the diagram tab.

Entering sample data into objects:

The instance value of an Attribute/Property in an object is called a slot.

1. Click in the respective slots of each object and enter sample data.
2. E.g. in John's Checking object, double click in the balance slot and enter 11,975.00 as the balance.
3. Fill in the rest of the data to give yourself an idea of the current instance state.


Component Diagrams

The aim of this tutorial section is to:

· Show how to insert classes into a component diagram
· Create realization dependencies between the classes and the BankView component
· Show how to change line properties
· Insert components into a component diagram, and create usage dependencies to an interface

To open the component diagram:

1. Click the Diagram Tree tab, expand the Component Diagrams component and double click the "BankView realization" diagram icon.

The "BankView realization" component diagram is displayed.

2. Switch back to the Model Tree tab by clicking that tab.

To insert (existing) classes into a component diagram:

1. Locate the SavingsAccount class comp2 under the bankview package.
2. Drag it into the component diagram.

The class is displayed with all its compartments.

3. Click both collapse icons to end up with the only the class name compartment.
4. Use the same method to insert the abstract class Account.

Please note:

The package containing the inserted class, is displayed in the name compartment in the form "from bankview".

To create Realization dependencies between a class and component:

1. Click the Realization icon ic-realization in the icon bar.
2. Drag from SavingsAccount, and drop the arrow on the BankView component.

3. Click the ComponentRealization handle of the Account class (at the base), and drop it on the BankView component.

Both of these methods can be used to create realization dependencies. There is another method that allows you to create realization dependencies solely in the Model Tree, please see Round-trip engineering (code - model - code) for more information.

Changing (Realization) line characteristics:

Clicking a dependency or any other type of line in a UModel diagram, activates the line drawing icons in the Layout icon bar.

1. Click the realization line between SavingsAccount and BankView.
2. Click the line type icon Direct line ic-line-direct in the Layout toolbar.

The line properties are immediately altered. Lines have small icons along them called waypoints. Waypoints can be clicked and moved to alter line characteristics. Change the line properties to suit your needs.

Inserting components and creating usage dependencies:

1. Double click the Overview diagram icon directly under the Design-phase package in the Model Tree.

The Overview component diagram is opened and displays the currently defined system dependencies between components and interfaces.

2. Click the BankView GUI component under the Component View | BankView package in the Model Tree, and drag it into the Overview diagram tab.

The package containing the inserted component is displayed in the name compartment, "from BankView".

3. Use the same method to insert the BankView component under the same package.

The BankView component is the component produced by the "forward-engineering" process described in this tutorial.

To create a usage dependency between interfaces and components:

1. Click the Usage icon ic-usage in the icon bar.
2. Drag from the BankView GUI component to the BankView component.
3. Click the Usage icon again, and drag from the BankView component to the IBankAPI interface.

The usage dependency (<<use>>) connects a client element to a supplier element. In this case the IBankInterfaceAPI interface uses the services of components BankView and BankView GUI.


Deployment Diagrams

The aim of this tutorial section is to:

· Show the artifact manifestation of components
· Add a new node and dependency to a Deployment diagram
· Add artifacts to a node and create relationships between them

To open the Deployment (Artifacts) diagram:

1. Click the Model Tree tab, expand the Deployment View diagram package, then double click the Artifacts icon.

This diagram shows the manifestation of the Bank API client and the BankView components, to their respective compiled Java .jar files.

To open the Deployment diagram:

1. Double click the Deployment icon under the Deployment View package.

The Deployment diagram is opened and displays the physical architecture of the system, which currently only comprises of the Home PC node.

To add a Node to a Deployment diagram:

1. Click the Node icon ic-node in the icon bar, and click right of the Home PC node to insert it.
2. Rename the node to Bank, and drag on one of its edges to enlarge it.

To create a dependency between two nodes:

1. Click the dependency icon ic-dependency , then drag from the Home PC node to the Bank node.

This creates a dependency between the two nodes.

2. Click into the name field of the Properties tab, change it to TCP/IP, and press Enter to confirm.

The dependency name appears above the dependency line.

Please note:

Having clicked the dependency arrow (or any named elements), you can also enter text directly through the keyboard, without having to first click into the name field.

Adding artifacts to a node and creating dependencies between them:

Expand the Deployment View package, in the Model Tree, to see its contents:

1. Click each of the BankAddresses.ini, BankAPI.jar and BankView.jar artifacts individually, and place them on the diagram background (Deployment dependencies are displayed for each artifact).

2. Click the BankView.jar artifact and drag it onto the Home PC node.

The node is highlighted when the drop action will be successful.

3. Use the same method to drag the other artifacts onto the Home PC node.

The artifacts are now part of the node and move with it when it is repositioned.

4. Click the Dependency icon ic-dependency in the icon bar, and hold down the CTRL key.
5. Drag from the BankView.jar artifact to the BankAddresses.ini artifact; still holding down the CTRL key.
6. Drag from the BankView.jar artifact to the BankAPI.jar artifact.

Please note:

Dragging an artifact out of a node onto the diagram background, automatically creates a Deployment dependency.

To delete an artifact from a node and the project:

· Click the artifact you want to delete and press the Del keyboard key.

The artifact and any dependencies are deleted from the node as well as the project.

To remove an artifact from a node and its diagram:

1. Use drag and drop to place the artifact onto the diagram background.
2. Hold down the CTRL key and press Del.

The artifact and any dependencies are deleted from the current diagram and not from the project.

To create operations / properties, or nesting artifacts:

1. Right click the artifact in the Model Tree.
2. Select the appropriate action from the context menu, e.g. New Element | Operation, | Property, or | Artifact.

The new element will appear below the selected artifact in the Model Tree.


Round-trip engineering (model - code - model)

Altova web site: AltovaWebLink UML code generation and UML Round-trip engineering

The aim of this tutorial section is to:

· Perform a project syntax check
· Generate project code
· Add a new method external code i.e. to the SavingsAccount class
· Synchronize the UModel model new code with the model

Packages and Code / model synchronization:

Code can be merged/synchronized at different levels:

· Project, Root package level (menu item)
· Package level (multiple package selection / generation is possible)
· Class level (multiple class selection / generation is possible)
· Component level

The BankView realization diagram, depicts how the BankView component is realized by its six constituent classes. This is the component that is produced when the forward-engineering section of the tutorial is complete.

To be able to produce code:

· The component must be realized by one or more classes.
· The component must have a physical location, i.e. directory, assigned to it. The generated code is then placed in this directory.
· Components must be individually set to be included in the code engineering process.
· A Java, C#, or VB namespace root package must be defined.

Please note:

The Java namespace root has been set on the Design-phase | BankView | com package in the Model Tree.

Java, C# or VB code can be combined in one project and are automatically handled during the round-trip engineering process. The Bank_MultiLanguage.ump file in the ...\UModelExamples folder is an example of a project for Java and C# types of code.

To define a code generation target directory:

1. Double click the ic-comp-diag Overview icon under the Design-phase package to switch into the component overview.
2. Click the BankView component, in the diagram, and note the current settings in the Properties tab.
3. Click the browse button ic-browse, to the right of the directory field.
4. Enter/select the target directory in the dialog box (the supplied example is defined as InstallationDir\UModelExamples\Tutorial\umlcode\bankview), or click the "Make New Folder" button to create a new folder.

The path now appears in the directory field.

Please note:

UModel Java usually follows the convention of creating code in directories according to their namespace e.g. ...\code\namespace1\C1.java.

If you want to use this directory naming convention for C# and VB .NET, select the menu option Tools | Options | Code Engineering and select the relevant option in the "Use namespace for code file path" group.

To include/exclude components from code generation:

1. Click the BankView GUI component.
2. Uncheck the "use for code engineering" check box (if not already unchecked).

Checking project syntax prior to code generation:

1. Select the menu option Project | Check project syntax.
2. A syntax check is performed, and messages appear in the Messages window, "Bank API-client: code project file or directory not set" - "IBankAPI: code file name not set".

3. Click the first message in the messages window.
4. The Bank API client package is highlighted in the Model Tree view, with its properties visible in the Properties tab.
5. Uncheck the "use for code engineering" check box for the Bank API client component.

6. Check the project syntax again using Project | Check project syntax.

No errors are reported this time around. We can now generate program code for this project. Please see Check Project syntax for more information.

To generate project code:

1. Click the BankView package to select it.
2. Select the menu option Project | Merge Program Code from UModel project.
3. Select your synchronization options from the dialog box, and press OK to proceed (no changes needed for the tutorial; see "Merge Program Code from UModel project" for more information).

The message pane displays the outcome of the code generation process.

4. Navigate to the target directory.

Six .Java files have been created for the project.

Synchronizing the UModel model having updated Java code externally:

1. Open the SavingsAccount.java file in the text editor of your choice, XMLSpy for example.
2. Add the new method to the generated code "public float getInterestRate() {}", and save the file.

3. Switch to UModel and right click the SavingsAccount class ic-class under the BankView package.
4. Select the option Code Engineering | Merge UModel Class from Program Code.

This opens the Synchronization Settings dialog box with the "Model from Code" tab being active. No changes are needed for the tutorial; see "Merge UModel project from code" for more information)

5. Click OK to merge the model from the code.

6. Click the Account Hierarchy tab to see the outcome of the merge process.

The new method added to the code, (getInterestRate...) generates a new operation in the SavingsAccount class of UModel.


Round-trip engineering (code - model - code)

Altova web site: AltovaWebLink Reverse engineering - Java, C#, VB .NET code

The aim of this tutorial section is to:

· Import a directory containing Java code generated by XMLSpy
· Add a new class to the project in UModel
· Merge to the program code from a UModel package

The files used in this example are available as the OrgChart.zip file under ...\UModelExamples folder of your installation. Please unzip the OrgChart.zip file into the ...\UModelExamples folder before you start this section.

This creates the OrgChart directory which will then be used to import the existing code.

To Reverse engineer/import existing code from a directory:

1. Select File | New to create a new project.
2. Select Project | Import source directory.
3. Select the C# (1.2, 2.0, 3.0, or 4.0), Java version (1.4, or 5.0), or VB version (7.1, 8.0, or 9.0) that the source code conforms to.
4. Click the Browse button ic-browse and select the OrgChart directory supplied in the ...\UModelExamples folder.

5. Making sure that the "Enable diagram generation" check box is active, select any specific import settings you need, and click Next.

Note that UModel can generate a single overview diagram and/or a diagram for each package. The settings show above are the default settings.

6. Click Next to continue.

This dialog box allows you to define the package dependency generation settings.

7. Click Finish to use the default settings.

The data is parsed while being input, and a new package called "OrgChart" is created.

8. Expand the new package and keep expanding the sub packages until you get to the OrgChart package (com | OrgChart).

9. Double click the "Content of OrgChart" diagram icon ic-mod-diagram.

The collapsed classes that make up OrgChart are displayed in the main tab.

The current window/view is shown by the red box in the Overview window, which occupies an empty area of the diagram.

10. Click the red box and drag it down to the centre of the window.

Please note:

You could also select the Project | Import source project option and select the Borland JBuilder OrgChart.jpx project file to import the project created by XMLSpy.

Round-trip engineering and relationships between modeling elements:

When updating model from code, associations between modeling elements are automatically displayed, if the option Editing | Automatically create Associations has been activated in the Tools | Options dialog box. Associations are displayed for those elements where the attributes type is set, and the referenced "type" modeling element is in the same diagram.

InterfaceRealizations as well as Generalizations are all automatically shown in the diagram when updating model from code.

Adding a new class to the OrgChart diagram:

1. Click the Class icon ic-class in the icon bar and click to insert a new class.
2. Add a new Class called CompanyType.
3. Add new operations to the class using the F8 shortcut key:

e.g. CompanyType(), getCompanyType():String, setCompanyType():String.

Making the new class available for code generation:

While the CompanyType class is active,

1. Click into the "code file name" field and enter the Java file name of the new class CompanyType.java.

2. Click the new CompanyType class in the Model Tree, drag upwards and drop onto the OrgChart component below the Component View package. A popup appears when the mouse pointer is over a component.

Please note:

This method creates a Realization between a class and a component, without having to use component or deployment diagrams.

3. Expand the Relations item below the Orgchart component, to see the newly created realization.

Merging program code from a package:

1. Right click the OrgChart package, select Code Engineering | Merge Program code from UModel Package, and press Enter to confirm.

The messages window displays the syntax checks being performed and status of the synchronization process.

When complete, the new CompanyType.java class has been added to the folder ...\OrgChart\com\OrgChart\.

Please note:

All method bodies and changes to the code will either be commented out or deleted, depending on the setting in the "When deleting code" group, in the Synchronization settings dialog box.

That's it!

You have learned how to create a modeling project using the forward engineering process, and also completed a full round-trip code engineering cycle with UModel. The rest of this document describes how best to achieve modeling results with UModel.


UModel User Interface

UModel consists of series of panes on the left and a larger diagram tab at right. The panes at left allow you to view and navigate your UModel project from differing viewpoints, and edit data directly.

The panes are Model Tree, Properties, and Overview. The working/viewing area at right is the UModel Diagram tab which currently shows the Class Diagram of the BankView Main package.

Please note:

All panes, as well as diagram tabs, can be searched using the Find combo box in the Main toolbar, which contains the text "account" in the screenshot below, or by pressing CTRL+F.


Model Tree

Model Tree tab

The Model Tree tab allows you to manipulate model items directly in the Model Tree, as well as navigate/view specific items in the Design tab. Right clicking an item opens the context menu, from which specific commands can be selected. The contents of the context menu depend on the item that you select.

Model elements in the Model Tree pane can be directly manipulated:

· Added / inserted
· Copied or moved
· Deleted
· Renamed
· Sorted according to several criteria
· Constrained

In the Model Tree tab, each folder symbol is a UML package!

Adding a new package (or any other modeling element):

1. Right click the folder that you want the new package/element to appear under.
2. Select New | Package (or respective model Element).

Copying or moving model elements:

1. Use the standard windows Cut, Copy or Paste commands or,
2. Drag model elements to different packages. Dragging an elements moves it. Holding down CTRL a and dragging an element creates a copy.

When dragging elements a message might appear stating that select "No sort" needs to be activated to allow you to complete the action. Please see "Cut, copy and paste in UModel Diagrams" for more information.

Sorting elements in the Model Tree (activating no sort):

1. Right click the empty background of the Model Tree tab.
2. Select Sort | No sort.

Elements can now be positioned anywhere in the Model Tree.

Please note:

The Sort popup menu also allows you to individually define the sort properties of Properties and Operations.

Renaming an element:

1. Double click the element name and edit it.

The Root and Component View packages are the only two elements that cannot be renamed.

Deleting an element:

1. Click the element you want to delete (use CTRL+click to mark multiple elements).
2. Press the Del. keyboard key.

The modeling element is deleted from the Model Tree. This means that it is also deleted from the Diagram tab, if present there, as well as from the project. Elements can be deleted from a diagram without deleting them from the project, using CTRL+Del. Please see deleting elements.

To open a diagram in the Diagram tab:

1. Double click the diagram icon ic-mod-diagram of the diagram you want to view in the diagram tab.

Modeling element icon representation in the Model Tree

Package types:

ic-mod-package UML Package

ic-java-non-ns Java namespace root package

ic-csharp-ns C# namespace root package

ic-vb-namespace Visual Basic root package

ic-xsd-pack XML Schema root package

ic-code-pack Java, C#, or VB code package (package declarations are created when code is generated)

Diagram types:

ic-d-activity | Activity diagram | ic-d-profile | Profile diagram
ic-mod-diagram | Class diagram | ic-seq-diag | Sequence diagram
ic-d-commun | Communication diagram | ic-d-statem | State Machine diagram
ic-comp-diag | Component diagram | ic-d-sysdias | SysML diagrams (9 diagram types)
ic-d-compstr | Composite Structure diagram | ic-d-timing | Timing diagram
ic-mod-node-diag | Deployment diagram | ic-d-usecase | Use Case diagram
ic-d-interOv | Interaction Overview diagram | ic-d-schema | XML Schema diagram
ic-mod-object | Object diagram | ic-d-bpmn | Business Process Modeling Notation
ic-d-package | Package diagram |  |

Element types:

An element that is currently visible in the active diagram is displayed with a blue dot at its base. In this case a class element.

ic-mod-obj-instance Class Instance/Object

ic-slot Class instance slot

ic-mod-class-not-ins Class

ic-mod-property Property

ic-mod-operation Operation

ic-mod-param-auto Parameter

ic-actor2 Actor (visible in active use case diagram)

ic-mod-usecase Use Case

ic-mod-component Component

ic-mod-node Node

ic-mod-artifact Artifact

ic-mod-interface Interface

ic-mod-relations Relations (/package)

ic-constraint Constraints

Opening / expanding packages in the Model Tree view:

There are two methods available to open packages in the tree view; one opens all packages and sub packages, the other opens the current package.

Click the package you want to open and:

· Press the * key to open the current package and all sub packages
· Press the + key to open the current package.

To collapse the packages, press the - keyboard key. To collapse all packages click the Root package and press -.

Note that you can use the standard keyboard keys, or the numeric keypad keys to achieve this.

To find modeling elements in Diagram tab(s):

While navigating the elements in the Model Tree, you might want to see where, or if, the element is actually present in a model diagram. There are two methods to find elements:

1. Right click the element you want to see in the Model Tree tab, and select:
· Show element in active diagram - to find it in the same type of diagram tab
· Show element in all diagrams - if currently active diagram differs from selected model element.

To generate a list of elements not used in any diagram:

1. Right click the package you would like to inspect.
2. Select the menu option "List elements not used in any diagram.

A list of unused element appears in the Messages pane. The list in parenthesis, displays the specific elements which have been selected to appear in the unused list, please see the View tab in Reference section under, Tools | Options for more information.

To locate the missing elements in the Model Tree:

· Click the element name in the Messages pane.

Please note:

The unused elements are displayed for the current package and its sub packages.

Packages in the Model Tree tab:

Only the Root and Component packages are visible on startup, i.e. when no project is currently loaded.

· Packages can be created, or deleted at any position in the Model Tree
· Packages are the containers for all other UML modeling elements, use case diagrams etc.
· Packages/contents can be moved/copied to other packages in the Model Tree (as well as into valid model diagrams in the diagram tab)
· Packages and their contents can be sorted according to several criteria
· Packages can be placed within other packages
· Packages can be used as the source, or target elements, when generating or synchronizing code

Generating/merging code:

UModel allows you to generate, or merge program code directly from the Model Tree, please see: Synchronizing Model and source code for more information.

Constraining UML elements:

Constraints can be defined for most model elements in UModel. Please note that they are not checked by the syntax checker, as constraints are not part of the Java code generation process.

To constrain an element (Model Tree):

1. Right click the element you want to constrain, and select New | Constraint.
2. Enter the name of constraint and press Enter.
3. Click in the "specification" field of the Properties tab, and enter the constraint e.g. name length > 10.

To constrain an element in UML diagrams:

1. Double click the specific element to be able to edit it.
2. Add the constraint between curly braces e.g. interestRate:float #{interestRate >=0}.

To assign constraints to multiple modeling elements:

1. Right click the "constrained elements" field in the Properties tab.
2. Select "Add element to constrained elements".

This opens the "Select Elements to be Constrained" dialog box.

3. Select the specific element you want to assign the current constraint to.

The "constrained element" field contains the names of the modeling elements it has been assigned to. The image above, shows that Constraint1 has been assigned to the bankview and com packages.


Diagram Tree

Diagram Tree tab

This tab displays the currently available UModel diagrams in two ways:

· Grouped by diagram type, sorted alphabetically
· As an alphabetical list of all project diagrams

Please note:

Diagrams can be added to, or deleted from, the Diagram Tree tab by right clicking and selecting the requisite command.

To open a diagram in the Diagram tab:

· Double click the diagram you want to view in the diagram tab.

To view all Diagrams within their respective model groups:

· Right click in the pane, and activate the "Group diagram by diagram type" option.

Diagrams are grouped alphabetically within their group.

To view all Diagram types in list form (alphabetically):

· Right click in the pane, and deactivate the "Group diagram by diagram type" option.

All Diagrams are shown in an alphabetically sorted list.


Favorites

Favorites tab

Use this tab as a user-defined repository, or library, for all types of named UML elements i.e. classes, objects, associations etc. but not ProfileApplication or Generalization dependencies. This allows you to create your personal pick-list of modeling elements for quick access.

The contents of the Favorites tab are automatically saved with each project file. Select the menu option Tools | Options, File tab and click the "Load and save with project file" check box to change this setting.

To add an existing modeling element to the Favorites tab:

1. Right click an element in the Model Tree tab, or in the diagram working area.
2. Select the menu item "Add to Favorites".
3. Click the Favorites tab to see the element.

The element appears in the Favorites tab is a view of an existing element, i.e. it is not a copy or clone!

To add a NEW element to the Favorites tab:

1. Right click a previously added package, to which you want to add the element.
2. Select New | "modeling element" from the context menu, where "modeling element" is a class, component, or any other modeling element available in the context menu.

New elements are added to the same element/package in the project, and are therefore also visible in the Model Tree tab.

To REMOVE an element from the Favorites tab:

1. Right click the same element/package that you added to Favorites.
2. Select Remove from Favorites.

Please note:

You can add and remove elements added to the Favorites tab, from the Favorites tab, as well as the Model Tree tab.

Deleting elements from the Favorites tab:

1. Right click the element you want to delete, and press the Del key.

A message box appears, informing you that the element will be deleted from the project.

2. Click OK if you want to delete it from the project.
3. Click Cancel to retain it, and use the Remove method described above, to delete it from the Favorites tab.


Properties

Properties tab

The Properties tab displays the UML properties of the currently active element.

· Clicking any model element in any of the supplied views, or tabs, displays its properties.
· Once visible, model properties can be changed, or completed, by entering data, or selecting various options in the tab.
· Selected properties can also be located in the diagram tabs by selecting Show in Active Diagram from the context menu.

Select in Model Tree

Clicking an attribute in a class diagram displays its properties in the Properties tab. To navigate/find it in the Model Tree:

1. Right click the type entry of the attribute in the Properties tab.
2. Click the "Select in Model Tree" popup.

The IBankAPI interface is now visible in the Model Tree.


Styles

Styles tab

The Styles tab is used to view, or change attributes of diagrams, or elements that are displayed in the diagram view.

These style attributes fall into two general groups:

· Formatting settings; i.e. font size, weight, color etc.
· Display settings/options; show background color, grid, visibility settings etc.

The Styles tab is subdivided into several different categories/sections which can be selected by clicking the "Styles" combo box. The combo box contents depends on the currently selected model element.

Clicking an element in a diagram tab automatically selects the Element Style context, while clicking and element in the Model Tree tab selects the Project Style context.

Style precedence is bottom-up, i.e. changes made at the more specific level override the more general settings. E.g changes (to an object) made at the Element Style level override the current Element Family and Project Styles settings. However, selecting a different object and changing the Element Family Styles setting, updates all other objects except for the one just changed at the Element Style level.

Please note:

Style changes made to model elements can all be undone!

Element Styles:

Applies to the currently selected element in the currently active diagram. Multiple selections are possible.

Styles of Elements with this Stereotype:

Applies to the currently selected stereotype class in the diagram it has been defined, please see User-defined stereotype styles.

Element Family Styles:

Applies to all elements of the same type i.e. of the selected Element Family. E.g. you want to have all Component elements colored in aqua. All components in the Component and Deployment diagrams are now in aqua.

Node / Line Styles:

"Node" applies to all rectangular objects.

"Lines" applies to all connectors: association, dependency, realization lines etc. for the whole project.

Project Styles:

Project Styles apply to the current UModel Project in its entirety (e.g. you want to change the default Arial font to Times New Roman for all text in all diagrams of the project).

Diagram Styles:

These styles only becomes available when you click/select a diagram background. Changing settings here, only affects the single UML diagram for which the settings are defined in the project.

To change settings for all diagrams of a project:

1. Click in the respective diagram,
2. Select the Project Styles entry in the combo box, and scroll to the bottom of the tab.
3. Select one of the Diag.yyy options e.g. Diag. Background color.

This then changes the background color of all diagrams in the current project.

Styles display when multiple elements are selected:

If multiple elements are selected in the diagram pane, then all different style values are displayed in the respective field. In the screenshot below, Class1 and Class2 have been selected.

The fill Color field displays the values for each of the elements, i.e. aqua and silver.

Displaying cascading styles:

If a style is overridden at a more specific level, a small red triangle appears in the respective field in the styles tab.

Placing the mouse pointer over the field displays a popup which indicates the style precedence.

E.g.

The Enumeration, Package and Profile elements all have default fill color settings defined in the Element Family Styles settings. To change the fill colors at the project level, clear the value in the Element Family Styles i.e. select the empty entry in the drop-down list box, select Project styles from the Styles combo box, and change the fill color there.


Hierarchy

Hierarchy tab

The hierarchy tab displays all relations of the currently selected modeling item, in two different views. The modeling element can be selected in a modeling diagram, the Model Tree, or in the Favorites tab.

Please note:

General Hierarchy tab settings are set using the menu option Tools | Options | View, in the Hierarchy group in the lower section of the dialog box.

ic-hier-tree Show Tree view

This view shows multiple relations of the currently selected element e.g. SchemaString. Clicking the various icons in the icon bar, allows you to show all types of relations, or narrow them down by clicking/activating the various icons. In the screenshot above, all icons are active and thus all relations are shown in a tree view.

Double clicking one of the element icons, in the tab, displays the relations of that element.

ic-hier-graph Show graph view

This view shows a single set of relations in an hierarchical overview. Only one of the relation icons can be active at any one time. The Show Generalizations icon is currently active.

Double clicking one of the element icons in the tab, e.g. SchemaTypeNumber, displays the relations of that element.

The currently selected element is now SchemaTypeNumber.

Creating a new diagram from the contents of the window:

The current contents of the graph view pane can be displayed in a new diagram.

1. Right click in the graph view pane and select Create diagram as this graph.

2. Edit the diagram name if necessary, select the style options and click OK.

A new diagram is created.


Overview

Overview tab

The Overview tab displays an outline view of the currently active diagram. Clicking and dragging the red rectangle, scrolls the diagram view in the diagram tab.


Documentation

Documentation tab

Allows you to document any of the UML elements available in the Model Tree tab. Click the element you want to document and enter the text in the Documentation tab. The standard editing shortcuts are supported i.e. cut, copy and paste.

Documentation and code engineering:

During code engineering, only class and interface documentation is input/output. This includes documentation defined for class/interface properties and operations.

1. Select Project | Synchronization settings.
2. Activate the "Write Documentation as JavaDocs" check box to enable documentation output.

Please note:

When importing XML schemas, only the first annotation of a complex- or simpleType is displayed in the Documentation window.


Layer

Layer tab

The Layer tab allows you to define multiple layers for any UModel diagram. Single, as well as multiple, layers can be shown, locked and hidden. Layers allow you to make logical groupings of modeling elements on a diagram. You could for instance have internal info on classes, as notes, or unfinished classes on separate layers.

Please note:

Any UML elements can be assigned to any layer. You could have all associations on one layer, notes on another etc. New elements are always added to the currently active layer, which is highlighted in the Layer window. The following section describes all functions available through the Layer context menu.

· Associations, dependencies etc. can also be created between elements on different layers, if those layers are currently visible.
· Multiple layers can be viewed and worked on simultaneously.
· Elements can be moved from one layer to another.
· Layers can be deleted where all elements are then merged to the layer you specify.
· When printing diagrams only those elements on the currently visible layer are printed.

layer-append Append new layer

Appends a new layer to the current list of layers using a default name e.g. New Layer 1.

layer-insert Insert new layer

Inserts a new layer above the currently active layer in the layer list. This is only possible if more than one layer exists.

Having inserted a new layer, it then becomes the active layer. The new layer settings are:

· Visible, unlocked and (0) elements currently on this layer.
· Both the Default and New Layer are currently visible.

To add elements to a new layer:

1. Click the layer you want to add the elements to in the layer list, e.g. New Layer 1.
2. Insert the new objects in the Diagram window, e.g. a note containing text describing a class.

Note that the element number on this layer has now changed to 1, and the elements of the Default layer are also still visible.

To view elements of a specific layer:

1. Click the hide/show icon layer-showlay of the specific layer(s) you want to hide, so that only the layer you want to view is still active/visible.
2. E.g. Click the hide/show icon of the Default layer to only show the elements on New Layer 1.

Note that the show/hide icon changes to its hidden representation, and that only the note element is now visible in the diagram tab.

To delete a layer:

1. Right click the specific layer in the layer list and select Delete from the context menu.

You are prompted if you want to Merge the layer items to one of the existing layers, and delete the current one.

OK merges and deletes, Cancel, cancels the action.

To move elements to a different layer:

1. Right click the element you want to move and select the option Layer | "Name of Layer" the element should be moved to.
2. E.g. right click the note element and select Layer | Default.

Alternatively:

1. Click the element and use drag & drop to to place it onto the target layer name, e.g. Default, in the Layer list of the Layer tab.

To lock elements on a layer:

· Click the Lock icon layer-lock of the specific layer, to lock the positions of all the elements of the active layer.

Note that new elements can still be placed on the active layer, but cannot be selected or moved once they have been inserted.

To select elements of a specific layer:

The layer must be unlocked to be able to use this feature.

1. Select the layer containing the elements you want to select in the layer list.
2. Click the Previous layer-prevelem or Next layer-nextelem element icon in the Layer icon bar.

Each element of the active layer is selected in sequence with every click on the icon, i.e. you cycle through all elements of the active layer.

To select all items of a layer:

1. Right click the layer in the Layer window and select Items | Select.

This selects all items of the current layer.

To select the items of all layers except the currently active layer:

1. Right click the layer in the Layer window and select Items | Select.Others.

This selects all items of all currently visible layers, except for those on the currently active layer!

To toggle the element counter of the layer list:

· Click the layer-showno icon of the icon bar.

To reset all layer states:

· Click the layer-reset icon of the icon bar, to set all layers to visible and unlocked.


Layer Context menu

Right click in the layer list window to open the context menu.

Append

Appends a new layer to the current layer list, and assigns a default name which you can change immediately or throught the context menu option "Rename".

Insert

Inserts a new layer above the currently active layer in the layer list.

Delete

Deletes the currently active layer and moves the elements to an existing layer you select in the dialog box.

Rename

Allows you to rename the currently active layer in the layer list.

Merge to

Moves all the elements of the currently active layer to the layer you select in the flyout menu. The flyout menu contains a list of the currently available layers.

The following commands affect only those elements which are currently visible in the diagram tab, i.e. which are present on those layers which are currently set as active/visible.

Suboptions available are:

Selected Layer | affects only the current/active layer & elements on that layer
Unselected - Select Others | affects all other layers & elements on those layers

Items

Selected Layer, selects/marks all elements of the selected layer.

Unselected, selects/marks all elements of the unselected layer(s).

Show

Selected Layer, shows all elements of the selected layer.

Unselected, shows all elements of the unselected layer(s).

Hide

Selected Layer, hides all elements of the selected layer.

Unselected, hides all elements of the unselected layer(s).

Toggle Visibility

Selected Layer, toggles visibility of all elements of the selected layer.

Unselected, toggles visibility of all elements of the unselected layer(s).

Unlock

Selected Layer, unlocks all elements of the selected layer.

Unselected, unlocks all elements of the unselected layer(s).

Lock

Selected Layer, locks all elements of the selected layer.

Unselected, locks all elements of the unselected layer(s).

Toggle lock

Selected Layer, toggles lock of all elements of the selected layer.

Unselected, toggles lock of all elements of the unselected layer(s).


Messages

The Messages window displays warnings, hints and error messages when merging code, or checking the project syntax.

Clicking the error message highlights the corresponding element in the Model Tree and also in the owning diagram, if that diagram is currently active/open.

Clicking a parsing error in the Messages window of the Visual Studio or Eclipse Editions, opens the corresponding source code file with the cursor positioned in the line containing the error.


Diagram pane

UModel Diagram pane

The diagram pane displays all the currently opened UModel diagrams as individual tabs.

To create a new diagram:

1. Click a package in the Model Tree tab.
2. Select New | YYY Diagram.

To create a new diagram containing contents of an existing package:

1. Right click a package and select Show in new Diagram | Content.

To open / access a diagram:

· Double click the diagram icon in any of the Model Tree pane tabs (to open).
· Clicking any of the tabs in the Diagrams pane (to access).

To close all but the active diagram:

· Right click the diagram tab that is to remain open, select the option Close All but active.

Deleting a diagram:

· Click the diagram icon in the Model Tree and press Del. key.

Moving diagrams in a project:

· Drag the diagram icon to any other package in the Model Tree Tab.

You might have to enable the "no sort" option to move it.

Finding (deleting) class properties and options from the Model Tree:

Properties and options can also be deleted directly from the Model Tree. To do this safely, it is important to first find the correct property. Assuming you have inserted "Operation1" in the Account class (press F8, then Enter to insert):

1. Right click Operation1 in the Account class.
2. Select the option "Select in Model Tree" or press F4.

The Operation1 item is now highlighted under Account in the Model Tree tab.

3. Press the Del key to delete the operation from the class and project!

Note that almost any modeling element can be found in the Model Tree when pressing F4.

Please note:

It is also possible to navigate from the Properties pane to the Model Tree when viewing an attributes properties, please see: the Properties in the User Interface section.

Deleting elements from a diagram:

Delete element from the diagram and project!

· Select the element you want to delete and press the Del. keyboard key.

Delete element from diagram only - not from the project!

1. Select the element you want to "delete"
2. Hold down the CTRL key and press Del.

An auto-layout function allows you to define how you would like your diagram to be visually structured. Right click the diagram background and select either:

· Autolayout All | Force directed, or
· Autolayout All | Hierarchic
· Autolayout All | Block

Showing relationships between modeling elements:

1. Right click the specific element and select Show.

The popup menu shown below is context specific, meaning that only those options are available that are relevant to the specific element.

To show / hide text labels:

· Right click a class or association arrow and select Text labels | Show (Hide) all Text labels.

To show a class attribute/property as an association:

1. Right click the property in the class.

2. Select the menu option Show | "PropertyXX" as Association.

This inserts/opens the referenced class and shows the relevant association.

To show source code comments in the model diagram:

· Right click the class in the diagram pane and select Show | Annotating comments.

This allows you to directly edit source code DocComments, also visible in the Documentation window, in the modeling diagram.

To adjust the line thickness (weight) in a project:

1. Click in any diagram, then click the Styles tab.

Making sure that the Project Styles entry in the combo box is active

2. Scroll down to Line thickness and select the value that you want.

This affects the thickness of all association, aggregation, generalization etc. lines in all diagrams of the current UModel project.


Diagram properties

Configuring diagram properties

Click on the diagram background and then select one of the styles from the Styles combo box. Please see Styles pane for more information.

To enlarge the Diagram size:

The size of the diagram tab is defined by the elements and their placement.

· Drag an element to one of the diagram tab edges to automatically scroll the diagram tab and enlarge it.

Positioning modeling elements - the grid

Modeling elements can be positioned manually, or made to snap to a visible/invisible grid in a diagram.

ic-showgrid toggles between showing / hiding the grid

ic-snapgrid toggles between snapping elements to the visible / invisible grid

Displaying the UML diagram heading

ic-show-diaghead toggles between displaying the UML diagram heading, i.e. the frame around a diagram with its name tag in the top left corner.

Aligning modeling elements

Modeling elements can be aligned, and resized, in relation to other elements e.g. all centered, left or right aligned etc.

Please note:

When marking several objects, the action that you apply uses the element that was selected last as the template you apply. E.g. if you mark three class elements and click the "Make same Width" icon, then all three will be made as wide as the last class you selected.

This also applies when marking several objects using the marquee, the element last selected by the marquee becomes the template element whose properties are applied to the other marked objects.

Icon functions for each icon group:

Align Left, align Right

Align Top, align Bottom

Center vertically, center horizontally

Space Across, Space down

Line up horizontally, line up vertically.

Make same width, make same height, make same size.

Enhanced autocompletion window - selecting datatypes

When inputting datatypes for operations or properties, an autocomplete window is automatically opened. The autocompletion popup has the following features:

· Clicking a column name sorts the window by that attribute in ascending/descending order.
· The window can resized by dragging the bottom right corner.
· The window contents can be filtered by clicking the respective category icons at the bottom of the window.
· The Single mode icon ic-singlemode lets you switch between enabling only one of the category icons at any one time (single mode), or enabling multiple category icons (multi mode). Ths shot below shows the autocompletion window in "multi-mode", i.e. all category icons are enabled. The single mode icon is not enabled.
· The Set all / Clear all Categories icons, set or clear all categories icons.
· On-demand popup pressing CTRL+Space, when autocompletion is disabled.

Filter categories:

Class, Interface, PrimitiveType, DataType, Enumeration, Class Template, Interface Template, DataType Template.

Please note:

To enable/disable the autocompletion select Tools | Options | Diagram Edting tab, then click the "Enable automatic entry helper" option. The on-demand availability is not affected by this setting however.


Cut, copy and paste in UModel Diagrams

Cut, Copy and Paste of diagram elements within the Diagram pane

All UModel diagram elements can be cut, copied and pasted within, across the same type, and even into other types of diagram tab. Mouse or keyboard shortcuts can be used to achieve this in two different ways:

Having copied an element:

· "Paste", using the keyboard shortcut CTRL+V, or "Paste" from the context menu, as well as Paste from the Edit menu, always adds a new modeling element to the diagram and to the Model Tree.

· "Paste in diagram only", using the context menu, i.e. right clicking on the diagram background, only adds a "link/view" of the existing element, to the current diagram and not to the Model Tree.

Using the Class diagram as an example:

Paste (CTRL+V) of a copied class:

· Pasting a copied class in the same diagram (or package), inserts a new class with the source class name plus a sequential number. E.g source class name is myClass, pasted class name is myClass1. All operations and properties are also copied to the new class.

· Pasting a copied class into a different package, also inserts a new class, but keeps the original class name.
· In both cases the new class is also added to the Model Tree as well.

Paste (CTRL+V) of copied Properties or Operations:

· Pasting a Property in the same class, inserts a new property with the source property name plus a sequential number e.g. MyProperty1.

· Pasting an Operation in the same class, inserts a new operation of the same name as the source operation.

· In both cases a new property/operation is added to the Model Tree.

"Paste in Diagram only":

Whenever you use the context menu and select this option, a "link", or "view" to the element is created in the diagram you paste it into. Using the Class diagram as an example:

· "Paste in diagram only", creates a "view" to the original class
· The class is inserted into the diagram and displayed exactly as the source class
· A new class has not been added to the Model Tree!
· No class name or other Operation/Property changes are made
· Changing element properties in one of the "views", changes it in the other one automatically

Copy and pasting of elements using the mouse:

1. Click on the modeling element you want to copy.
2. Move the mouse pointer to the position you want to place the new element.
3. Hold down the CTRL key. A small plus appears below the mouse pointer to signify that this is a copy procedure.
4. Release the mouse button.

A popup menu appears at this point allowing you to select between Paste, and Paste in Diagram only.

5. Select the option that you would like to perform.

Please note:

Using the mouse and CTRL key allows you to copy, or move properties and operations directly within a class.


Adding/Inserting model elements

Model elements can be created and inserted into diagrams using several methods:

· By adding the elements to specific packages, in the Model Tree view
· By dragging existing elements from the Model Tree tab into the diagram tab
· By clicking a specific UML element icon, and inserting it into the diagram
· By using the context menu to add elements to the diagram (and automatically to the Model Tree view).

Please note that multiple elements can be selected in the Model Tree using either SHIFT+click, or CTRL+click.

Adding elements in the Model Tree/Favorites tab:

· Right click a package, select New, and then select the specific element from the submenu.

This adds the new element to the Model Tree tab in the current project.

Inserting elements from the Model Tree view into a diagram:

Model elements can be inserted individually, or as a group. To mark multiple elements use the CTRL key and click each item. There are two different methods of inserting the elements into the diagram: drag left, and drag right.

· Drag left (normal drag and drop) inserts elements immediately at the cursor position (any associations, dependencies etc. that exist between the currently inserted elements and the new one, are automatically displayed).

· Drag right (holding down the right mouse button and releasing it in the diagram tab) opens a popup menu from which you can select the specific associations, generalizations you want to display.

Example:

You want to replicate the Account Hierarchy diagram in a new class diagram.

1. Right click the bankview package and select New | Class Diagram.
2. Locate the abstract Account class in the model tree, and use drag right to place it in the new diagram.

The context menu shown above, is opened.

3. Select the Insert with Generalization Hierarchy (specific) item.

4. Deselect the check boxes for specific items you want to appear in the elements (Properties and Operations in this case).
5. Click OK.

The Account class and its three subclasses, are all inserted into the diagram tab. The Generalization arrows are automatically displayed.

Adding elements to a diagram using the icons in the icon bar:

1. Select the specific element you want to insert by clicking the associated icon in the icon bar.
2. Click in the diagram tab to insert the element.

Please note:

Holding down the CTRL key before clicking in the diagram tab, allows you to insert multiple elements of the same type with each individual click in the diagram.

Adding elements to a diagram using the context menu:

· Right click the diagram background and select New | element name.

Please note:

Adding new elements directly to the diagram tab, automatically adds the same element to the Model Tree tab. The element is added to the package containing the UML diagram in the Model Tree view.

· Right click an element and select Show | xx

E.g. Right clicking the Account class and selecting Show | Generalization hierarchy. This then inserts the derived classes into the diagram as well.


Hyperlinking modeling elements

UModel now supports automatic and manual hyperlinking of modeling elements. Automatic hyperlinking occurs when selecting the specific setting when importing source code, or binary files, into a model.

Manual hyperlinks are created between most modeling elements (except for lines) and:

· any diagram in the current *.UMP project
· any element on a diagram
· any element in the Model Tree
· external documents, e.g. PDF, Excel or Word documents
· web pages

Note:

All manually created hyperlinks are also available in the HTML project documentation when generating UML documentation.

Opening the Bank Server diagram under the Bank Server package displays the IBankAPI interface as well as the BankServer class. An enumeration element containing the names of the EnumerationLiterals is also visible. What we want to do is create a hyperlink from the Enumeration to the Account Hierarchy class diagram.

To create a diagram hyperlink:

1. Right click the element and select Hyperlinks | Insert/Edit hyperlinks.

This opens the Edit Hyperlinks dialog box in which you manage the hyperlinks.

2. Click the Add button and select Diagram Link to define a link to an existing diagram.

3. Select the hyperlink target that you want to be able to navigate to, e.g. Hierarchy of Account diagram, and click OK.

Double clicking in the User defined name column allows you to define your own link name.

Note that you can add multiple, as well as different kinds of links from a single modeling element e.g. a web link to http://altova.com/support_help.html using the Add | Web Link.

4. Click OK when you have finished defining your hyperlinks.

A link icon has now been added to the top left of the enumeration element. Placing the mouse cursor over the link icon, displays a popup with the name of the target element.

Hyperlinks on operations

Hyperlinks from a state machine entry action

To create a link to a specific Diagram element (Diagram Link):

1. Create the hyperlink as before but click the + sign to expand the diagram contents.

2. Select the specific modeling element you want to link to and click OK to confirm.

Clicking the link icon opens the designated diagram with the element visible and selected.

To create a link to an element in the Model Tree (Model Link):

· Use the same method as described above, but click Add | Model Link in the dialog box.

Clicking the link once it has been inserted, navigates to the specific element you selected from the dialog box in the Model Tree.

Note: when generating project documentation, the hyperlinks to the model elements in the Model Tree are adjusted to point to the correct definitions in the generated documentation.

To create a link to a document:

1. Click the Add | File Link in the Edit Hyperlinks dialog box.
2. Select the document that you want to link e.g. *.DOC, *.XLS, *.PDF etc.

To create a hyperlink from a note:

1. Select the text in the note by dragging, or double clicking a word.
2. Right click the selected text and select the menu object Insert/Edit Hyperlinks.
3. Use the Edit Hyperlinks dialog box to create a link to a diagram.

Please note:

Use the same method to create hyperlinks from Comment elements.

To create a link from the Documentation tab:

1. Enter the explanatory text into the Documentation tab.
2. Select the text you want to use as a link
3. Right click and select the type of link you want to create.

To navigate to a hyperlink target:

1. Click the hyperlink icon in the modeling element.

If only one target is defined then the target diagram, website etc., will appear immediately.

If multiple targets were defined, a popup dialog appears allowing you to select one of the available targets.

Clicking the first item opens the Hierarchy of Account diagram.

Navigating hyperlinks:

· Click the Previous ic-back and Next ic-fwd icons, in the main icon bar, to navigate the source and destination links.

To edit/change a hyperlink target:

1. Right click the link icon and select Insert, edit or remove hyperlinks item.
2. Use the Edit Hyperlinks dialog box in to manage your hyperlinks.


Bank samples

The ...\UModelExamples folder contains sample files which show different aspects of UML modeling in UModel. They are designed to show language specific models for Java, C# and a combination of both languages in one modeling project.

The Bank_Java.ump sample file is shown below:

· the Java profile has been assigned to the Bankview package
· the Java namespace root has been assigned to the Banking access and BankView packages.
· the Interaction View package contains two interaction elements which each contain a sequence diagram.

The Bank_CSharp.ump sample file is shown below:

· the C# profile has been assigned to the BankView package
· the C# namespace root has been assigned to the Banking access and BankView packages.
· the Interaction View package contains two interaction elements which each contain a sequence diagram.

The Bank_MultiLanguage.ump sample file is shown below:

· the Java profile has been assigned to the BankView package
· the C# namespace root has been assigned to the Bank Server package
· the Java namespace root has been assigned to the BankView package.
· the Interaction View package contains two interaction elements which each contain a sequence diagram.
· the project has been split up into 4 editable subprojects, Bank Server.ump, Banking access.ump, BankView.ump and Bank_Multilanguage_Use Case View.ump.


UModel Command line interface

UModel now supports batch-processing. A UModelBatch.exe file is available in the ...\UModel2013 folder.

The command line parameter syntax is shown below, and can be displayed in the command prompt window by entering: umodelbatch /?

Please note:

If the path, or file name contains a space, please use quotes around the path/file name i.e. "c:\Program Files\...\File name"

usage: umodelbatch [project] [options]

/? or /help ... display this help information

project ... project file (*.ump) see also File: New/Load/Save options

/new[=file] ... create/save/save as new project

/set ... set options permanent

/gui ... display UModel user interface

commands (executed in given order):

/chk ... check project syntax

/isd=path ... import source directory

/isp=file ... import source project file

(*.project,*.xml,*.jpx,*.csproj,*.csdproj,*.vbproj,*.vbdproj,*.sln,*.bdsproj)

/ibt=list ... import binary types (specify binary[typenames] list)

(';'=separator, '*'=all types, '#' before assembly names)

/ixd=path ... import XML schema directory

/ixs=file ... import XML schema file (*.xsd)

/m2c ... update program code from model (export/forward engineer)

/c2m ... update model from program code (import/reverse engineer)

/ixf=file ... import XMI file

/exf=file ... export to XMI file

/inc=file ... include file

/mrg=file ... merge file

/doc=file ... write documentation to specified file

/lue[=cpri] ... list all elements not used on any diagram (i.e. unused)

/ldg ... list all diagrams

/lcl ... list all classes

/lsp ... list all shared packages

/lip ... list all included packages

options for save as new project:

/npad=opt ... adjust relative file paths (Yes | No | MakeAbsolute)

options for import commands:

/iclg=lang ... code language (Java1.4 | Java5.0 | Java6.0 | C#1.2 | C#2.0 | C#3.0 | C#4.0 | VB7.1 | VB8.0 | VB9.0)

/ipsd[=0|1] ... process sub directories (recursive)

/irpf[=0|1] ... import relative to UModel project file

/ijdc[=0|1] ... JavaDocs as Java comments

/icdc[=0|1] ... DocComments as C# comments

/icds[=lst] ... C# defined symbols

/ivdc[=0|1] ... DocComments as VB comments

/ivds[=lst] ... VB defined symbols (custom constants)

/imrg[=0|1] ... synchronize merged

/iudf[=0|1] ... use directory filter

/iflt[=lst] ... directory filter (presets /iudf)

options for import binary types (after /iclg):

/ibrt=vers ... runtime version

/ibpv=path ... override of PATH variable for searching native code libraries

/ibro[=0|1] ... use reflection context only

/ibua[=0|1] ... use add referenced types with package filter

/ibar[=flt] ... add referenced types package filter (presets /ibua)

/ibot[=0|1] ... import only types

/ibuv[=0|1] ... use minimum visibility filter

/ibmv[=key] ... keyword of required minimum visibility (presets /ibuv)

/ibsa[=0|1] ... suppress attribute sections / annotation modifiers

/iboa[=0|1] ... create only one attribute per attribute section

/ibss[=0|1] ... suppress 'Attribute' suffix on attribute type names

options for diagram generation:

/dgen[=0|1] ... generate diagrams

/dopn[=0|1] ... open generated diagrams

/dsac[=0|1] ... show attributes compartment

/dsoc[=0|1] ... show operations compartment

/dscc[=0|1] ... show nested classifiers compartment

/dstv[=0|1] ... show tagged values

/dudp[=0|1] ... use .NET property compartment

/dspd[=0|1] ... show .NET property compartment

options for export commands:

/ejdc[=0|1] ... Java comments as JavaDocs

/ecdc[=0|1] ... C# comments as DocComments

/evdc[=0|1] ... VB comments as DocComments

/espl[=0|1] ... use user defined SPL templates

/ecod[=0|1] ... comment out deleted

/emrg[=0|1] ... synchronize merged

/egfn[=0|1] ... generate missing file names

/eusc[=0|1] ... use syntax check

options for XMI export:

/exid[=0|1] ... export UUIDs

/exex[=0|1] ... export UModel specific extensions

/exdg[=0|1] ... export diagrams (presets /exex)

/exuv[=ver] ... UML version (UML2.0 | UML2.1.2 | UML2.2 | UML2.3 | UML2.4)

options for merge file:

/mcan=file ... common ancestor file

options for documentation generation:

/doof=fmt ... output format (HTML | RTF | MSWORD | PDF)

/dsps=file ... SPS design file

In the projects section:

The /new parameter defines the path and file name of the new project file (*.ump). It can also be used to save an existing project under a different name e.g. UmodelBatch.exe MyFile.ump /new=MyBackupFile.ump see also File: New/Load/Save options.

The /set parameter overwrites current default settings in the registry, with the options/settings defined here.

The /gui parameter displays the UModel interface during the batch process.

Example 1:

Import source code and create new project file:

"C:\Program Files\Altova\UModel2013\UModelBatch.exe" /new="C:\Program Files\Altova\UModel2013\UModelBatchOut\Fred.ump" /isd="X:TestCases\UModel\Fred" /set /gui /iclg=Java5.0 /ipsd=1 /ijdc=1 /dgen=1 /dopn=1 /dmax=5 /chk

/new: | Specifies that the newly-created project file should be called "Fred.ump" in C:\Program Files\Altova\UModel2013\UModelBatchOut\
/isd= | Specifies that the root directory to import into should be "X:\TestCases\UModel\Fred"
/set: | Specifies that any options used in the command line tool will be saved in the registry (When subsequently starting UModel, these settings become the default settings).
/gui: | display the UModel GUI during batch processing
/iclg: | UModel will import the code as Java5.0
/ipsd=1: | recursively process all subdirectories of the root directory specified in the /isd parameter
/pfd=1: | creates packages in the UModel project for each imported directory
/ijdc=1: | created JavaDoc from comments where appropriate
/dgen=1: | generates diagrams
/dopn=1: | opens generated diagrams
/dmax=5: | will open a maximum of 5 diagrams
/chk: | performs a syntax check

Example 2:

Imports source code from X:\TestCases\UModel, and saves the resulting project file in "C:\Program...".

"C:\Program Files\Altova\UModel2013\UModelBatch.exe" /new="C:\Program Files\Altova\UModel2013\UModelBatchOut\finalclass.ump" /isd="X:\TestCases\UModel\

" /iclg=Java5.0 /ipsd=1 /ijdc=1 /dgen=1 /dopn=1 /dmax=5 /dsat=1 /dsnc=1 /chk

/dsat=1: suppresses attributes in the generated diagrams

/dsnc=1: suppresses nested classifiers in the generated diagrams

Example 3:

Synchronize code using existing project file (e.g. one of the ones created above).

"C:\Program Files\Altova\UModel2013\UModelBatch.exe" "C:\Program Files\Altova\UModel2013\UModelBatchOut\Fred.ump" /m2c /ejdc=1 /ecod=1 /emrg=1 /egfn=1 /eusc=1

"C:\Program Files\Altova\UModel2013\UModelBatchOut\Fred.ump": the project file we want to use.

/m2c | update the code from the model
/ejdc: | comments in the project model should be generated as JavaDoc
/ecod=1: | comment out any deleted code
/emrg=1 | synchronize the merged code
/egfn=1: | generate any missing filenames in the project
/eusc=1 | use the syntax check


File: New / Load / Save options

Full batch mode i.e. /gui parameter not used.

new

UModelBatch /new=xxx.ump (options)

creates a new project, executes options, xxx.ump is always saved (regardless of options)

auto save

UModelBatch xxx.ump (options)

loads project xxx.ump, executes options, xxx.ump is saved only if document has changed (like /ibt)

save

UModelBatch xxx.ump (options) /new

loads project xxx.ump, executes options, xxx.ump is always saved (regardless of options)

save as

UModelBatch xxx.ump (options) /new=yyy.ump

loads project xxx.ump, executes options, always saves xxx.ump as yyy.ump (regardless of options)

Batch mode with UModel user interface visible i.e. /gui parrameter used.

new

UModelBatch /gui /new (options)

creates a new project, executes options, nothing saved, gui is left open

save new

UModelBatch /gui /new=xxx.ump (options)

creates a new project, executes options, xxx.ump saved, gui is left open

user mode

UModelBatch /gui xxx.ump (options)

loads project xxx.ump, executes options, nothing saved, gui is left open

save

UModelBatch /gui xxx.ump (options) /new

loads project xxx.ump, executes options, xxx.ump is saved, gui is left open

save as

UModelBatch /gui xxx.ump (options) /new=yyy.ump

loads project xxx.ump, executes options, xxx.ump is saved as yyy.ump, gui is left open

If "hard" errors occur on execution the other options, nothing will be saved in all cases!


Projects and code engineering

UModel now supports all Java specific constructs, among them:

· Java annotations
· Attributes, operations and nested qualifiers for EnumerationLiterals
· Enumerations can realize interfaces
· Netbeans project files

Reverse engineering now supports:

· The ability to generate a single diagram for all reverse engineered elements
· Possibility to show/hide anonymous bound elements on diagrams
· Ability to automatically create hyperlinks from packages to their corresponding package content diagrams during the import process.
· Ability to resolve aliases.
· Writing of Unicode characters into new source code files
· Ability to create associations from .NET properties

To create a new project:

1. Click the New icon in the icon bar, (or select the menu item File | New).

The Root and Component packages are automatically inserted when a new project is created, and are visible in the Model Tree tab. A new project with the default name NewProject1 is created. Note that starting UModel opens a new project automatically.

A newly created UModel project consists of the following packages:

· Root package, and
· Component View package

These two packages are the only ones that cannot be renamed, or deleted.

All project relevant data is stored in the UModel project file, which has an *.ump extension. Each folder symbol in the Model Tree tab represents a UML package!

UModel Project workflow:

UModel does not force you to follow any predetermined modeling sequence!

You can add any type of model element: UML diagram, package, actor etc., to the project in any sequence (and in any position) that you want; Note that all model elements can be inserted, renamed, and deleted in the Model Tree tab itself, you are not even forced to create them as part of a diagram.

To insert a new package:

1. Right click the package you want the new package to appear under, either Root, or Component View in a new project.
2. Select New | Package.

A new package is created under an existing one. The name field is automatically highlighted allowing you to enter the package name immediately.

· Packages are the containers for all other UML modeling elements, use case diagrams, classes, instances etc.
· Packages can be created, at any position in the Model Tree.
· Packages/contents can be moved/copied to other packages in the Model Tree (as well as into valid model diagrams in the diagram tab).
· Packages and their contents can be sorted (in the Model Tree tab) according to several criteria.
· Packages can be placed within other packages.
· Packages can be used as the source, or target elements, when merging, or synchronizing code.

To have elements appear in a UML diagram, you have to:

1. Insert a new UML diagram, by right clicking and selecting New | (Class) Diagram.
2. Drag and drop an existing model element from the Model Tree into the newly created Diagram, or
3. Use the context menu within the diagram view, to add new elements directly.

To save a project:

Select the menu option File | Save as... (or File | Save). Note: Using the Tools | Option | File tab, you can define if you want the *.ump file to be saved in a "pretty-print" format on saving.

To open a project:

Select the menu option File | Open, or select one of the files in the file list.

Please note:

Changes made externally to the project file, or included file(s), are automatically registered and cause a prompt to appear. You can then choose if you want to reload the project or not.

To move a project:

UModel projects and generated code can be easily moved to a different directory (or a different computer) and be resynchronized there.

There are two ways to do this:

· Select the menu option File | Save As..., and answer Yes at the prompt if you want to adjust the file paths to the new project location.

· Copy the UModel project (*.ump) to a new location, adjust the paths of the code generation package(s) in the Component Diagram view to the new directory location.

E.g. using BankMultilanguage.ump:

1. Open the Component Diagram "Overview" and click the BankView component.
2. Update the entry in the directory field to the new project location.
3. Re-synchronize the model and code.


Minimalist UModel project - starting from scratch

This section describes the steps necessary to create a project from scratch and successfully generate code for a single class. Although it is very minimalist, it uses various diagrams to show how to add methods etc., it is not the absolute minimum needed to produce code.

All of the actions could be achieved using only the Model Tree tab, there is no need to use modeling diagrams to create classes or methods.

Creating a new project and defining the Namespace Root

In the Model Tree pane of UModel,

1. Select File | New to create a new modeling project.
2. Right click the Root package and select New Element | Package, name the package e.g. MyPackage.

3. Right click MyPackage and select Code Engineering | Set as Java Namespace Root, click OK to apply the UModel Java profile to the package.

This adds a Java Profile package to the Model Tree.

Including Java Lang to supply JDK datatypes

1. Click the Root package and select the menu option Project | Include Subproject.
2. Click the Java 1.4 tab and select the Java Lang.ump package. Click OK to use the default option "Include by reference".

This adds a Java Lang, and an Unknown Externals package to the Model Tree.

Creating the class properties and methods

1. Right click MyPackage and select New Diagram | Class Diagram.
2. Right click in the class diagram and select New | Class to create a new class in the diagram e.g. MyClass.
3. Press F7 and add some attributes e.g. UserName:String and Password:String.
4. Press F8 and add some operations e.g. GetUserName():String and GetPassword():String.

Creating a Component and defining the code directory

1. Right click the Component View package and add a new Component diagram.
2. Drag the MyFirstClass class element from the Model Tree into the Component diagram.

3. Add a new component to the diagram e.g. MyComponent.
4. Click the component in the diagram to select it, then click in the directory field of the Properties window and enter the directory you want the code to be placed in e.g. C:\MyCode.

Realizing the class

1. Click MyClass and drag the "ComponentRealization" handle at the bottom of the element and drop it on the new component, MyComponent.

A class has to be "realized" before code can be generated. Note that you could also drag the class and drop it on the component directly in the Model Tree.

Syntax check and generating code

1. Select Project | Check Project Syntax to check to see if everything is OK.

Zero errors and one warning are generated. Although the code name was not previously set, a default name will be generated automatically.

2. Select Project | Merge Project code from UModel Project... to output/generate the Java code.

Creating a namespace

If you want to generate the class inside a specific namespace:

1. Add a new package below myPackage e.g. altova.
2. Click the package and activate the <<namespace>> check box in the Properties window.

3. In the Model Tree window, move the MyFirstClass class into the altova package.

When code is generated, the class will now be in the namespace altova.


Importing source code into projects

Source code can be imported as a source project or as a source directory. For an example of importing a source directory please see Round-trip engineering (code - model - code) in the tutorial.

· JBuilder .jpx, Eclipse .project project files, as well as NetBeans (project.xml) are currently supported.

· C# projects / Visual Basic projects:

- MS Visual studio projects, sln, csproj, csdprj..., vbproj, vbp as well as

- Borland .bdsproj project files

To import an existing project into UModel:

1. Select Project | Import source project.
2. Click the browse button ic-browse in the "Import Source Project" dialog box.

3. Select the project file type e.g. .jpx and click Open to confirm. This Jbuilder project file is available in the OrgChart.zip file in the ...\UModelExamples folder.

Note that the option to import the project relative to the UModel project file is active.

4. Make sure that you have activated the Enable diagram generation check box, and select any other specific import settings you need, and click Next.
5. Activate the "Import in new package" check box (or click the respective package in the Import Target window)

Note that UModel can generate a single overview diagram and/or a diagram for each package. The settings shown are the default settings.

6. Click Next to continue.

This dialog box allows you to define the package dependency generation settings.

7. Click Finish to use the default settings.

The project is parsed and the UModel model is generated.

Please note:

If you are importing into an existing project, you will be prompted for the package it should be imported into. If you are using a new project, an OrgChart folder is automatically created.

Resolve aliases:

When reverse engineering code which contains namespace or class aliases, you can now choose if the alias is to be resolved. (Check box "Resolve aliases" in Import Source Project/Directory dialog box).

When updating code, i.e. model to code, alias definitions are retained in the code as is. The scope of the alias definitions are the files in which they appear.

e.g.

using Q = System.Collections.Generic.Queue<String>;

Q myQueue;

Any potentially conflicting aliases are added to the "Unknow externals" if their use is unclear.

Note:

The Resolve alias settings can be changed at any time in the Project Settings dialog box.

Defined symbols

C# or Visual Basic code allow you to enter a list of "Defined symbols" in the field of that name. These directives are used to conditionally compile sections of code. Enter these directives as a semicolon delimited list. UModel takes the defined symbols into account during the code engineering process.

UModel outputs all symbols used in the source code in the message window, when the reverse-engineering process is completed.

E.g. #If DEBUG Then
Dim i = 10
#Else
dim a = 20
#End If

Raised exceptions

Clicking an operation in one of the classes, then clicking the Exception combo box, displays the exception information that an operation can throw.


Importing Java, C# and VB binaries

UModel now supports the import of C# , Java and VB binaries. This is extremely useful when working with binaries from a third party, or the original source code has become unavailable.

If you intend to import Java and/or C# binary files, the following programs/components must be installed:

Java 1.4 / 5.0:

Sun Java Runtime Environment (JRE), or Development Kit (JDK) in Versions 1.4, 1.5, 1.6

UModel support:

Type import is supported for all Class Archives targeting these environments, i.e. adhering to the Java Virtual Machine Specification.

C# 2.0 / C# 3.0: / C# 4.0 / Visual Basic 7.1, 8.0 and 9.0

.NET Framework 2.0, 3.0, 3.5 and 4.0

UModel support:

Type import is supported for Assemblies targeting:

.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0

.NET Compact Framework v1.0, v2.0, v3.5 (for PocketPC, Smartphone, WindowsCE)

These requirements only apply if you intend to import Java or C# or VB.NET binaries; if you do not, there is no need for the Java Runtime Environment, or the MS .NET Framework to be installed.

The import of obfuscated binaries is not supported.

To import binary files:

1. Select the menu option Project | Import Binary Types.

2. Select the language and runtime edition, then click Next.

This opens the Import Binary Selection dialog box.

3. Click the Add button and select the Class Archive from the flyout window, e.g. Class Archives from Java Runtime... .

3. Click the "+" expand button to expand the list of binaries, and activate the check box(es) of those that you want to import (the first three in the screen shot below), then click Next.

This opens the Import Binary Options dialog box.

4. Select the specific options you need and click Next to continue.

5. Define the Import Target, or click the Import in new Package check box, then click Next.

6. Select the Content Diagram Generation properties from the dialog box and click Next to continue.

Note that you can generate a single diagram for each package, as well a single overview diagram.

7. Select the Package Dependency options that you would like to include and click Finish to complete the import procedure.

The screenshot below shows the diagram containing the package dependencies of the Java binaries.

8. Click the other tabs to see the class files etc.

Please note:

Clicking the link icon of a folder, automatically opens the referenced diagram.


Synchronizing Model and source code

UModel allows you to synchronize model and code from both sides.

Code / model synchronization:

Code can be merged/synchronized at different levels described below. When using the context menu, e.g. when right clicking a class, the context menu reflects your selection in the menu option. Note that the Project menu only allows you to synchronize at the root/project level.

Project, Root package level:

1. Right click the Root package.
2. Select one of the code merging options: Merge Program..., or Merge UModel project...

Alternatively, use the Project menu.

Package level:

1. Use SHIFT, or CTRL + click to select the package(s) you want to merge.
2. Right click the selection, and select one of the code merging options:

Merge Program..., or Merge UModel project...

Class level:

1. Use SHIFT, or CTRL + click to select the classes(s) you want to merge.
2. Right click the selection, and select one of the code merging options:

Merge Program..., or Merge UModel project...

Define your synchronization options by selecting:

1. Project | Synchronization options.

Each tab allows you to define the specific merge settings.

2. Click the "Project Settings" button to select the specific programming language settings.
3. Define you specific settings and confirm with OK.

Please note:

When synchronizing code, you might be confronted with a dialog box that prompts you to update your UModel project before synchronization.

This only occurs if you are using UModel projects created before the latest release. Please click YES to update your project, and save your project file. This prompt will not occur once this has been done.

Updating your model - effects:

There are several way to do this as mentioned above:

· Project | Overwrite UModel Project from Program Code

- This checks all directories (project files) of all different code languages you have defined in your project.

- New files are identified and added to the project.

- An entry "Collecting source files in 'C:\UMTest'" appears in your message window.

· Right-click a class, interface,… in the Model Tree and select Code Engineering | Overwrite UModel Class from Program Code

- This updates the selected class (interface,…) of your project.

- Since missing classes cannot be selected, nothing will be added to the project.

· Right-click a Component in the Model Rree (normally within the Component View package) and Code Engineering | Overwrite UModel Component from Program Code

- This updates the corresponding directory (or project file) only.

- New files in the directory (project file) are identified and added to the project.

- An entry "Collecting source files in 'C:\UMTest'" appears in your message window.

SPL Templates:

SPL templates are used during the generation of Java, C# and VB code.

To modify the provided SPL templates:

1. Locate the provided SPL templates in the default directory: ...\UModel2013\UModelSPL\Java\Default\. (or ...\C#\Default, ...\VB\Default.)

2. Copy the SPL files you want to edit/modify into the parent directory, i.e. ...\UModel2013\UModelSPL\Java\.
3. Make your changes and save them there.

To use the user-defined SPL templates:

1. Select the menu option Project | Synchronization settings.
2. Activate the "User-defined override default" checkbox in the SPL templates group.

Then select one of the menu options shown below, to initiate the synchronization process.

· Project | Merge Program Code from UModel project, please see Round-trip engineering (model - code - model) for more information, or

· Project | Merge UModel Project from Project code, please see Round-trip engineering (code - model - code) for more information.

Please note:

SPL templates are only used/accessed when new code is generated, i.e. new classes, operations etc. have been added to the model. Existing code does not access/use the SPL templates.


Synchronization tips

Renaming of classifiers and reverse engineering:

The process described below applies to the stand-alone application as well as to the plug-in versions (Visual Studio or Eclipse) when reverse engineering, or autosynchronization takes place.

Renaming a classifier in the code window, of your programming application, causes it to be deleted and re-inserted as new classifier in the Model Tree.

The new classifier is only re-inserted in those modeling diagrams that are automatically created during the reverse-engineering process, or when generating a diagram using the "Show in new Diagram | Content" option. The new classifier is inserted at a default position, on the diagram, that probably differs from the previous location.

UModel now has the ability to help you when refactoring classes, please see Refactoring code and synchronization.

To enable automatic generation of ComponentRealizations:

· Open the menu item Tool | Options, Click the Code Engineering tab and activate the Generate missing ComponentRealizations.

Automatic generation of ComponentRealizations

UModel is now capable of automatically generating ComponentRealizations during the code engineering process. ComponentRealizations are only generated where it is absolutely clear to which component a class should be assigned:

· Only one Visual Studio project file exists in the UMP project.
· Multiple Visual Studio projects exist but their classes are completely separate in the model.

Automatic ComponentRealizations are created for a Classifier that can be assigned ONE (and only ONE) Component.

· without any ComponentRealizations, or
· contained in a code language namespace

The way the Component is found differs for the two cases:

Component representing a code project file (property "projectfile" set)

· if there is ONE Component having/realizing classifiers in the containing package
· if there is ONE Component having/realizing classifiers in a subpackage of the containing package (top down)
· if there is ONE Component having/realizing classifiers in one of the the parent packages (bottom up)
· if there is ONE Component having/realizing classifiers in a subpackage of one of the the parent packages (top down)

Component representing a directory (property "directory" set)

· if there is ONE Component having/realizing classifiers in the containing package
· if there is ONE Component having/realizing classifiers in one of the the parent packages (bottom up)

Notes:

· The option "Code Engineering | Generate missing ComponentRealizations" has to be set.
· As soon as ONE viable Component is found during one of the above steps, this Component is used and the remaining steps are ignored!

Error/Warnings:

· If no viable Component was found, a warning is generated (message log)
· If more than one viable Component was found, an error is generated (message log)


Refactoring code and synchronization

When refactoring code it is often the case that class names are changed/updated. Previous versions of UModel, prior to version 2009, deleted the "old" classes and inserted new ones, during the code/model synchronzation process.

UModel now opens a dialog box if it detects that new types have been added/renamed during reverse engineering. The new types are listed in the "Name in code" column while the assumed original type name is listed in the "Name in model" column. UModel tries to make an informed guess as to the original name relying on namespace, class content, base classes and other data.

If a class was renamed, select the previous class name using the combo box in the "Name in model" column, e.g. C1. This ensures that all related data are retained and and the code engineering process remains accurate.

Changing class names in the model and regenerating code

Having created a model and generated code from it, it is possible that you might want to make changes to the model again before going through the synchronization process.

E.g. You decide that you want to change the class names before generating code the second time round. As you previously assigned a file name to each class, in the "code file name" field of the Properties window, the new class and file name would now be out of sync.

UModel prompts if you want the code file name to agree with the new class name, when you start the synchronization process. Note that you also have the option to change the class constructors as well.


Forward engineering prerequisites

Minimum conditions needed to produce code for forward engineering:

· A component must be realized by one or more classes, or interfaces.
· The component must have a physical location, i.e. directory, assigned to it. The generated code is then placed in this directory.
· Components must be individually set to be included in the code engineering process.
· The Java, C#, or VB namespace root package must be defined.

To create a component realization:

1. Drag the class, or interface onto the respective component in the Model Tree view.

You can also create a realization in a component diagram using the Realization icon.

To assign a physical location:

1. Select the component in the Model Tree, or in the diagram.
2. Click the Browse button ic-browse of the directory property and select a directory (or enter it directly).

To include components in the code engineering process:

1. Select the component in the Model Tree, or in the diagram.
2. Activate the "use for code engineering" check box.

To define the Java namespace root:

1. Right clicking a package and selecting "Set as Java namespace root" sets the Java namespace root.

This means that this package and all sub packages, are enabled during the code engineering process. The Java namespace root is denoted with a ic-java-non-ns icon in the Model Tree pane.

· Selecting the command again removes the Java namespace for this package.


Java code to/from UModel elements

The table below shows the one-to-one correspondence between:

· UModel elements and Java code elements, when outputting model to code
· Java code elements and UModel model elements, when inputting code into model


C# code to/from UModel elements

The table below shows the one-to-one correspondence between:

· UModel elements and C# code elements, when outputting model to code
· C# code elements and UModel model elements, when inputting code into model


XML Schema to/from UModel elements

The table below shows the one-to-one correspondence between:

· UModel elements and XML Schema elements, when outputting model to code
· XML Schema elements and UModel model elements, when inputting code into model


VB.NET code to/from UModel elements

The table below shows the one-to-one correspondence between:

· UModel elements and VB.NET code elements, when outputting model to code
· VB.NET code elements and UModel model elements, when inputting code into model


Database to/from UModel elements

The table below shows the one-to-one correspondence between:

· UModel elements and database elements, when outputting model to code
· Database elements and UModel model elements, when inputting code into model


Including other UModel projects

UModel is supplied with several files that can be included in a UModel project. Clicking one of the Java tabs allows you to include Java lang classes, interfaces and packages in your project, by selecting one of the supplied files.

1. Select Project | Include Subproject to open the "Include" dialog box.
2. Click the UModel project file you want to include, and press OK.

UModel projects can be included within other UModel projects. To include projects place the respective *.ump files in:

· ...\UModel2013\UModelInclude to appear in the Basic tab, or

· ...\UModel2013\UModelInclude\Java1.4 / Java5.0 to appear in the Java tab.

Please note:

An include file, which contains all types of the Microsoft .NET Framework 2.0, is available in the C# 2.0 tab.

To view all currently imported projects:

· Select the menu option Project | Open Subproject as project.

The flyout menu displays the currently included subprojects.

To create a user-defined tab/folder:

1. Navigate to the ...\UModel2013\UModelInclude and create/add your folder below ...\UModelInclude, i.e. ...\UModelInclude\myfolder.

To create descriptive text for each UModel project file:

1. Create a text file using the same name as the *.ump file and place in the same folder.

Eg. the MyModel.ump file requires a descriptive file called MyModel.txt. Please make sure that the encoding of this text file is UTF-8.

To remove an included project:

1. Click the included package in the Model Tree view and press the Del. key.
2. You are prompted if you want to continue the deletion process.
3. Click OK to delete the included file from the project.

Please note:

· To delete or remove a project from the "Include" dialog box, delete or remove the (MyModel).ump file from the respective folder.


Merging UModel projects

It is now possible to perform a 2-way, or 3-way, project merge in UModel. Both merge different UModel project files into a common UModel *.ump model.

This option is useful if multiple persons are working on the same project at the same time, or you just want to consolidate your work into one model.

Please see:

2-way Project merge

3-way Project merge


2-way Project merge

To merge two UML projects:

1. Open the UML file that is to be the target of the merge process, i.e. the file into which the second model will be merged - the merged project file.
2. Select the menu option Project | Merge Project....
3. Select the second UML project that is to be merged into the first one.

The message window reports on the merge process, and logs the relevant details.

Please note:

Clicking on one of the entries in the message window displays that modeling element in the Model Tree.

Merging results:

· New modeling elements i.e. those that do not exist in the source, are added to the merged model.

· Differences in the same modeling elements; the elements from the second model take precedence, e.g. there can only be one default value of an attribute, the default value of the second file is used.

· Diagram differences: UModel first checks to see if there are differences between diagrams of the two models.

If there are, then the new/different diagram is added to the merged model (with a running number suffix, activity1 etc.) and the original diagram is retained.

If there are no differences, then identical diagrams(s) are ignored, and nothing is changed.

You can then decide which of the diagrams you want to keep or delete, you can of course keep both of them if you want.

· The whole merge process can be undone step-by-step by clicking the Undo icon in the icon bar, or pressing CTRL+Z.

· Clicking an entry in the message window displays that element in the Model Tree.

· The file name of the merged file, the first file you opened, is retained!


3-way Project merge

UModel now supports the merging of multiple UModel projects that have been simultaneously edited by different developers, in a 3-way project merge.

Project merging

The 3-way project merge works with top-level UModel projects, i.e. main projects that may contain subprojects, it does not support individual file merging, when these files have unresolved references to other files.

When merging main projects, any editable subprojects are automatically merged as well. There is no need for a separate subproject merging process.

Please see Manual 3-way project merge example for a simple example.

· The whole merge process can be undone step-by-step by clicking the Undo icon in the icon bar, or pressing CTRL+Z.

· Clicking an entry in the message window displays that element in the Model Tree.

· The file name of the merged file, the first file you opened, is retained!

Merging results:

Note: source in the following text, means the initial/first project file you open before starting the merge process.

· New modeling elements in the second file i.e. that do not exist in the source, are added to the merged model.

· New modeling elements in the source file i.e. that do not exist in the second file, remain in the merged model.

· Deleted modeling elements from the second file i.e. those that still exist in the source, are removed from the merged model.

· Deleted modeling elements from the source file i.e. that still exist in the second file, remain deleted from the merged model.

Differences to the same modeling elements:

· If a property (e.g. the visibility of a class) is changed in either the source, or second file, the updated value is used in the merged model

· If a property (e.g. the visibility of a class) is changed in both source and second file, the value of the second file is used (and a warning is shown in the messages window)

Moved elements:

· If an element is moved in the source, or second file, then the element is moved in the merged model

· If an element is moved (to different parents) in both the source and second file, a prompt appears, and you have to manually select the parent element in the merged model

Diagram differences:

UModel first checks to see if there are differences between diagrams of the two models.

If there are, then the new/different diagram is added to the merged model (with a running number suffix, activity1 etc.) and the original diagram is retained.

If there are no differences, then identical diagrams(s) are ignored, and nothing is changed.

You can then decide which of the diagrams you want to keep or delete, you can of course keep both of them if you want.

Source control systems support for 3-way merging

When checking in/out project files, UModel automatically generates "Common ancestor" (or snapshot) files which are then used for the 3-way merge process. This enables a much finer merge result than the normal 2-way merge.

The specific source control system you use, determines if the automatic snapshot 3-way merge process is supported by UModel. A manual 3-way merge is however, always possible.

· Source control systems that perform automatic file merging without user intervention, will probably not support an automatic 3-way merge.

· Source control systems that prompt you to choose between Replace or Merge, when a project file has been changed, will generally support a 3-way merge. After the source control plugin has replaced the file, selecting the Replace command activates the UModel file alert which then allows you to do a 3-way merge. UModel must be used for the check in/out process.

· Main projects as well as subprojects can be placed under source control. Changing data in a subproject automatically prompts you if the subproject(s) should be checked out.

· Each check in/out action, creates a Common ancestor, or a snapshot, file which is then used during the 3-way project merge process.

Please note:

Snapshot files are only automatically created and used with the standalone versions of UModel, i.e. these functions are not available in the Eclipse or Visual Studio plugin versions.

E.g.

User A edits a UModel project file and changes the name of a class in the BankView Main diagram. User B opens the same project file and changes the visibility of the same class.

As snapshot files are created for each user, the snapshot editing history allows the individual changes to be merged into the project. Both the name and visibility changes are merged into the project file during the 3-way merge process.


Manual 3-way project merge example

This simple example uses the Bank_CSharp.ump file available in the ...\UModelExamples folder. Two other instances of the same project are copied to child folders below the UmodelExamples folder, i.e. \C#_1 and \C#_2.

User1 opens the Bank_CSharp.ump project file in folder C#_1 and makes changes to the BankView class.

Changes made to the BankView class:

1. Operation CollectAccountInfos():bool is deleted from the BankView class.
2. The visibility of the CollectBankAddressInfos():bool operation is changed from "protected" to "public".

3. The project is then saved.

User2 opens the Bank_CSharp.ump project file in folder C#_2 and makes changes to the Bank class.

Changes made to the Bank class:

1. The operations CollectAccountInfos... and GetBalanceOfAccounts... are both changed from "public" to "protected".

2. The project is then saved.

Usr2 now starts a 3-way project merge:

1. Select Project | Merge Project (3-way).

The Open file dialog box appears.

2. Select the project file changed by User1 in the ...\C#_1 folder.

You are now prompted to open the Common Ancestor file, which is the original project file in the ...\UModelExamples folder.

The 3-way merge process is started and you return to the project file from which you started the 3-way merge process, i.e. from the project file in the C#_2 folder.

The Messages window shows you the merge process in detail.

· The changes made to the project in the C#_1 folder, are replicated in the C#_2 project file.

· The changes made to the project in the C#_2 folder, are retained in the project file.

· The project file in the C#_2 folder should now be used as the Common Ancestor file for future 3-way merges between the project files in folders C#_1 and C#_2.


Sharing Packages and Diagrams

UModel allows you to share packages and UML diagrams they might contain, between different projects. Packages can be included in other UModel projects by reference, or as a copy.

Also note that subproject files can be split off a main, or subproject, file at any time. The subproject files can be included as editable or read-only from the main project; each package is shared and saved as a subproject file. Subprojects can be added to a source control system. Please see Teamwork support for UModel projects for more information.

Shared package prerequisites:

· Links to other packages outside of the shared scope are not permissible.

To share a package between projects:

1. Right click a package in the Model Tree tab and select Subproject | Share package.

A "shared" icon appears below the shared package in the Model Tree. This package can now be included in any other UModel project.

To include/import a shared folder in a project:

1. Open the project which should contain the shared package (an empty project in this example).

2. Select the menu item Project | Include Subproject...
3. Click the Browse button, select the project that contains the shared package and click Open.

The "Include" dialog box allows you to choose between including the package/project by reference, or as a copy.

4. Select the specific option (Include by reference) and click OK.

The "Deployment View" package is now visible in the new package. The packages' source project is displayed in parenthesis (BankView-start.ump).

Shared folders that have been included by reference can be changed to "Include by copy" at any time, by right clicking the folder and selecting Subproject | Include as a Copy.

Please note:

All included projects of the source project, have also been included: Java Lang, Unknown Externals and Java Profile.

Shared packages - links to external elements:

Attempting to share a package which has links to external elements causes a prompt to appear. E.g. trying to share the BankView package.

Clicking Yes, forces you to resolve the external links before you can save.

The Messages pane provides information on each of the external links.

Clicking an error entry, in the Messages pane, displays the relevant element in the Model Tree tab.


UML templates

UModel now supports the use of UML templates and their mapping to/from Java 5.0, C# and Visual Basic generics.

· Templates are "potential" model elements with unbound formal parameters.

· These parameterized model elements, describe a group of model elements of a particular type: classifiers, or operations.

· Templates cannot be used directly as types, the parameters have to be bound.

· Instantiate means binding the template parameters to actual values.

· Actual values for parameters are expressions.

· The binding between a template and model element, produces a new model element (a bound element) based on the template.

· If multiple constraining classifiers exist in C#, then the template parameters can be directly edited in the Properties tab, when the template parameter is selected.

Template signature display in UModel:

· Class template called MyVector, with formal template parameter "T", visible in the dashed rectangle.
· Formal parameters without type info (T ) are implicitly classifiers: Class, Datatype, Enumeration, PrimitiveType, Interface. All other parameter types must be shown explicitly e.g. Integer.
· Property myArray with unbounded number of elements of type T.

Right clicking the template and selecting Show | Bound elements, displays the actual bound elements.

Template binding display:

· A bound named template intvector
· Template of type, MyVector, where
· Parameter T is substituted/replaced by int.
· "Substituted by" is shown by - >.

Template use in properties/operations:

An anonymous template binding:

· Property MyFloatVector of type MyVector<T->float>

Templates can also be defined when defining properties or operations. The autocomplete function helps you with the correct syntax when doing this.

· Operation1 returns a vector of floats.


Template signatures

A Template signature is a string that specifies the formal template parameters. A template is a parameterized element that is used to generate new model elements by substituting/binding the formal parameters to actual parameters (values).

Formal template parameter

T

Template with a single untyped formal parameter

(stores elements of type T)

Multiple formal template parameters

KeyType:DateType, ValueType

Parameter substitution

T>aBaseClass

The parameter substitution must be of type "aBaseClass", or derived from it.

Default values for template parameters

T=aDefaultValue

Substituting classifiers

T>{contract}aBaseClass

allowsSubstitutable is true

Parameter must be a classifier that may be substituted for the classifier designated by the classifier name.

Constraining template parameters

T:Interface>anInterface

When constraining to anything other than a class, (interface, datatype), the constraint is displayed after the colon ":" character. E.g. T is constrained to an interface (T:Interface) which must be of type "anInterface" (>anInterface).

Using wildcards in template signatures

T>vector<T->?<aBaseClass>

Template parameter T must be of type "vector" which contains objects which are a supertype of aBaseClass.

Extending template parameters

T>Comparable<T->T>


Template binding

Template binding involves the substitution of the formal parameters by actual values, i.e. the template is instantiated. UModel automatically generates anonymously bound classes, when this binding occurs. Bindings can be defined in the class name field as shown below.

Substituting/binding formal parameters

vector <T->int>

Create bindings using the class name

a_float_vector:vector<T->float>

Binding multiple templates simultaneously

Class5:vector<T->int, map<KeyType->int, ValueType<T->int>

Using wildcards ? as parameters (Java 5.0)

vector<T->?>

Constraining wildcards - upper bounds (UModel extension)

vector<T->?>aBaseClass>

Constraining wildcards - lower bounds (UModel extension)

vector<T->?<aDerivedClass>


Template usage in operations and properties

Operation returning a bound template

Class1

Operation1():vector<T->int>

Parameter T is bound to "int". Operation1 returns a vector of ints.

Class containing a template operation

Class1

Operation1<T>(in T):T

Using wildcards

Class1

Property1:vector<T->?>

This class contains a generic vector of unspecified type (? is the wildcard).

Typed properties can be displayed as associations:

· Right click a property and select Show | PropertyX as Association, or

· Drag a property onto the diagram background.


Project Settings

This option allows you to define the global project settings.

Select the menu item Tools | Options to define your local settings, please see Tools | Options in the Reference section for more details on the local settings.


Enhancing performance

Due to the fact that some modeling projects can become quite large, there are a few ways you can enhance the modeling performance:

· Make sure that you are using the latest driver for your specific graphics card (resolve this before addressing the following tips)

· Disable syntax coloring - Styles tab | Use Syntax Coloring = false.

· Disable "gradient" as a background color for diagrams, use a solid color. E.g. Styles tab | Diagram background color | White.

· The automatically enabled autocompletion can be deactivated using Tools | Options | Diagram Editing then unchecking the "Enable automatic entry helper" check box.


Transforming UML models

UModel is now able to transform UML modeling elements between all of the programming languages that it supports, e.g.:

Java ó C# ó VB.NET ó XSD ó DB óUML, or any other combination.

The transformation paradigm extends to updating existing transformations and merging the updates into the specified target models. This means that existing diagrams in the target model are retained even if the target model is extended by functions not available in the source model. The new functions are also retained on future transformation updates.

If a class operation has the UML stereotype <create> applied in UML source model --> it will have the stereotype <constructor> applied in the target model (C#, JAVA, VB).

Note that Model Transformations can also be run before the forward engineering, and/or after the reverse engineering process, please see Automatically update transformation for more information.

All the code relevant element types are transformed between the programming languages, i.e.:

classes

interfaces

attributes

operations

generalizations etc.

UModel is also able to transform class diagrams between the following languages:

Java ó C# ó VB.NET ó UML

Two transformation examples are available to show how this works:

Transformation example - Java to C#

C# to Java - model to model


Transformation example - Java to C#

This section shows a simple transformation of a Java package to a C# package.

1. Open the Bank_Java.ump example file available in the UModelExamples folder.
2. Click in the Model Tree and press the CTRL + F short cut keys, and enter "hierarchy" in the "Find what" text box.

This expands the Model Tree and highlights the Hierarchy of Account diagram.

3. Double click the icon to open the Hierarchy of Account diagram.

4. Select the menu option Project | Model Transformation.
5. Select the Source Package "bankview" and click Next.
6. In the Select Target Package dialog box, click the "Transform into new Package" check box to add a new package, (or click an existing package to add it there), then click Next.

7. Click the "Transformation" combo box and select "Java to C#".

Note: The Automatically update transformation group lets you automatically perform a transformation before or after the code-engineering process takes place, please see Automatically update transformation for more information.

8. Click Next.

This opens the "Type Mapping" dialog box where you can define/edit code language mappings.

9. Click Finish to use the currently defined default settings.

A message appears stating that the UModel Transformation Profile will be included.

10. Click OK to continue.

This adds a new bankview package to the project and places it directly under the Root package.

The "Model transformation from..." diagram shown above, shows the source and target packages as well as the Transformation settings and code language mappings used.

11. Click the Hierarchy of Account tab (which was opened automatically) to see the newly generated class diagram.

You will notice that the new C# class diagram contains the "bool" type instead of the "boolean" type, used in the Java class diagram.


C# to Java - model to model

This example uses the Bank_multiLanguage.ump file available in the ...\UModelExamples folder. The model contains a Banking Access implementation written in Java and a Bank Server written in C#.

The example supposes that the programming requirements have changed and that Bank Server must now be implemented in Java.

To convert Bank Server C# into Bank Server Java:

1. Open the UModel example file Bank_MultiLanguage.ump.
2. Right click the Root package and select New element | Package and enter the package name, e.g. "Bank Server Java".

Bank Server Java will become the target package for the model transformation.

3. Right click the original/source Bank Server [Bank Server.ump] package, and select "Model Transformation" from the context menu.

4. Select the previously created "Bank Server Java" package as the target package, and click the Next button.

5. Select "C# to Java" as transformation type from the Transformation combo box. You can leave all the other options in the dialog box unchanged, then click the Finish button.

6. Click OK in the message box to include the Transformation Profile.

Please Note:

The wizard was completed without pressing the Next button, because we want to use the default Type Settings and clicking Finish automatically uses them.

Transformation result:

UModel transforms the package, generates two modeling diagrams and transforms the external "types" e.g.integer, boolean into the corresponding types of the target language.

Two modeling diagrams are generated:

The Model Transformation diagram which shows the packages and their dependencies, as well as a Transformation dependency package diagram which shows the dialog box settings and the language mappings that are used.

The second diagram is a class diagram containing the BankServer class, IBankAPI interface and the AccountType enumeration.

UModel automatically creates a new Component called "Agency" in the Component View package, because BankServer is in the Agency namespace.

To generate souce code for the new Java BankServer class:

1. Click the Agency component in the Model Tree and enter the folder name that the generated code is to be placed in, e.g., C:\bankJava.

2. Right click the newly added Bank Server Java package and select Code Engineering | Merge Program Code from UModel Package, then click OK to accept the Synchronization settings.

This create two Java source code files, one for the BankServer class and one for the AccountType enumeration. Note that UModel only generates the classes, interfaces, properties and operation declarations for you, the implementation code itself is not transformed, this is naturally done manually.

Modifying the source package and updating the target

UModel supports the continuous updating of transformed models. This means that you can safely work in the source model (i.e. the C# Bank Server) and use the model transformation to keep the target model (i.e. the Java Bank Server) current with the source model.

Automatically updating the new Java model/package when updates are made to the original C# source

This section assumes that changes have been made to the C# version of Bank Server, that was previously transformed. We would also like these changes to appear in the transformed Java version of Bank Server.

Add a new operation e.g. getNrOfAccounts, with the return type "int", to the C# Bank Server class:

1. Right click the BankServer class, select New element | Operation and enter getNrOfAccounts as the operation name.
2. Right click getNrOfAccounts and select New element | Parameter (return).

3. Click the "return" parameter and enter "int" into the type field of the Properties tab.

4. Right click the Bank Server Java package and select Update Model Transformation | From 'BankServer' to 'BankServer Java...".
5. Click the Finish button in the Model Transformation Details dialog box, to complete the transformation.

The new operation has been inserted into the BankServer Java class and updated your Java target model.

Please note:

You can also modify the target package of the model transformation. You can for example add some methods or some inner classes to the Java Bank Server class, and then re-run the transformation with the 'Merge transformed data with target' (which is the default) setting.


Transformation settings

The options in this dialog box define the transformation settings from source to target language.

Transformation:

Selects the transformation source and target language. The items available in the combo box depend on the language of source package that you want to transform.

Synchronisation:

Defines if you want to merge the transformed data with the target data, or if you want to overwrite the target with the transformed data.

Diagrams:

Defines if you want to generate new class diagrams if they do not exist in the target, and if all new diagrams should be opened in the target package after transformation.

Prepare target for code-engineering:

Allows you to define if ComponentRealizations and Components should be automatically generated prior to code-engineering.

Automatically update transformation:

These options let you define if you want to update your transformations automatically before and/or after, the code-engineering process. Please see Automatically update transformation for more information.


Automatically update transformation

Note that Model Transformations can also be run before the forward engineering, and/or after the reverse engineering process. This is achieved by activating the check boxes in the "Automatically update transformation" group.

After "Update Model from Code" - active

E.g.

· Add a new operation in the Java source code
· Start the reverse engineering process, which adds the new operation to the Java model (via the reverse engineering process)
· This then automatically adds the same operation to the C# model (because After "Update Model from Code" is active).

Before " Update Code from Model" - active

E.g

· Add a new property to the Java model and
· Start the forward-engineering process
· The property is automatically added to the C# model (because "Update Code from Model " is active).
· The property is also written to the source code; Java - one attribute, C# - attribute and operation, for the same reason.

These two options help keep everything up-to-date automatically, without you having to run transformations manually.


Creating model relationships

Model relationships can be created and inserted into diagrams using several methods:

· By using the connection handles, please see Use cases for an example.

· By clicking the specific icon in the icon bar, and using drag-and-drop to create the connections between the elements:

ic-association | association icon
ic-aggreg-ass | aggregation
ic-comp-ass | composition
ic-containment | containment

When an association has been created, a new attribute is automatically inserted in the originating (A:name) class, e.g. Property1:Class2, in the example below.

Having created the association it is shown as active, and the Properties tab displays its properties. A text label shows the default name of the member end of the association, i.e. Property1. Note that the context menu option Text Label... allows you to show / hide labels.

Clicking an association line, displays the association properties in the Properties tab. A:Name and B:Name indicate the role of each class in the other.

Depending on the "memberEndKind" - property (of A:name "Property1"):

the attribute either belongs to:

· the class - i.e. A:memberEndKind = memberEnd, (attribute is visible in class1), or

· the association - i.e. B:memberEndKind = ownedEnd (attribute not visible in class2).

If both attributes belongs to the association, i.e. both ends are defined as "ownedEnd, then this association becomes bi-directional, and the navigability arrow disappears. Both ends of the association are "ownedEnd".

If the memberEndKind of any of the association is set to "navigableOwnedEnd, then the attribute is still part of the association, but the navigability arrow reappears depending on which end (A:name or B:Name) it is set.

To define the type of association (association, aggregate, or composite)

1. Click the association arrow.
2. Scroll down to the aggregation item in the Properties tab.
3. Select: none, shared or composite.

None: a standard association
shared: an aggregate association
composite: a composite association.

Please note:

Associations can be created using the same class as both the source and target. This is a so-called self link. It describes the ability of an object to send a message to itself, for recursive calls.

Click the relationship icon, then drag from the element, dropping somewhere else on the same element. A self-link appears.

Displaying associations in Diagrams automatically

When inserting diagram elements in a diagram, the "Automatically create Associations" option in the Tools | Options | Editing tab, allows existing associations between modeling elements to be automatically created/displayed in the current diagram. This occurs if the attributes type is set, and the referenced "type" modeling element is in the current diagram.

Deleting relationships/associations:

1. Click the relationship in the diagram tab, or in the Model Tree.
2. Press the Del. keyboard key.

The dependency is deleted from the diagram and project.

Deleting class associations:

Deleting a class association does not delete the attribute/property that was automatically generated, from the class!

1. Right click the attribute/property in the class.
2. Select the option "Delete PropertyX" from "ClassX" to delete it.

Creating association qualifiers:

1. Having defined an association between two classes
2. Right click the association line and select New | Qualifier.

Please note that qualifiers are attributes of an association.

Creating a containment association:

The containment association is used to show parent-child relationships.

1. Click the containment icon ic-containment in the title bar.
2. Drag from the class that is to be "contained", and drop on the container class.

Note that the contained class, Class2 in this case, is now visible in a compartment of Class1. This generally places the contained class in the same namespace as the container class.


Showing model relationships

Showing relationships between modeling elements:

1. Right click the specific element and select Show.

The popup menu shown below is context specific, meaning that only those options are available that are relevant to the specific element.

To show / hide text labels:

· Right click a class or association arrow and select Text labels | Show (Hide) all Text labels.

To show a class attribute/property as an association:

1. Right click the property in the class.

2. Select the menu option Show | "PropertyXX" as Association.

This inserts/opens the referenced class and shows the relevant association.


Associations, realizations and dependencies

Creating relationships using connection handles:

1. Given two classes in the class diagram,
2. Click the first class to make it the active class.

Connection handles appear on three sides.

3. Move the mouse pointer over the top handle on the right side of the class.

A Tooltip appears, informing you of the type of relationship that this handle creates, Association in this case.

4. Drag to create a connector, and drop it on the second class.

The target class is highlighted if this type of association is possible.

An association has now been created between these two classes.

Note that the lower handle of the class element creates a Collection Association.

Elements in the various model diagrams supply you with different connection handles.

E.g. a class in a class diagram supplies the following relationship handles (in clockwise fashion):

· InterfaceRealization
· Generalization
· Association

An Artifact in the Deployment view supplies the following handles:

· Manifestation
· Association
· Deployment

Creating relationships using icons in the icon bar:

Given two elements in a modeling diagram,

1. Click the icon that represents the relationship you want to create e.g. association, aggregation, or composition.
2. Drag from the one object to the other, and drop when the target element is highlighted.

When creating a new association, a new attribute is automatically inserted in the originating (A:name) class, Property1:Class2, in the example below.

UModel always shows all attributes of a class!

Please note:

The screenshots in this manual do not show the Association Ownership dot.

To enable it, set the Show Assoc. Ownership, in the Styles tab, to true.

Deleting relationships/associations:

1. Click the relationship in the diagram tab, or in the Model Tree.
2. Press the Del. keyboard key.

The dependency is deleted from the diagram and project.

Deleting class associations:

Deleting a class association does not delete the attribute/property that was automatically generated, from the class!

1. Right click the attribute/property in the class.
2. Select the option "Delete PropertyX" from "ClassX" to delete it.

Collection Associations

UModel supports a special type of viewing Collection Associations.

Collection associations are special associations for collection templates. A class property (e.g. interface) can generally be shown as an association to the "type" of the property. UModel also allows an alternalte method of viewing this type of association.

Click on the lower of the two class handles on the right of the class, then drag and drop the connector onto the target class.

Select the collection type from the popup menu.

A different type of association arrow is created.

Example:

If associations are automatically created during reverse engineering, you will see them as Collection Associations if the settings in the Diagram Editing tab are set to: Resolve collections and are also available in the Collection Templates dialog box.

The double arrow head shows that the "type" of myColors is not only Color, but a "collection of" Colors.

The assocation will not be shown as List<E->Color>, but directly to the enumeration "Color", thus hiding the information that Color is used in a template binding.

The concrete collection type of myColors can still be seen in the myColorsContainer, but not in the association.

The Diagram Editing tab of the Tools | Options dialog box allows you to specify the templates where you want this behavior and whether you want the collections to be resolved.


Generating UML documentation

Altova web site: AltovaWebLink UML project documentation

The Generate Documentation command generates detailed documentation about your UML project in HTML, MS Word, RTF or PDF. The documentation generated by this command can be freely altered and used; permission from Altova to do so is not required.

Documentation is generated for the modeling elements you select in the Generate Documentation dialog box. You can either use the fixed design, or use a StyleVision SPS for the design. Using a StyleVision SPS enables you to customize the output of the generated documentation. How to do this is explained in the section, User-Defined Stylesheets.

Note: To use an SPS to generate documentation, you must have StyleVision installed on your machine. Related elements are typically hyperlinked in the onscreen output, enabling you to navigate from component to component.

To generate documentation in MS Word format, you must have MS Word (version 2000 or later) installed.

Having opened a UML project e.g. Bank_Multilanguage.ump:

1. Select the menu option Project | Generate Documentation.

This opens the "Generate documentation" dialog box. The screenshot below shows the default dialog box settings.

Note that you can also create partial documentation of modeling elements by right clicking an element (or multiple elements using CTRL + click) in the Model Tree and selecting "Generate Documentation". The element can be a folder, class, interface etc. The documentation options are the same in both cases.

Related elements are hyperlinked in the onscreen output, enabling you to navigate from component to component. All manually created hyperlinks also appear in the documentation.

Note also:

documentation is also generated for included C#, Java and/or VB subprojects (profiles) if enabled in the Include tab!

Main tab:

Documentation Design

· Select "Use fixed design..." to use the built-in documentation template.

· Select "Use user-defined..." to use a predefined StyleVision Power Stylesheet created in StyleVision. The SPS files are available in the ...\My Documents\Altova\UModel2013\Documentation\UModel\ folder.

· Click Browse to browse for a predefined SPS file.

· Click Edit to launch StyleVision and open the selected SPS in a StyleVision window.

Output format:

· The output format is specified here: either HTML, Microsoft Word, RTF, or PDF.

Microsoft Word documents are created with the .doc file extension when generated using a fixed design, and with a .docx file extension when generated using a StyleVision SPS.

The PDF output format is only available if you use a StyleVision SPS to generate the documentation.

· "Split output to multiple files" generates an output file for each modeling element that would appear in the TOC overview when generating a single output file e.g. a class C1 with a nested class CNest exists; C1.html contains all info pertaining to C1 and CNest as well as all their attributes, properties etc

· The Embed CSS in HTML option allows you to embed an existing (referenced) CSS file in the HTML documentation, when active; or keep the reference to the CSS file, and the file itself, external when inactive.

· The Embed diagrams option is enabled for the Microsoft Word and RTF output options. When this option is selected, diagrams are embedded in the generated file. Diagrams are created as PNG files (for HTML), or PNG/EMF files (for MS Word and RTF), which are displayed in the result file via object links.

· Create folder for diagrams generates a subfolder, below the selected output folder, that will contain all diagrams when the documentation is output.

· The "Show Result File..." option is enabled for all output options. When checked, the result files are displayed in Browser View (HTML output), MS Word (MS Word output), and the default application for .rtf files (RTF output).

· Generate links to local files option allows you to specify if the generated links are to be absolute, or relative, to the output file.

Include tab

allows you to select which diagrams and modeling elements are to appear in the documentation.

Note that documenting subprojects can be disabled by deselecting the "Included subprojects" check box.

Details tab

allows you to select the element details that are to appear in the documentation.

· If you intend to import XML tags text in your documentation, please de-activate the "as HTML" option under the Documentation option.
· The up / down fields allow you to define the nesting depth shown above/below the current class in the hierarchy diagram.
· The "expand each element only once" option, only allows one of the same classifiers to be expanded in the same image/diagram.

Fonts tab

allows you to customize the font settings for the various headers and text content.

The following screenshots show the fixed-design documentation for the Bank_MultiLanguage.ump file that is included in the ...\UModelExamples directory.

The screenshot above shows the generated documentation with the diagram and element index links at the top of the HTML file.

The screenshot below shows the specifics of the Account class and its relation to other classes.

Note that the individual attributes and properties in the class diagrams are also hyperlinked to their definitions. Clicking a property takes you to its definition. The individual hierarchy classes, as well as all underlined text, are hyperlinked.


Supplied SPS stylesheet

To generate documentation based on the supplied SPS file:

1. Select the menu option Project | Generate Documentation.
2. Select the "Use User-Defined Design..." radio button.
3. Select the UModelDocumentation.sps stylesheet (if not automatically selected) in the Generate Documentation dialog box.

You are now prompted to save the file.

4. Enter the file name and select the location you want to save it.

Clicking a link, in the generated documentation, navigates to the modeling element in the browser.


User-defined Stylesheets

Instead of using the fixed design, you can create a customized design for the UModel documentation. The customized design is created in a StyleVision SPS. Note that the predefined SPS Stylesheet is supplied with UModel.

Specifying the SPS to use for UModel documentation

The SPS you wish to use for generating the documentation is specified in the Generate Documentation dialog (accessed via Project | Generate Documentation). Select the "Use User-Defined Design..." radio button. The default selection is the UModelDocumentation.sps entry.

The predefined SPS file is located in the ...\Documentation\UModel folder.

Please note:

To use an SPS to generate documentation, you must have StyleVision installed on your machine.

Creating the SPS

A StyleVision Power Stylesheet (or SPS) is created using Altova's StyleVision product. An SPS for generating UModel documentation must be based on the XML Schema that specifies the structure of the XML document that contains the UModel documentation.

This schema is called UModelDocumentation.xsd and is delivered with your UModel installation package. It is stored in the ...\My Documents\Altova\UModel2013\Documentation\UModel folder.

When creating the SPS design in StyleVision, nodes from the UModelDocumentation.xsd schema are placed in the design and assigned styles and properties. Note that the UModelDocumentation.xsd includes the Documentation.xsd file located in the folder above it.

Additional components, such as links and images, can also be added to the SPS design. How to create an SPS design in StyleVision is described in detail in the StyleVision user manual.

The advantage of using an SPS for generating schema documentation is that you have complete control over the design of the documentation. Note also that PDF output of the documentation is available only if an SPS is used; PDF output is not available if the fixed design is used.


UML Diagrams

There are two major groups of UML diagrams, Structural diagrams, which show the static view of the model, and Behavioral diagrams, which show the dynamic view. UModel supports all fourteen diagrams of the UML 2.4 specification as well as: XML Schema and Business Modeling Notation diagrams.

Behavioral diagrams include Activity, State machine, Protocol State Machine and Use Case diagrams; as well as the Interaction, Communication, Interaction Overview, Sequence, and Timing diagrams.

Structural diagrams include: Class, Composite Structure, Component, Deployment, Object, and Package diagrams.

Additional diagrams XML schema diagrams, Business Processing Modeling Notation (BPMN), SysML diagrams, Database diagrams.

Please note:

The CTRL+Enter keys can be used to create multi-line labels for most of the modeling diagrams, e.g. Lifeline labels in sequence diagrams, timing diagrams; guard conditions, state names, activity names etc.


Behavioral Diagrams

These diagrams depict behavioral features of a system or business process, and include a subset of diagrams which emphasize object interactions.

Behavioral Diagrams

ic-dia-activity Activity Diagram

ic-dia-state State Machine Diagram

ic-dia-protcol Protocol State Machine Diagram

ic-dia-use Use Case Diagram

A subset of the Behavioral diagrams are those that depict the object interactions, namely:

ic-dia-commun Communication Diagram

ic-dia-interact Interaction Overview Diagram

ic-dia-sequen Sequence Diagram

ic-dia-timing Timing Diagram


Activity Diagram

Altova web site: AltovaWebLink UML Activity diagrams

Activity diagrams are useful for modeling real-world workflows of business processes, and display which actions need to take place and what the behavioral dependencies are. The Activity diagram describes the specific sequencing of activities and supports both conditional and parallel processing. The Activity diagram is a variant of the State diagram, with the states being activities.

Please note that the Activity diagram shown in the following section is available in the Bank_MultiLanguage.ump sample, in the ...\UModelExamples folder supplied with UModel.


Inserting Activity Diagram elements

Using the toolbar icons:

1. Click the specific activity diagram icon in the Activity Diagram toolbar.
2. Click in the Activity Diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the activity diagram:

Most elements occurring in other activity diagrams, can be inserted into an existing activity diagram.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the activity diagram.

Inserting an action (CallBehavior):

1. Click the Action (CallBehavior) icon ic-act-call-beh in the icon bar, and click in the Activity diagram to insert it.
2. Enter the name of the Action, e.g. Validate References, and press Enter to confirm.

Note: Use CTRL+Enter to create a multi-line name.

Inserting an action (CallOperation) and selecting a specific operation:

1. Click the Action (CallOperation) icon ic-act-call-oper in the icon bar, and click in the Activity diagram to insert it.
2. Enter the name of the Action, e.g. collectAccountInfo, and press Enter to confirm.
3. Click the Browse button to the right of the operation field in the Properties tab.

This opens the "Select Operation" dialog box in which you can select the specific operation.

4. Navigate to the specific operation that you want to insert, and click OK to confirm.

In this example the operation "collectAccountInfos" is in the BankView class.


Creating branches and merges

Creating a branch (alternate flow)

A branch has a single incoming flow and multiple outgoing guarded flows. Only one of the outgoing flows can be traversed, so the guards should be mutually exclusive.

In this example the (BankView) references are to be validated:

· branch1 has the guard "reference missing", which transitions to the abort activity
· branch2 has the guard "valid", which transitions to the collectAccountInfos activity.

1. Click the DecisionNode icon ic-act-decis-node in the title bar, and insert it in the Activity diagram.

2. Click the ActivityFinalNode icon ic-act-finalact-node which represents the abort activity, and insert it into the Activity diagram.
3. Click the Validate References activity to select it, then click the right-hand handle, ControlFlow, and drag the resulting connector onto the DecisionNode element.

The element is highlighted when you can drop the connector.

4. Click the DecisionNode element, click the right-hand connector, ControlFlow, and drop it on the collectAccountInfos action. Please see "Inserting an Action (CallOperation" for more information.

5. Enter the guard condition "valid", in the guard field of the Properties tab.

6. Click the DecisionNode element and drag from the right-hand handle, ControlFlow, and drop it on the ActivityFinalNode element.

The guard condition on this transition is automatically defined as "else". Double click the guard condition in the diagram to change it e.g. "reference missing".

Please note that UModel does not validate, or check, the number of Control/Object Flows in a diagram.

Creating a merge:

1. Click the MergeNode icon ic-act-merge-node in the icon bar, then click in the Activity diagram to insert it.

2. Click the ControlFlow (ObjectFlow) handles of the actions that are to be merged, and drop the arrow(s) on the MergeNode symbol.


Activity Diagram elements

ic-act-call-beh Action (CallBehavior)

Inserts the Call Behavior Action element which directly invokes a specific behavior.

Selecting an existing behavior using the behavior combo box, e.g. HandleDisplayException, and displays a rake symbol within the element.

ic-act-call-oper Action (CallOperation)

Inserts the Call Operation Action which indirectly invokes a specific behavior as a method. Please see "Inserting an action (CallOperation)" for more information.

ic-act-opaque Action (OpaqueAction)

A type of action used to specify implementation information. Can be used as a placeholder until you decide which specific action type you want to use.

ic-act-valSpec Action (ValueSpecificationAction)

A type of action that evaluates(/generates) a specific value at the output pin. (Defined by the specific properties, e.g. upperBound.)

ic-act-acc-eventact AcceptEventAction

Inserts the Accept Event action which waits for the occurrence of an event which meets specific conditions.

ic-act-acc-event-time AcceptEventAction (TimeEvent)

Inserts a AcceptEvent action, triggered by a time event, which specifies an instant of time by an expression e.g. 1 sec. since last update.

ic-act-sendsig-act SendSignalAction

Inserts the Send Signal action, which creates a signal from its inputs and transmits the signal to the target object, where it may cause the execution of an activity.

ic-act-decis-node DecisionNode

Inserts a Decision Node which has a single incoming transition and multiple outgoing guarded transitions. Please see "Creating a branch" for more information.

ic-act-merge-node MergeNode

Inserts a Merge Node which merges multiple alternate transitions defined by the Decision Node. The Merge Node does not synchronize concurrent processes, but selects one of the processes.

ic-act-initial-node InitialNode

The beginning of the activity process. An activity can have more than one initial node.

ic-act-finalact-node ActivityFinalNode

The end of the activity process. An activity can have more that one final node, all flows in the activity stop when the "first" final node is encountered.

ic-act-flow-final FlowFinalNode

Inserts the Flow Final Node, which terminates a flow. The termination does not affect any other flows in the activity.

ic-act-forknode ForkNode

Inserts a vertical Fork node.

Used to divide flows into multiple concurrent flows.

ic-act-forkn-horiz ForkNode (Horizontal)

Inserts a horizontal Fork node.

Used to divide flows into multiple concurrent flows.

ic-act-joinnode JoinNode

Inserts a vertical Fork node.

A Join node synchronizes multiple flows defined by the Fork node.

ic-act-joinn-horiz Join Node (horizontal)

Inserts a horizontal Fork node.

A Join node synchronizes multiple flows defined by the Fork node.

ic-act-input-pin InputPin

Inserts an input pin onto a Call Behavior, or Call Operation action. Input pins supply input values that are used by an action. A default name, "argument", is automatically assigned to an input pin.

The input pin symbol can only be placed onto those activity elements where the mouse pointer changes to the hand symbol ic-hand. Dragging the symbol repositions it on the element border.

ic-act-output-pin OutputPin

Inserts an output pin action. Output pins contain output values produced by an action. A name corresponding to the UML property of that action e.g. result, is automatically assigned to the output pin.

The output pin symbol can only be placed onto those activity elements where the mouse pointer changes to the hand symbol ic-hand. Dragging the symbol repositions it on the element border.

Exception Pin

An OutputPin can be changed to an Exception pin by clicking the pin and selecting "isExceptionPin" from the Properties pane.

ic-act-valuepin ValuePin

Inserts a Value Pin which is an input pin that provides a value to an action, that does not come from an incoming object flow. It is displayed as an input pin symbol, and has the same properties as an input pin.

ic-obj-node ObjectNode

Inserts an object node which is an abstract activity node that defines object flow in an activity. Object nodes can only contain values at runtime that conform to the type of the object node.

ic-act-centbuffnode CentralBufferNode

Inserts a Central Buffer Node which acts as a buffer for multiple in- and out flows from other object nodes.

ic-act-datastore DataStoreNode

Inserts a Data Store Node which is a special "Central Buffer Node" used to store persistent (i.e. non transient) data.

ic-act-partit-horiz ActivityPartition (horizontal)

Inserts a horizontal Activity Partition, which is a type of activity group used to identify actions that have some characteristic in common. This often corresponds to organizational units in a business model.

Double clicking a label allows you to edit it directly; pressing Enter orients the text correctly.

Please note that Activity Partitions are the UML 2.0 update to the "swimlane" functionality of previous UML versions.

· Elements placed within a ActivityPartition become part of it when the boundary is highlighted.
· Objects within an ActivityPartition can be individually selected using CTRL+Click, or by dragging the marquee inside the boundary.
· Click the ActivityPartition boundary, or title, and drag to reposition it.

ic-act-partit-vert ActivityPartition (vertical)

Inserts a vertical Activity Partition, which is a type of activity group used to identify actions that have some characteristic in common. This often corresponds to organizational units in a business model.

ic-act-part-2dim ActivityPartition (2 Dimensional)

Inserts a two dimensional Activity Partition, which is a type of activity group used to identify actions that have some characteristic in common. Both axes have editable labels.

To remove the Dim1, Dim2 dimension labels:

1. Click the dimension label you want to remove e.g. Dim1
2. Double click in the Dim1 entry in the Properties tab, delete the Dim1 entry, and press Enter to confirm.

Note that Activity Partitions can be nested:

1. Right click the label where you want to insert a new partition.
2. Select New | ActivityPartition.

ic-act-control-flow ControlFlow

A Control Flow is an edge, i.e. an arrowed line, that connects two activities/behaviours, and starts an activity after the previous one has been completed.

ic-act-objflow ObjectFlow

A Object Flow is an edge, i.e. an arrowed line, that connects two actions/object nodes, and starts an activity after the previous one has been completed. Objects or data can be passed along an Object Flow.

ic-act-exceptH ExceptionHandler

An Exception Handler is an element that specifies what action is to be executed if a specified exception occurs during the execution of the protected node.

An Exception Handler can only be dropped on an Input Pin of an Action.

ic-act-activity Activity

Inserts an Activity into the activity diagram.

ic-act-paramnode ActivityParameterNode

Inserts an Activity Parameter node onto an activity. Clicking anywhere in the activity places the parameter node on the activity boundary.

ic-act-struct-actnode StructuredActivityNode

Inserts a Structured Activity Node which is a structured part of the activity, that is not shared with any other structured node.

ic-act-expan-reg ExpansionRegion

An expansion region is a region of an activity having explicit input and outputs (using ExpansionNodes). Each input is a collection of values.

The expansion region mode is displayed as a keyword, and can be changed by clicking the "mode" combo box in the Properties tab. Available settings are:parallel, iterative, or stream.

ic-act-expan-node ExpansionNode

Inserts an Expansion Node onto an Expansion Region. Expansion nodes are input and output nodes for the Expansion Region, where each input/output is a collection of values. The arrows into, or out of, the expansion region, determine the specific type of expansion node.

ic-act-interr-region InterruptableActivityRegion

An interruptible region contains activity nodes. When a control flow leaves an interruptible region all flows and behaviors in the region are terminated.

To add an interrupting edge:

Making sure that:

· an Action element is present in the InterruptableActivityRegion, as well as an outgoing Control Flow to another action:

1. Right click the Control Flow arrow, and select New | InterruptingEdge.

Please note:

You can also add an InterrupingEdge by clicking the InterruptableActivityRegion, right clicking in the Properties window, and selecting Add InterruptingEdge from the pop-up menu.


State Machine Diagram

Altova web site: AltovaWebLink UML State Machine diagrams

The State Machine Diagram models the behavior of a system by describing the various states an object may be in, and the transitions between those states. They are generally used to describe the behavior of an object spanning several use cases. A state machine can have any number of State Machine Diagrams (or State Diagrams) UModel.

Two types of processes can achieve this:

Actions, which are associated to transitions, are short-term processes that cannot be interrupted. E.g. an initial transition, internal error /notify admin.

State Activities (behaviors), which are associated to states, are longer-term processes that may be interrupted by other events. E.g. listen for incoming connections.

Please note that the State machine diagrams shown in the following section are available in the Bank_MultiLanguage.ump sample, in the ...\UModelExamples folder supplied with UModel.


Inserting state machine diagram elements

Using the toolbar icons:

1. Click the specific state machine diagram icon in the State Machine Diagram toolbar.

2. Click in the State Diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the state machine diagram:

Most elements occurring in other state machine diagrams, can be inserted into an existing state machine.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the state diagram.


Creating states, activities and transitions

To insert a simple state:

1. Click the state icon ic-state-simple in the icon bar and click in the State diagram to insert it.
2. Enter the name of the state and press Enter to confirm.

Simple states do not have any regions or any other type of substructure. UModel allows you to add activities as well as regions to a simple state through the context menu.

To add an activity to a state:

1. Right click the state element, select New, and then one of the entries from the context menu.

You can select one action from the Do, Entry and Exit action categories. Activities are placed in their own compartment in the state element, though not in a separate region. The type of activity that you select is used as a prefix for the activity e.g. entry / store current time.

To delete an activity:

1. Click the respective activity in the state element and press the Del. key.

To create a transition between two states:

1. Click the Transition handle of the source state (on the right of the element).
2. Drag-and-drop the transition arrow onto the target state.

The Transition properties are now visible in the Properties tab. Clicking the "kind" combo box, allows you to define the transition type: external, internal or local.

Transitions can have an event trigger, a guard condition and an action in the form eventTrigger [guard condition] /activity.

To automatically create operations from transitions

Activating the "Toggle automatic creation of operations in target by typing operation names" icon ic-create-op-inTarg , automatically creates the corresponding operation in the referenced class, when creating a transition and entering a name e.g. myOperation().

Note: operations can only be created automatically when the state machine is inside a class or interface.

To automatically create operations from Activities:

1. Right click the State and select the specific action/activity, e.g. New | Entry:Activity.
2. Enter the name of the activity making sure to finish with the open/close brackets "()", e.g. entry / OnEntryCooler().

The new element is also visible in the Model Tree.

Scrolling down the Model Tree, you will notice that the OnEntryCooler operation has been added to the parent class AirConditionController.

Please note:

Operations are automatically added for: Do:Activity, Entry:Activity, Exit:Activity, as well as guard condition activities and effects (on transitions).

To create a transition trigger:

1. Right click a previously created transition (arrow).
2. Select New | Trigger.

An "a" character appears in the transition label above the transition arrow, if it is the first trigger in the state diagram. Triggers are assigned default values of the form alphabetic letter, source state -> target state.

3. Double click the new character and enter the transition properties in the form eventTrigger [guard condition] / activity.

Transition property syntax; the text entered before the square brackets is the trigger, between brackets the guard condition, and after the slash, the activity. Manipulating this string automatically creates or deletes the respective elements in the Model Tree.

Please note:

To see the individual transition properties, right click the transition (arrow) and select "Select in Model Tree". The event, activity and constraint elements are all shown below the selected transition.

Adding an Activity diagram to a transition:

UModel has the unique capability of allowing you to add an Activity diagram to a transition, to describe the transition in more detail.

1. Right click a transition arrow in the diagram, and select New | Activity Diagram.

This inserts an Activity diagram window into the diagram at the position of the transition arrow.

2. Click the inserted window to make it active. You can now use the scroll bars to scroll within the window.

3. Double click the Action window to switch into the Activity diagram and further define the transition, e.g. change the Action name to Database logon.

Note that a new Activity Diagram tab has now been added to the project. You can add any activity modeling elements to the diagram, please see "Activity Diagram" for more information.

4. Click the State Machine Diagram tab to switch back to see the update transition.

5. Drag the Activity window to reposition it in the diagram, and click the resize handle if necessary.

Dragging the Activity window between the two states, displays the transition in and out of the activity.


Composite states

ic-state-compos Composite state

This type of state contains a second compartment comprised of a single region. Any number of states may be placed within this region.

To add a region to a composite state:

1. Right click the composite state and select New | Region from the context menu.

A new region is added to the state. Regions are divided by dashed lines.

To delete a region:

1. Click the region you want to delete in the composite state and press the Del. key.

Deleting a region of an orthogonal state reverts it back to a composite state; deleting the last region of a composite state changes it back to a simple state.

To place a state within a composite state:

1. Click the state element you want to insert (e.g. Logging in User), and drop it into the region compartment of the composite state.

The region compartment is highlighted when you can drop the element. The inserted element is now part of the region, and appears as a child element of the region in the Model Tree pane.

Moving the composite state moves all contained states along with it.

ic-state-orthog Orthogonal state

This type of state contains a second compartment comprised of two or more regions, where the separate regions indicate concurrency.

Right clicking a state and selecting New | Region allows you add new regions.

To show/hide region names:

Click the Styles tab, scroll to the "Show region names on states" entry, and select true/false.

ic-state-submach Submachine state

This state is used to hide details of a state machine. This state does not have any regions but is associated to a separate state machine.

To define a submachine state:

1. Having selected a state, click the submachine combo box in the Properties tab.

A list containing the currently defined state machines appears.

2. Select the state machine that you want this submachine to reference.

Please note that a hyperlink icon automatically appears in the submachine, clicking it opens the referenced statemachine, BankServer in this case.

To add entry / exit points to a submachine state:

· The state which the point is connected to, must itself reference a submachine State Machine (visible in the Properties tab).
· This submachine must contain one or more Entry and Exit points
1. Click the ConnectionPointReference icon ic-state-connpt-ref in the title bar, then click the submachine state that you want to add the entry/exit point to.

2. Right click in the Properties tab and select Add entry. Please note that another Entry, or Exit Point has to exist elsewhere in the diagram to enable this pop-up menu.

This adds an EntryPoint row to the Properties tab, and changes the appearance of the ConnectionPointReferece element.

3. Use the same method to insert an ExitPoint, by selecting "Add exit" from the context menu.


Code generation from State Machine diagrams

UModel is now able to generate executable code from State Machine diagrams (Java,VB.NET, or C#). Almost all of the State Machine diagram elements and features are supported:

· State
· CompositeState, with any hierarchical level
· OrthogonalState, with any number of regions
· Region
· InitialState
· FinalState
· Transition
· Guard
· Trigger
· Call-Event
· Fork
· Join
· Choice
· Junction
· DeepHistory
· ShallowHistory
· Entry/exit/do actions
· Effects

State Machine code generation is integrated into the "normal" round-trip engineering process. This means that State Machine code can be automatically updated on every forward-engineering process.

The screenshot above shows the AirCondition State Machine diagram which is available in the ..\StateMachineCodeGeneration directory under ...\UModelExamples. A separate directory exists for each of the code generation languages supported by UModel, i.e. C#, Java, and VB.

Each directory contains an AirCondition and Complex folder, which contains the respective UModel project, programming language project files, as well as the generated source files. The Complex.ump project file contains almost all of the modeling elements and functionality that UModel supports when generating code from State Machine diagrams.

Each directory also contains a test application, e.g. TestSTMAirCondition.sln for C#, allowing you to work with the generated source files immediately.

To generate code from a State Machine diagram:

· Right click in the State Machine diagram and select "Generate State Machine code", or
· Select the menu option Project | Generate State Machine Code

The default settings are shown above. Click OK to generate the code.

State Machine code is automatically updated when you start the forward engineering process. You can however change this setting by clicking on the State Machine diagram background and clicking the "Automatic Update Code" check box.

Changes should not be made manually in the generated code, as these changes are not are not reflected in the State Machine diagram during the reverse-engineering process.

Clicking the ic-more icon of the Automatic Update field, opens the Generate State Machine Code dialog box, allowing you to change the code generation settings.

Please note:

You can perform a syntax check on a State Machine diagram by right clicking the diagram and selecting Check State Machine Syntax.


Working with State machine code

The parent class of the state machine (i.e. the "controller class", or "context class") is the one, and only, "interface" between the state machine user and the state machine implementation.

The controller class provides methods which can be used from "outside" to change the states (e.g. after external events occur).

The state machine implementation however, calls controller class methods ("callbacks") to inform the state machine user about state changes (OnEntry, OnExit, ...), transition effects, and the possibility to override and implement methods for conditions (guards).

UModel can automatically create simple operations (without any parameter) for entry/exit/ do behaviors, transition effects, ... when the corresponding option is turned on (also see Creating states, activities and transitions. These methods can be changed to whatever you want in UModel (add parameters, set them as abstract, etc.).

A state machine (i.e. its controller class) can be instantiated several times. All instances work independently of each other.

· The UML State machine execution is designed for the "Run-to-completion execution model".

· UML state machines assume that processing of each event is completed before the next event is processed.

· This also means no entry/exit/do action or transition effect, may directly trigger a new transition/state change.

Initialization:

· Every region of a state machine has to have an initial state.

· The code generated by UModel, automatically initializes all regions of the state machine (or when the Initialize() method of the controller class is called).

· If OnEntry events are not wanted during initialization, you can call the Initialize() method manually and ignore OnEntry events during the startup.

Getting the current state(s):

UModel supports composite states as well as orthogonal states, so there is not just one current state - every region (in any hierarchy level) can have one current state.

The AirCondition example shows how to walk through the regions to the current state(s):

TreeNode rootNode = m_CurrentStateTree.Nodes.Add(m_STM.getRootState().getName());

UpdateCurrentStateTree(m_STM.getRootState(), rootNode);

private void UpdateCurrentStateTree(AirCondition.AirConditionController.IState state, TreeNode node)

{

foreach (AirCondition.AirConditionController.IRegion r in state.getRegions())

{

TreeNode childNode = node.Nodes.Add(r.getName() + " : " + r.getCurrentState().getName());

UpdateCurrentStateTree(r.getCurrentState(), childNode);

}

}

Example 1 - a simple transition:

SimpleTransition11

The corresponding operation is automatically generated in UModel

Generated method in code:

private class CTestStateMachine : IState

{

      …

      public bool MyEvent1()

      {

             …

      }

}

· The state machine user should call the generated method "MyEvent1" when the corresponding event occurs (outside the state machine).

· The return parameter of these event-methods, provide information if the event caused a state change (i.e. if it had any effect on the state machine) or not.

E.g. being in "State1" and event "MyEvent1()" occurs, the current state changes to "State2" and "MyEvent1()" returns true.

If "State2" is active and "MyEvent1()" occurs nothing will change in the state machine and MyEvent1() will return false.

Example 2 - a simple transition with an effect:

SimpleTransition21

The corresponding operation is automatically generated in UModel

Generated method in code:

private class CTestStateMachine : IState

{

      …

      // Overwrite to handle entry/exit/do actions, transition effects,...:

      public virtual void OnState1State2Effect() {}

}

· "OnState1State2Effect()" will be called by the state machine implementation, whenever the transition between "State1" and "State2" is fired.

· To react to this effect, "OnState1State2Effect()" should be overwritten in a derived class of "CTestStateMachine".

· "CTestStateMachine:: OnState1State2Effect()" can also be set to abstract, and you will get compiler errors until the method is overwritten.

· When "OnState1State2Effect()" is not abstract, and the "Generate debug messages" option is active, UModel will generate following debug output:

// Overwrite to handle entry/exit/do actions, transition effects,...:

public virtual void OnState1State2Effect() {OnDebugMessage("ACTION: OnState1State2Effect");}

Example 3 - a simple transition with an effect and parameter:

SimpleTransition31

The corresponding operation is automatically generated in UModel

Generated method in code:

private class CTestStateMachine : IState

{

      …

      // Additional defined operations of the controller class:

      public virtual void OnState1State2Effect(String text)

      {

      }

}

· To effect operations (automatically created by UModel) parameters can be added manually (UModel cannot know the required type).

· In this sample, the parameter "text:String" has been added to the Effect method in TestController. A proper argument has to be specified when calling this method (here: "1 => 2").

· Another possibility would be: e.g. to call static methods ("MyStatic.OnState1State2Effect("1 => 2")"), or methods of singletons ("getSingleton().OnState1State2Effect("1 => 2")").

Example 4 - entry/exit/do actions:

The corresponding operations are automatically generated in UModel

Generated method in code:

private class CTestStateMachine : IState

{

      …

      // Overwrite to handle entry/exit/do actions, transition effects,...:

      public virtual void OnExitState3() {}

      public virtual void OnEntryState4() {}

      public virtual void OnDoState4() {}

}

· States can have entry/exit/do behaviors. UModel automatically creates the corresponding operations to handle them.

· When "MyEvent2()" occurs in the sample above, the state machine implementation calls "OnExitState3()", if "MyEvent2" would have an Effect, it would be subsequentially called, then "OnEntryState4" and "OnDoState4" would be called.

· Normally, these methods should be overwritten. When they are not abstract and the "Generate debug messages" option is active, UModel provides default debug output as described in Example 2.

· These methods can also have parameters as shown in Example 3.

Example 5 - guards:

Transitions can have guards, which determine if the transition really can fire.

SimpleTransition51

The corresponding operation is automatically generated in UModel

Generated method in code:

private class CTestStateMachine : IState

{

      …

      // Additional defined operations of the controller class:

      public virtual bool CanGoState6()

      {

             return true; // Overwrite!

      }

}

· If "State5" is the active state and "MyEvent2" occurs, the state machine implementation will call "CanGoState6" and, depending on its result, the transition will fire or not.

· Normally, these methods should be overwritten. When they are not abstract and the "Generate debug messages" option is active, UModel provides default debug output as described in Example 2.

· These methods also can have parameters as shown in Example 3.

· Multiple transitions with the same event, but having different guards, are possible. The order in which the different guards are polled is undefined. If a transition does not have a guard, or the guard is "else", it will be considered as the last (i.e., only when all other transition guards return false, will this one will fire):

Example:

If CanGoState6 (or CanGoState7) is called first is undefined but for sure the third transition only fires if CanGoState6 and CanGoState7 return false.

Additional constructs and functionality can be found in the AirCondition.ump and Complex.ump samples.


State Machine Diagram elements

ic-state-ps-initial InitialState (pseudostate)

The beginning of the process.

ic-state-final FinalState

The end of the sequence of processes.

ic-state-ps-entry EntryPoint (pseudostate)

The entry point of a state machine or composite state.

ic-state-ps-exit ExitPoint (pseudostate)

The exit point of a state machine or composite state.

ic-state-ps-choice Choice

This represents a dynamic conditional branch, where mutually exclusive guard triggers are evaluated (OR operation).

ic-state-ps-junction Junction (pseudostate)

This represents an end to the OR operation defined by the Choice element.

ic-state-ps-terminate Terminate (pseudostate)

The halting of the execution of the state machine.

ic-state-ps-fork Fork (pseudostate)

Inserts a vertical Fork bar.

Used to divide sequences into concurrent subsequences.

ic-state-ps-fork-horiz Fork horizontal (pseudostate)

Inserts a horizontal Fork bar.

Used to divide sequences into concurrent subsequences.

ic-state-ps-join Join (pseudostate)

Joins/merges previously defined subsequences. All activities have to be completed before progress can continue.

ic-state-ps-join-horiz Join horizontal (pseudostate)

Joins/merges previously defined subsequences. All activities have to be completed before progress can continue.

ic-state-ps-deepH DeepHistory

A pseudostate that restores the previously active state within a composite state.

ic-state-ps-shallH ShallowHistory

A pseudostate that restores the initial state of a composite state.

All pseudostate elements can be changed to a different "type", by changing the kind combo box entry in the Properties tab.

ic-state-connpt-ref ConnectionPointReference

A connection point reference represents a usage (as part of a submachine state) of an entry/exit point defined in the

statemachine reference by the submachine state.

To add Entry or Exit points to a connection point reference:

· The state which the point is connected to, must itself reference a submachine State Machine (visible in the Properties tab).
· This submachine must contain one or more Entry and Exit points

ic-state-transitioni Transition

A direct relationship between two states. An object in the first state performs one or more actions and then enters the second state depending on an event and the fulfillment of any guard conditions.

Transitions have an event trigger, guard condition(s), an action (behavior), and a target state.

Supported event subelements are:

· ReceiveSignalEvent, SignalEvent, SendSignalEvent, ReceiveOperationEvent, SendOperationEvent and ChangeEvent.

ic-create-op-inTarg Toggle automatic creation of operations in target by typing operation names

Activating the "Toggle automatic creation of operations in target by typing operation names" icon, automatically creates the corresponding operation in the referenced class, when creating a transition and entering a name myOperation().

Note: operations can only be created automatically when the state machine is inside a class or interface.


Protocol State Machine

Altova web site: AltovaWebLink UML Protocol State Machine diagrams

Protocol State Machines are used to show a sequence of events that an object responds to, without having to show the specific behavior. The required sequence of events, and the resulting changes in the state of the object, are modeled in this diagram.

Protocol State Machines are most often used to describe complex protocols, e.g. database access through a specific interface, or communication protocols such as TCP/IP.

Protocol State Machines are created in the same way as State Machine diagrams, but have fewer modeling elements. Protocol-Transitions between states can have pre- or post conditions which define what must be true for a transition to another state to occur, or what the resulting state must be, once the transition has taken place.


Inserting Protocol State Machine elements

Using the toolbar icons:

1. Click the Protocol State Machine icon in the toolbar.
2. Click in the Protocol State Machine Diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the Protocol State Machine diagram:

Most elements occurring in other Protocol State Machine diagrams, can be inserted into an existing diagram.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the Protocol State Machine diagram.

To insert a simple state:

1. Click the State icon ic-state-simple in the icon bar and click in the Protocol State Machine diagram to insert it.
2. Enter the name of the state and press Enter to confirm.

Simple states do not have any regions or any other type of substructure.

To create a Protocol Transition between two states:

1. Click the Transition handle of the source state (on the right of the element), or use the Protocol Transition icon in the icon bar.
2. Drag-and-drop the transition arrow onto the target state.

The text cursor is automatically set for you to enter the pre and/or post condition. Please make sure to use the square brackets [] and slash character when entering the conditions directly.

Entering the pre/post conditions in the Properities window, automatically inserts the square brackets and slash character in the diagram.

To create and insert composite state elements and submachine states:

· Please see Composite states


Protocol State Machine Diagram elements

ic-state-simple State

A simple state element with one compartment.

ic-state-compos Composite state

This type of state contains a second compartment comprised of a single region. Any number of states may be placed within this region.

ic-state-orthog Orthogonal state

This type of state contains a second compartment comprised of two or more regions, where the separate regions indicate concurrency.

Right clicking a state and selecting New | Region allows you add new regions.

ic-state-submach Submachine state

This state is used to hide details of a state machine. This state does not have any regions but is associated to a separate state machine.

ic-state-ps-initial InitialState (pseudostate)

The beginning of the process.

ic-state-final FinalState

The end of the sequence of processes.

ic-state-ps-entry EntryPoint (pseudostate)

The entry point of a state machine or composite state.

ic-state-ps-exit ExitPoint (pseudostate)

The exit point of a state machine or composite state.

ic-state-ps-choice Choice

This represents a dynamic conditional branch, where mutually exclusive guard triggers are evaluated (OR operation).

ic-state-ps-junction Junction (pseudostate)

This represents an end to the OR operation defined by the Choice element.

ic-state-ps-terminate Terminate (pseudostate)

The halting of the execution of the state machine.

ic-state-ps-fork Fork (pseudostate)

Inserts a vertical Fork bar.

Used to divide sequences into concurrent subsequences.

ic-state-ps-fork-horiz Fork horizontal (pseudostate)

Inserts a horizontal Fork bar.

Used to divide sequences into concurrent subsequences.

ic-state-ps-join Join (pseudostate)

Joins/merges previously defined subsequences. All activities have to be completed before progress can continue.

ic-state-ps-join-horiz Join horizontal (pseudostate)

Joins/merges previously defined subsequences. All activities have to be completed before progress can continue.

ic-state-connpt-ref ConnectionPointReference

A connection point reference represents a usage (as part of a submachine state) of an entry/exit point defined in the

statemachine reference by the submachine state.

To add Entry or Exit points to a connection point reference:

· The state which the point is connected to, must itself reference a submachine State Machine (visible in the Properties tab).
· This submachine must contain one or more Entry and Exit points

ic-state-transitioni Protocol Transition

A direct relationship between two states. An object in the first state performs one or more operations and then enters the second state depending on an event and the fulfillment of any pre- or post conditions.

Please see Inserting Protocol State Machine elements for more information.


Use Case Diagram

Please see the Use Cases section in the tutorial for more information on how to add use case elements to the diagram.


Communication Diagram

Altova web site: AltovaWebLink UML Communication diagrams

Communication diagrams display the interactions i.e. message flows, between objects at run-time, and show the relationships between the interacting objects. Basically, they model the dynamic behavior of use cases.

Communication diagrams are designed in the same way as sequence diagrams, except that the notation is laid out in a different format. Message numbering is used to indicate message sequence and nesting.

UModel allows you to generate Communication diagrams from Sequence diagrams and vice versa, in one simple action see "Generating Sequence diagrams" for more information.


Inserting Communication Diagam elements

Using the toolbar icons:

1. Click the specific communication icon in the Communication Diagram toolbar.

2. Click in the Communication diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the Communication Diagram:

Elements occurring in other diagrams, e.g. classes, can be inserted into a Communication diagram.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the Communication diagram.

ic-comm-lifeline Lifeline

The lifeline element is an individual participant in an interaction. UModel allows you to insert other elements into the sequence diagram, e.g. classes. Each of these elements then appear as a new lifeline. You can redefine the lifeline colors/gradient using the "Header Gradient" combo boxes in the Styles tab.

To create a multiline lifeline press CTRL+Enter to create a new line.

To insert a Communication lifeline:

1. Click the Lifeline icon in the title bar, then click in the Communication diagram to insert it.

2. Enter the lifeline name to change it from the default name, Lifeline1, if necessary.

Messages

A Message is a modeling element that defines a specific kind of communication in an interaction. A communication can be e.g. raising a signal, invoking an Operation, creating or destroying an instance. The message specifies the type of communication as well as the sender and the receiver.

ic-comm-msgcall Message (Call) ic-comm-msgreply Message (Reply) ic-comm-msgcreate Message (Creation) ic-comm-msgdestroy Message (Destruction)

To insert a message:

1. Click the specific message icon in the toolbar.
2. Drag and drop the message line onto the receiver objects.

Lifelines are highlighted when the message can be dropped.

Note: holding down the CTRL key allows you to insert a message with each click.

To insert additional messages:

1. Right click an existing communication link and select New | Message.

· The direction in which you drag the arrow defines the message direction. Reply messages can point in either direction.

· Having clicked a message icon and holding down CTRL, allows you to insert multiple messages by repeatedly clicking and dragging in the diagram tab.

Message numbering

The Communication diagram uses the decimal numbering notation, which makes it easy to see the hierarchical structure of the messages in the diagram. The sequence is a dot-separated list of sequence numbers followed by a colon and the message name.

Generating Sequence diagrams from Communication diagrams:

UModel allows you to generate Communication diagrams from Sequence diagrams and vice versa, in one simple action:

· Right click anywhere in a Communication diagram and select Generate Sequence Diagram from the context menu.


Interaction Overview Diagram

Altova web site: AltovaWebLink UML Interaction Overview diagrams

Interaction Overview Diagrams are a variant of Activity diagrams and give an overview of the interaction between other interaction diagrams such as Sequence, Activity, Communication, or Timing diagrams. The method of constructing a diagram is similar to that of Activity diagram and uses the same modeling elements: start/end points, forks, joins etc.

Two types of interaction elements are used instead of activity elements: Interaction elements and Interaction use elements.

Interaction elements are displayed as iconized versions of a Sequence, Communication, Timing, or Interaction Overview diagram, enclosed in a frame with the "SD" keyword displayed in the top-left frame title space.

Interaction occurrence elements are references to existing Interaction diagrams with "Ref" enclosed in the frame's title space, and the occurrence's name in the frame.


Inserting Interaction Overview elements

Using the toolbar icons:

1. Click the specific icon in the Interaction Overview Diagram toolbar.

2. Click in the diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the Interaction Overview Diagram:

Elements occurring in other diagrams, e.g. Sequence, Activity, Communication, or Timing diagrams can be inserted into a Interaction Overview diagram.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the diagram.

Inserting an Interaction element:

1. Click the CallBehaviorAction (Interaction) icon ic-inter-callbeh in the icon bar, and click in the Interaction Overview diagram to insert it.

The Collect Account Information sequence diagram is automatically inserted if you are using the Bank_Multilanguage.ump example file from the ...\UModelExamples folder. The first sequence diagram, found in the model tree, is selected per default.

2. To change the default interaction element: Click the behavior/diagram combo box in the Properties tab.

A list of all the possible elements that can be inserted is presented.

3. Click the element you want to insert to e.g. Connect to BankAPI.

As this is also a sequence diagram, the Interaction element appears as an iconized version of the sequence diagram.

If you select <ref> BankAPI, then the Interaction element occurrence is displayed.

Inserting an Interaction element occurrence:

1. Click the CallBehaviorAction (InteractionUse) icon ic-inter-callbehUse in the icon bar, and click in the Interaction Overview diagram to insert it.

Collect Account Information is automatically inserted as a Interaction occurrence element, if you are using the Bank_Multilanguage.ump example file from the ...\UModelExamples folder. The first existing sequence diagram is selected per default.

2. To change the Interaction element: double click the behavior combo box in the Properties tab.

A list of all the possible elements that can be inserted is presented.

3. Select the occurrence you want to insert.

Note that all elements inserted using this method appear in the form shown in the screenshot above i.e. with "ref" in the frame's title space.

ic-int-decNode DecisionNode

Inserts a Decision Node which has a single incoming transition and multiple outgoing guarded transitions. Please see "Creating a branch" for more information.

ic-int-mergeNode MergeNode

Inserts a Merge Node which merges multiple alternate transitions defined by the Decision Node. The Merge Node does not synchronize concurrent processes, but selects one of the processes.

ic-act-initial-node InitialNode

The beginning of the activity process. An interaction can have more than one initial node.

ic-act-finalact-node ActivityFinalNode

The end of the interaction process. An interaction can have more that one final node, all flows stop when the "first" final node is encountered.

ic-act-forknode ForkNode

Inserts a vertical Fork node.

Used to divide flows into multiple concurrent flows.

ic-act-forkn-horiz ForkNode (Horizontal)

Inserts a horizontal Fork node.

Used to divide flows into multiple concurrent flows.

ic-act-joinnode JoinNode

Inserts a vertical Fork node.

A Join node synchronizes multiple flows defined by the Fork node.

ic-act-joinn-horiz Join Node (horizontal)

Inserts a horizontal Fork node.

A Join node synchronizes multiple flows defined by the Fork node.

ic-int-durConst AddDurationConstraint

A Duration defines a ValueSpecification that denotes a duration in time between a start and endpoint. A duration is often an expression representing the number of clock ticks, which may elapse during this duration.

ic-int-flowctrl ControlFlow

A Control Flow is an edge, i.e. an arrowed line, that connects two behaviours, and starts an interaction after the previous one has been completed.


Sequence Diagram

Altova web site: AltovaWebLink UML Sequence diagrams

UModel supports the standard Sequence diagram defined by UML, and allows easy manipulation of objects and messages to model use case scenarios. Please note that the sequence diagrams shown in the following sections are only available in the Bank_Java.ump, Bank_CSharp.ump and Bank_MultiLanguage.ump samples, in the ...\UModelExamples folder supplied with UModel.

Note: It is now possible to generate a sequence diagram directly from source code, please see Sequence Diagram diagram generation , or through the UModel API, see How to create Sequence Diagrams.


Inserting sequence diagram elements

A sequence diagram models runtime dynamic object interactions, using messages. Sequence diagrams are generally used to explain individual use case scenarios.

· Lifelines are the horizontally aligned boxes at the top of the diagram, together with a dashed vertical line representing the object's life during the interaction. Messages are shown as arrows between the lifelines of two or more objects.

· Messages are sent between sender and receiver objects, and are shown as labeled arrows. Messages can have a sequence number and various other optional attributes: argument list etc. Conditional, optional, and alternative messages are all supported. Please see Combined Fragment for more information.

Please see the following topics for more information:

Lifeline

Combined Fragment

Interaction Use

Gate

State Invariant

Messages

Sequence diagram and other UModel elements, can be inserted into a sequence diagram using several methods.

Using the toolbar icons:

1. Click the specific sequence diagram icon in the Sequence Diagram toolbar.
2. Click in the Sequence diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the sequence diagram:

Most classifier types, as well as elements occurring in other sequence diagrams, can be inserted into an existing sequence diagram.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the sequence diagram.


Lifeline

ic-lifeline Lifeline

The lifeline element is an individual participant in an interaction. UModel also allows you to insert other elements into the sequence diagram, e.g. classes and actors. Each of these elements appear as a new lifeline once they have been dragged into the diagram pane from the Model Tree tab.

The lifeline label appears in a bar at the top of the sequence diagram. Labels can be repositioned and resized in the bar, with changes taking immediate effect in the diagram tab. You can also redefine the label colors/gradient using the "Header Gradient" combo boxes in the Styles tab.

To create a multiline lifeline press CTRL+Enter to create a new line.

Most classifier types can be inserted into the sequence diagram. The "represents" field in the Properties tab displays the element type that is acting as the lifeline. Dragging typed properties onto a sequence diagram also creates a lifeline.

Execution Specification (Object activation):

An execution specification (activation) is displayed as a box (rectangle) on the object lifeline. An activation is the execution of a procedure and the time needed for any nested procedures to execute. Activation boxes are automatically created when a message is created between two lifelines.

A recursive, or self message (one that calls a different method in the same class) creates stacked activation boxes.

Displaying/hiding activation boxes:

1. Click the Styles tab and scroll to the bottom of the list.

The "Show Execution Specifications" combo box allows you to show/hide the activation boxes in the sequence diagram.

Lifeline attributes:

The destruction check box allows you to add a destruction marker, or stop, to the lifeline without having to use a destruction message.

The selector field allows you to enter an expression that specifies the particular part represented by the lifeline, if the ConnectableElement is multivalued, i.e. has a multiplicity greater than one.

Goto lifeline element

Right clicking a lifeline allows you to select Goto XXX, where XXX is the specific lifeline type that you clicked. The element will then be visible in the Model Tree window.


Combined Fragment

ic-comb-frag CombinedFragment

Combined fragments are subunits, or sections of an interaction. The interaction operator visible in the pentagon at top left, defines the specific kind of combined fragment. The constraint thus defines the specific fragment, e.g. loop fragment, alternative fragment etc. used in the interaction.

The combined fragment icons in the icon bar, allow you to insert a specific combined fragment: seq, alt or loop. Clicking the interactionOperator combo box, also allows you to define the specific interaction fragment.

InteractionOperators

Weak sequencing seq ic-comb-frag

The combined fragment represents weak sequencing between the behaviours of the operands.

Alternatives alt ic-comb-frag-alt

Only one of the defined operands will be chosen, the operand must have a guard expression that evaluates to true.

If one of the operands uses the guard "else", then this operand is executed if all other guards return false. The guard expression can be entered immediately upon insertion, will appear between the two square brackets.

The InteractionConstraint is actually the guard expression between the square brackets.

Option opt

Option represents a choice where either the sole operand is executed, or nothing happens.

Break break

The break operator is chosen when the guard is true, the rest of the enclosing fragment is ignored.

Parallel par

Indicates that the combined fragment represents a parallel merge of operands.

Strict sequencing strict

The combined fragment represents a strict sequencing between the behaviours of the operands.

Loop loop ic-comb-frag-loof

The loop operand will be repeated by the number of times defined in the guard expression.

Having selected this operand, you can directly edit the expression (in the loop pentagon) by double clicking.

Critical Region critical

The combined fragment represents a critical region. The sequence(s) may not be interrupted/interleaved by any other processes.

Negative neg

Defines that the fragment is invalid, and all others are considered to be valid.

Assert assert

Designates the valid combined fragment, and its sequences. Often used in combination with consider, or ignore operands.

Ignore ignore

Defines which messages should be ignored in the interaction. Often used in combination with assert, or consider operands.

Consider consider

Defines which messages should be considered in the interaction.

Adding InteractionOperands to a combined fragment:

1. Right click the combined fragment and select New | InteractionOperand.

The text cursor is automatically set for you to enter the guard condition.

2. Enter the guard condition for the InteractionOperand e.g. !passwordOK and press Enter to confirm.

Use CTRL+Enter to create a multi-line InteractionOperand.

3. Use the same method to add the second interaction operand with the guard condition "else".

Dashed lines separate the individual operands in the fragment.

Deleting InteractionOperands:

1. Double click the guard expression in the combined fragment element, of the diagram (not in the Properties tab).
2. Delete the guard expression completely, and press Enter to confirm.

The guard expression/interaction operand is removed and the combined fragment is automatically resized.


Interaction Use

ic-interact-use InteractionUse

The InteractionUse element is a reference to an interaction element. This element allows you to share portions of an interaction between several other interactions.

Clicking the "refersTo" combo box, allows you to select the interaction that you want to refer to. The name of the interaction use you select, appears in the element.

Please note:

You can also drag an existing Interaction Use element from the Model Tree into the diagram tab.


Gate

ic-gate Gate

A gate is a connection point which allows messages to be transmitted into, and out of, interaction fragments. Gates are connected using messages.

1. Insert the gate element into the diagram.
2. Create a new message and drag from the gate to a lifeline, or drag from a lifeline and drop onto a gate.

This connects the two elements. The square representing the gate is now smaller.


State Invariant

ic-state-inv StateInvariant

A StateInvariant is a condition, or constraint applied to a lifeline. The condition must be fulfilled for the lifeline to exist.

To define a StateInvariant:

1. Click the State invariant icon, then click a lifeline, or an object activation to insert it.
2. Enter the condition/constraint you want to apply, e.g. accountAmount > 0, and press Enter to confirm.


Messages

Messages are sent between sender and receiver lifelines, and are shown as labeled arrows. Messages can have a sequence number and various other optional attributes: argument list etc. Messages are displayed from top to bottom, i.e. the vertical axis is the time component of the sequence diagram.

· A call is a synchronous, or asynchronous communication which invokes an operation that allows control to return to the sender object. A call arrow points to the top of the activation that the call initiates.
· Recursion, or calls to another operation of the same object, are shown by the stacking of activation boxes (Execution Specifications).

To insert a message:

1. Click the specific message icon in the Sequence Diagram toolbar.
2. Click the lifeline, or activation box of the sender object.
3. Drag and drop the message line onto the receiver objects lifeline or activation box.

Object lifelines are highlighted when the message can be dropped.

· The direction in which you drag the arrow defines the message direction. Reply messages can point in either direction.

· Activation box(es) are automatically created, or adjusted in size, on the sender/receiver objects. You can also manually size them by dragging the sizing handles.

· Depending on the message numbering settings you have enabled, the numbering sequence is updated.

· Having clicked a message icon and holding down CTRL, allows you to insert multiple messages by repeatedly clicking and dragging in the diagram tab.

To delete a message:

1. Click the specific message to select it.
2. Press the Del. key to delete it from the model, or right click it and select "Delete from diagram".

The message numbering and activation boxes of the remaining objects are updated.

"Go to operation" for call messages:

The operations referenced by call messages can be found in sequence and communication diagrams.

1. Right click a call message and select "Go to Operation".

The display changes and the connect operation is displayed in the Model Tree tab.

Please note:

Static operation names are show as underlined in sequence diagrams.

To position dependent messages:

1. Click the respective message and drag vertically to reposition it.

The default action when repositioning messages, is it to move all dependent messages related to the active one.

Using CTRL+click, allows you to select multiple messages.

To position messages individually:

1. Click the "Toggle dependent message movement" icon ic-togg-dept-msg-movt to deselect it.
2. Click the message you want to move and drag to move it.

Only the selected message moves during dragging. You can position the message anywhere in the vertical axis between the object lifelines.

To automatically create reply messages:

1. Click the "Toggle automatic creation of replies for messages" icon ic-togg-replymsg .
2. Create a new message betwween two lifelines.

A reply message is automatically inserted for you.

Message numbering:

UModel supports different methods of message numbering: nested, simple and none.

· None ic-no-msg removes all message numbering.
· Simple ic-simple-msg assigns a numerical sequence to all messages from top to bottom i.e. in the order that they occur on the time axis.
· Nested ic-nested-msg uses the decimal notation, which makes it easy to see the hierarchical structure of the messages in the diagram. The sequence is a dot-separated list of sequence numbers followed by a colon and the message name.

To select the message numbering scheme:

There are two methods of selecting the numbering scheme:

· Click the respective icon in the icon bar.
· Use the Styles tab to select the scheme.

To select the numbering scheme using the Styles tab:

1. Click the Styles tab and scroll down to the Message Numbering field.
2. Click the combo box and select the numbering option you want to use.

The numbering option you select is immediately displayed in the sequence diagram.

Please note:

The numbering scheme might not always correctly number all messages, if ambiguous traces exist. If this happens, adding return messages will probably clear up any inconsistencies.

Message replies:

Message reply icons are available to create reply messages, and are displayed as dashed arrows.

Reply messages are also generally implied by the bottom of the activation box when activation boxes are present. If activation boxes have been disabled (Styles tab | Show Execution Specifics=false), then reply arrows should be used for clarity.

Activating the ic-togg-replymsg "toggle reply messages" icon, automatically creates syntactically correct reply messages when creating a call message between lifelines/activations boxes.

Creating objects with messages:

1. Messages can create new objects. This is achieved using the Message Creation icon ic-msg-create .
2. Drag the message arrow to the lifeline of an existing object to create that object.

This type of message ends in the middle of an object rectangle, and often repositions the object box vertically.

Sending messages to specific class methods/operations in sequence diagrams

Having inserted a class from the Model Tree into a sequence diagram, you can then create a message from a lifeline to a specific method of the receiver class (lifeline) using UModel's syntax help and autocompletion functions.

1. Create a message between two lifelines, the receiving object being a class lifeline (Bank)

As soon as you drop the message arrow, the message name is automatically highlighted.

2. Enter a character using the keyboard e.g. "b".

A pop-up window containing a list of the existing class methods is opened.

3. Select an operation from the list, and press Enter to confirm e.g. collectAccountInfos.
4. Press the spacebar and press Enter to select the parenthesis character that is automatically supplied.

A syntax helper popup now appears, allowing you to enter the parameter correctly.

Creating operations in referenced classes

Activating the ic-create-op-inTarg "Toggle automatic creation of operations in target by typing operation names" icon, automatically creates the corresponding operation in the referenced class, when creating a message and entering a name e.g. myOperation().

Note: operations can only be created automatically when the lifeline references a class, interface...

Message icons:

ic-msg-call Message (Call)

ic-msg-reply Message (Reply)

ic-msg-create Message (Creation)

ic-msg-destruct Message (Destruction)

ic-msg-asyn-call Asynchronous Message (Call)

ic-msg-asyn-reply Asynchronous Message (Reply)

ic-msg-asyn-destruct Asynchronous Message (Destruction)

ic-togg-dept-msg-movt Toggle dependent message movement

ic-togg-replymsg Toggle automatic creation of replies for messages

ic-create-op-inTarg Toggle automatic creation of operations in target by typing operation names


Generating Sequence Diagrams from source code

UModel is able to create sequence diagram models directly from code, or through the UModel API. Please see How to create Sequence Diagrams using the UModelAPI for more information.

The example below shows how to automatically create a sequence diagram by using an existing method. You can, of course, use the same approach on your own code. The method is available in the OrgChart package which was imported using the Project | Import Source Directory command in the tutorial. Please see Round-trip engineering (code - model - code) in the tutorial for more information on importing code.

1. Having imported the code, right click the main method of the OrgChartTest class, in the Model Tree and select Generate Sequence Diagram...

This opens the Sequence Diagram Generation dialog box in which you define the generation settings.

2. Select the presentation and layout options, then click OK to generate the diagram.

The settings shown above produce the sequence diagram below.

The "Add notes on separate layer" option assigns the code notes to the Code Annotations layer. The code notes are shown in orange.

Notes:

· You can assign a special color to the non-displayable invocations.

· The maximum invocation depth defines the recursion depth to be used in the diagram.

· The "Type names to ignore" option, allows you to define a comma delimited list of types that should not appear in the sequence diagram when it is generated.

· The "Operation names to ignore" option allows you define a comma delimited list of operations that should not appear in the generated sequence diagram (initComponents are automatically added as a default).

Adding the operation names to the list e.g. "InitComponents" causes the complete operation to be ignored. Prepending a + character to the operation in the list e.g. +InitComponent, causes the the operation calls to be shown in the diagram, but without their content.

· The "Split into smaller diagrams where appropriate" option automatically splits sequence diagrams into smaller sub-diagrams, and automatically generates hyperlinks between them for easy navigation.

Sequence diagrams are automatically updated when you update the complete UModel project. Sequence diagrams are not updated if you update classes, or individual files, externally. You can however change this setting by clicking on the diagram background and clicking the "Automatic Update" checkbox.

Clicking the ic-more icon of the Automatic Update field, opens the Sequence Diagram Generation dialog box allowing you to change the sequence diagram generation settings.


Generate Sequence diagrams from properties

UModel is able to create multiple sequence diagram models from multiple operations, as well as sequence diagrams from Getter / Setter properties.

Creating multiple sequence diagrams from multiple operations:

1. Select the menu option Project | Generate Sequence diagrams.

This opens the Select one or more operations dialog box.

2. Select the operations that you want to generate a sequence diagram for and click OK. (Use the Select All Public and Select All buttons where necessary.)

Clicking OK opens the Sequence Diagram Generation dialog box, in which you can further specify the sequence diagram generation options.

3. Click OK to generate the sequence diagrams.

A sequence diagram is generated for each selected operation.

Note: you can now choose to include/exclude Getters and Setters, when generating the sequence diagram.

Creating a sequence diagram from getter/setter properties (C#, VB .NET)

1. Right click an Operation with a GetAccessor/SetAccessor stereotype.

2. Select the option from the context menu that you want to create a sequence diagram from (Getter/Setter).

This opens the Sequence Diagram Generation dialog box in which you can further specify the sequence diagram presentation settings.

3. Click OK to generate the Sequence Diagram.


Generate code from sequence diagram

UModel can create code from a sequence diagram which is linked to at least one operation.

Code generation from sequence diagrams is available for:

· VB.NET, C# and Java
· UModel standalone, Eclipse, and Visual Studio editions
· All three UModel editions

Creating code from Sequence diagrams is possible by either:

· Starting from a reverse engineered operation, see Generating Sequence Diagrams from source code,

· By creating a new sequence diagram from scratch, which is linked to an operation, by right-clicking the operation (in the Model Tree) and selecting Create sequence diagram for code.

Notes:

When using a reverse engineered sequence diagram as basis, ensure that the option "Show code in notes" is selected when reverse engineering the code, so you do not lose any code when you start the forward-engineering process again.

This is due to the fact that UML is not able to display all the language features of VB.NET, Java and C# on the sequence diagram, and those code sections are therefore shown as code notes.

To add plain text as code when creating a sequence diagram:

1. Attach a note to a sequence diagram lifeline.
2. Type in the code which should be written into the final source code.

Click the "Is Code" check box (in the Properties pane) for that note, to make it accessible.

Please see Adding code to sequence diagrams for an example.

If a Sequence Diagram is to be used for code engineering automatically every time code engineering is started:

· Activate the "Use for forward engineering" check box in the property pane when the sequence diagram is selected.

Old code will always be lost when forward engineering code from a sequence diagram, because it will be overwritten with the new code.

Project menu:

1. Select the menu option Project | Generate Code from Sequence Diagrams.

You are now prompted to select the specific Sequence Diagram(s).

Clicking the "Select All" button selects all the Sequence Diagrams in the UModel project.

2. Click OK to generate the code.

The Messages window shows the status of the code generation process.

Model Tree:

· Right click a Sequence Diagram and select Generate Code from Sequence diagram.

Sequence Diagram containing code of an operation:

1. Click into the empty space of the Sequence Diagram, that contains code of an operation.
2. Select Generate Code from Sequence diagram.

This command starts the forward-engineering process at this point.

To create a Sequence diagram for code (engineering):

1. In the Model Tree, right click an operation and select Create Sequence diagram for code.

You will then be prompted if you want to use the new diagram for forward engineering.

The result is a new Sequence Diagram containing the lifeline of that class.


Adding code to sequence diagrams

Program code can be generated from new, and reverse-engineered sequence diagrams, but only for a sequence diagram linked to the "main operation".

When reverse-engineering code, standard sequence diagram elements, e.g. CombinedFragments, are "mapped/assigned" to coding elements (e.g. "if" statements, loops, etc.).

For those programming statements that have no corresponding sequence diagram elements, e.g. "i = i+1", UModel makes use of "code" notes to add code to diagrams. These notes must then be linked to the lifeline.

Note that UModel does not check, or parse, these code fragments. It is up to you to make sure that the code fragments are correct and will compile.

To add code to a sequence diagram:

1. Click the Note icon ic-note then click the model element where you want to insert it, e.g. CombinedFragment.
2 Enter the code fragment, e.g. return.
3. Click the Node Link handle of the inserted note and drop the cursor on the lifeline.
4. Activate the "Is Code" check box in the Properties tab to include this code fragment when generating code.

When selecting a note on a sequence diagram, which can be used for code generation, the property "is code" is available in the Properties window. Clicking the check box, allows you to switch between "ordinary" notes and code generation notes.

Ordinary notes: | sd-codeNoteNorm
Code generation notes | sd-codeNoteCode - shown with a darker dog-ear

Code updates occur automatically on every forward engineering process if the "Use for forward engineering" check box is active. If changes were made to the sequence diagram, the code of the operation is always overwritten.

The sequence diagram shown below was generated by right clicking the OnCommand operation and selecting "Generate sequence diagram from code". The C# code of this example is available in the c:\Documents and Settings\<user>\My Documents\Altova\UModel2012\UModelExamples\IDEPlugIn\Styles\ folder. Use the option Project | Import Source Project, to import the project.

The code shown below is generated from the sequence diagram.

Public void OnCommand(int nID, object pUModel)

{

//Generated by UModel. This code will be overwritten when you re-run code generation.

if (!m_bPlugINVersionOK)

{

return;

}

if (nID == 3 || nID == 6)

{

OnSetStyles((IApplication)pUModel, "red");

}

if (nID == 4 || nID == 7)

{

OnSetStyles((IApplication)pUModel, "green");

}

GC.Collect();

}


Timing Diagram

Altova web site: AltovaWebLink UML Timing diagrams

Timing diagrams depict the changes in state, or condition, of one or more interacting objects over a given period of time. States, or conditions, are displayed as timelines responding to message events, where a lifeline represents a Classifier Instance or Classifier Role.

A Timing diagram is a special form of a sequence diagram. The difference is that the axes are reversed i.e. time increases from left to right, and lifelines are shown in separate vertically stacked compartments.

Timing diagrams are generally used when designing embedded software or real-time systems.

There are two different types of timing diagram: one containing the State/Condition timeline as shown above, and the other, the General value lifeline, shown below.


Inserting Timing Diagram elements

Using the toolbar icons:

1. Click the specific timing icon in the Timing Diagram toolbar.

2. Click in the Timing Diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the timing machine diagram:

Elements occurring in other diagrams, e.g. classes, can be inserted into an Timing Diagram.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the state diagram.


Lifeline

ic-time-lifestate or ic-time-lifegen Lifeline

The lifeline element is an individual participant in an interaction, and is available in two different representations: State/Condition timeline or General Value lifeline. To create a multiline lifeline press CTRL+Enter to create a new line.

To insert a State Condition (StateInvariant) lifeline and define state changes:

1. Click the Lifeline (State/Condition) icon ic-time-lifestate in the title bar, then click in the Timing Diagram to insert it.

2. Enter the lifeline name to change it from the default name, Lifeline1, if necessary.
3. Place the mouse cursor over a section of one of the timelines and click left. This selects the line.
4. Move the mouse pointer to the position you want a state change to occur, and click again.

Note that you will actually see the double headed arrow when you do this.

A red box appears at the click position and divides the line at this point.

5. Move the cursor to the right hand side of the line and drag the line upwards.

Note that lines can only be moved between existing states of the current lifeline.

Any number of state changes can be defined per lifeline. Once the red box appears on a line, clicking anywhere else in the diagram deletes it.

To add a new state to the lifeline:

1. Right click the lifeline and select New | State/Condition (StateInvariant).

A new State e.g. State3 is added to the lifeline.

To move a state within a lifeline:

1. Click the state label that you want to move.
2. Drag it to a different position in the lifeline.

To delete a state from a lifeline:

1. Click the state and press the Del. key, or alternatively, right click and select Delete.

To switch between timing diagram types:

1. Click the "toggle notation" icon at the bottom right of the lifeline.

This changes the display to the General Value lifeline, the cross-over point represents a state/value change.

Please note that clicking the Lifeline (General Value) icon ic-time-lifegen , inserts the lifeline as shown above. You can switch between the two representations at any time.

To add a new state to the General value lifeline:

1. Right click the lifeline and select New | State/Condition (StateInvariant).
2. Edit the new name e.g. State3, and press Enter to confirm.

A new State is added to the lifeline.

Grouping lifelines

Placing, or stacking lifelines, automatically positions them correctly and preserves any tick marks that might have been added. Messages can also be created between separate lifelines by dragging the respective message object.


Tick Mark

ic-time-ticks TickMark

The tick mark is used to insert the tick marks of a timing ruler scale onto a lifeline.

To insert a TickMark:

1. Click the tick mark icon and click on the lifeline to insert it.

2. Insert multiple tick marks by holding down the CTRL key and repeatedly clicking at different positions on the lifeline border.
3. Enter the tick mark label in the field provided for it.

Drag tick marks to reposition them on the lifeline.

To evenly space tick marks on a lifeline:

1. Use the marque, by dragging in the main window, to mark the individual tick marks.
2. Click the Space Across icon ic-space-across in the icon bar.


Event/Stimulus

ic-time-event Event / Stimulus

The Event/Stimulus ExecutionEvent is used to show the change in state of an object caused by the respective event or stimulus. The received events are annotated to show the event causing the change in condition or state.

To insert an Event/Stimulus:

1. Click the Event/Stimulus icon, then click the specific position in the timeline where the state change takes place.

2. Enter a name for the event, in this example the event is "Code".

Note that the event properties are visible in the Properties tab.


DurationConstraint

ic-time-duratcon DurationConstraint

A Duration defines a ValueSpecification that denotes a duration in time between a start and endpoint. A duration is often an expression representing the number of clock ticks, which may elapse during this duration.

To insert an DurationConstraint:

1. Click the DurationConstraint icon, then click the specific position on the lifeline where the constraint is to be displayed.

The default minimum and maximum values, "d..t", are automatically supplied. These values can be edited by double clicking the time constraint, or by editing the values in the Properties window.

2. Use the "handles" to resize the object if necessary.

Changing the orientation of the DurationConstraint:

1. Click the "Flip" icon to orient the constraint vertically.


TimeConstraint

ic-time-constraint TimeConstraint

A TimeConstraint is generally shown as graphical association between a TimeInterval and the construct that it constrains. Typically this graphical association between an EventOccurrence and a TimeInterval.

To insert a TimeConstraint:

1. Click the TimeConstraint icon, then click the specific position on the lifeline where the constraint is to be displayed.

The default minimum and maximum values are automatically supplied, "d..t" respectively. These values can be edited by double clicking the time constraint, or by editing the values in the Properties window.


Message

ic-time-message Message (Call) ic-time-mess-reply Message (Reply) ic-time-asynchMsg Async message (Call)

A Message is a modeling element that defines a specific kind of communication in an Interaction. A communication can be e.g. raising a signal, invoking an Operation, creating or destroying an Instance. The Message specifies the type of communication defined by the dispatching ExecutionSpecification, as well as the sender and the receiver.

Messages are sent between sender and receiver timelines, and are shown as labeled arrows.

To insert a message:

1. Click the specific message icon in the toolbar.
2. Click anywhere on the timeline sender object e.g. Idle.
3. Drag and drop the message line onto the receiver objects timeline e.g. NoCard.

Lifelines are highlighted when the message can be dropped.

· The direction in which you drag the arrow defines the message direction. Reply messages can point in either direction.

· Having clicked a message icon and holding down CTRL, allows you to insert multiple messages by repeatedly clicking and dragging in the diagram tab.

To delete a message:

1. Click the specific message to select it.
2. Press the Del. key to delete it from the model, or right click it and select "Delete from diagram".


Structural Diagrams

These diagrams depict the structural elements that make up a system or function. Both the static, e.g. Class diagram, and dynamic, e.g. Object diagram, relationships are presented.

Structural Diagrams

ic-dia-class Class Diagram

ic-dia-compon Component Diagram

ic-dia-composite Composite Structure Diagram

ic-dia-deploy Deployment Diagram

ic-dia-object Object Diagram

ic-dia-package Package Diagram

ic-profile-diag Profile Diagram


Class Diagram

Please see the Class Diagrams section in the tutorial for more information on how to add classes to a diagram.

Expanding / hiding class compartments in a UML diagram:

There are several methods of expanding the various compartments of class diagrams.

· Click on the + or - buttons of the currently active class to expand/collapse the specific compartment.
· Use the marquee (drag on the diagram background) to mark multiple classes, then click the expand/hide button. You can also use CTRL+click to select multiple classes.
· Press CTRL+A to select all classes, then click the expand/collapse button, on one of the classes, to expand/collapse the respective compartments.

Expanding / collapsing class compartments in the Model Tree:

In the Model Tree classes are subelements of packages and you can affect either the packages or the classes.

Click the package / class you want to expand and:

Press the * key to expand the current package/class and all sub-elements

Press the + key to open the current package/class.

To collapse the packages/classes, press the - keyboard key.

Note that you can use the standard keyboard keys, or the numeric keypad keys to achieve this.

Changing the visibility type icons

Clicking the visibility icon to the left of an operation ic-mod-operation, or property ic-mod-property, opens a drop-down list enabling you to change the visibility status. You can also change the type of visibility symbols that you want to see.

· Click a class in the diagram window, click the Styles tab and scroll down the list until you find the Show Visibility entry.

You can choose between the UModel type shown above, or the UML conformant symbols shown below.

Showing / Hiding node content (class attributes, operations, slots)

UModel now allows you to individually display the attributes or operations of a class, as well as define which should be shown when adding them as new elements. Note that this it now possible to show/hide object slots i.e. InstanceSpecifications using the same method.

Right click a class, e.g. SavingsAccount, and select the menu option Show/Hide Node content.

Deselecting a protected checkbox in the Attributes group, deselects the protected attributes in the preview window.

Having confirmed with OK, the protected attributes in the class are replaced with ellipsis "...". Double clicking the ellipsis opens the dialog box.

Note that individual attributes can be affected by only deselecting the check box in the preview window.

Showing / Hiding class attributes or operations - Element styles

UModel allows you to insert multiple instances of the same class on a single diagram, or even different diagrams. The visibility settings can be individually defined for each of these "views" to the class. The screenshot below shows two views to the same class i.e. SavingsAccount.

The "When new elements are added and not hidden by Element Styles" option allows you to define what will be made visible when new elements are added to the class. Elements can be added manually in the model diagram and in the Model Tree, or automatically during the code engineering process.

Show elements: displays all new elements that are added to any view of the class.

E.g. The interestRate:float attribute has been hidden in both "views" of SavingsAccount, leaving the minimumBalance attribute visible. The "Show elements" radio button is active for the left-hand class.

Double clicking the ellipsis "..." in the attribute compartment of the left-hand class shows that the "Show elements" radio button is active.

Double clicking the ellipsis "..." in the attribute compartment of the right-hand class shows that the "Hide elements (except those added to this node)" radio button is active.

Clicking the left-hand class and pressing F7, (or clicking the class in the Model Tree and pressing F7) adds a new attribute (Property1) to the class.

The new element is only visible in the left-hand class, because "Show elements" is set as active. The right-hand class setting is "Hide elements...", so the new element is not shown there.

Clicking the right-hand class and pressing F7 adds a new attribute (Property2) to the class. This new attribute is now visible because the Hide elements... setting has the qualifier "except those added to this node", where "node" generically means this class, or modelling element.

The Property2 attribute is also visible in the left hand class, because the setting there is "Show elements"

Please note:

Tagged values of hidden elements are also hidden when you select the hide option.

Showing / Hiding VS .NET compartments:

UModel can now display .NET properties in their own compartment, by selecting the "Show .NET properties in own compartment" option in the Styles tab.

Showing VS .NET properties as associations

UModel can now display .NET properties as associations.

Right click a C# property as shown below, and select "Show | All .NET Properties as Associations" drag and drop the operation onto the diagram.

Changing the syntax coloring of operations/properties

UModel automatically enables syntax coloring, but lets you customize it to suit your needs. The default settings are shown below.

To change the default syntax coloring options (shown below):

1. Switch to the Styles tab and scroll the SC prefixed entries.
2. Change one of the SC color entries e.g. SC Type to red.

To disable syntax coloring:

1. Switch to the Styles tab and change the Use Syntax Coloring entry to false.
2. Use the Attribute Color, or Operation Color entries in the Styles tab to customize these items in the class.

Overriding base class operations and implementing interface operations

UModel gives you the ability to override the base-class operations, or implement interface operations of a class. This can be done from the Model Tree, Favorites tab, or in Class diagrams.

1. Right click one of the derived classes in the class diagram, e.g. CheckingAccount, and select Override/Implement Operations.

This opens the Overriden Methods dialog box shown below.

2. Select the Operations that you want to override and confirm with OK.

The "Select undefined..." buttons select those method types in the window at left.

Please note:

When the dialog box is opened, operations of base classes and implemented interfaces that have the same signature as existing operations, are automatically checked (i.e. active).

Creating getter / setter methods

During the modeling process it is often necessary to create get/set methods for existing attributes. UModel supplies you with two separate methods to achieve this:

· Drag and drop an attribute into the operation compartment
· Use the context menu to open a dialog box allowing you to manage get/set methods

To create getter/setter methods using drag and drop:

1. Drag an attribute from the Attribute compartment and drop it in the Operations compartment.

A popup appears at this point allowing you to decide what type of get/set method you want to create.

Selecting the first item creates a get and set method for interestRate:float.

To create getter/setter methods using the context menu:

1. Right click the class title, e.g. SavingsAccount, and select the context menu option Create Getter/Setter Operations.

The Create Getters/Setters dialog box opens displaying all attributes available in the currently active class.

2. Use the buttons to select the items as a group, or click the getter/setter check boxes individually.

Please note:

You can also right click a single attribute and use the same method to create an operation for it.

Ball and socket notation

UModel supports the ball and socket notation of UML. Classes that require an interface, display a "socket" and the interface name, while classes that implement an interface display the "ball".

In the shots shown above, Class2 realizes Interface1, which is used by classes 1, 3, and 4. The usage icons were used to create the usage relationship between the classes and the interface.

To switch between the standard and ball-and-socket view:

· Click the Toggle Interface notation icon at the base of the interface element.

Adding Raised Exceptions to methods of a class

1. Click the method of the class you want to add the raised exception to in the Model Tree window, e.g. getBalance of the Account class.
2. Right click in the Properties window and select Add Raised Exception from the popup menu.

This adds the raised exceptions field to the Properties window, and automatically selects the first entry in the popup menu.

3. Select an entry from the popup, or enter your own into the field.


Composite Structure Diagram

Altova web site: AltovaWebLink UML Composite Structure diagrams

The Composite Structure Diagram has been added in UML 2.0 and is used to show the internal structure, including parts, ports and connectors, of a structured classifier, or collaboration.


Inserting Composite Structure Diagram elements

Using the toolbar icons:

1. Click the specific Composite Structure diagram icon in the toolbar.
2. Click in the Composite Structure diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the Composite Structure diagram:

Most elements occurring in other Composite Structure diagrams, can be inserted into an existing Composite Structure diagram.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the Composite Structure diagram.

ic-comp-collab Collaboration

Inserts a collaboration element which is a kind of classifier/instance that communicates with other instances to produce the behavior of the system.

ic-comp-collab-use CollaborationUse

Inserts a Collaboration use element which represents one specific use of a collaboration involving specific classes or instances playing the role of the collaboration. A collaboration use is shown as a dashed ellipse containing the name of the occurrence, a colon, and the name of the collaboration type.

When creating dependencies between collaboration use elements, the "type" field must be filled to be able to create the role binding, and the target collaboration must have at least one part/role.

ic-comp-part Part (Property)

Inserts a part element which represents a set of one or more instances that a containing classifier owns. A Part can be added to collaborations and classes.

ic-comp-port Port

Inserts a port element which defines the interaction point between a classifier and its environment, and can be added on parts with a defined type.

ic-comp-class Class

Inserts a Class element, which is the actual classifier that occurs in that particular use of the collaboration.

ic-comp-conn Connector

Inserts a Connector element which can be used to connect two or more instances of a part, or a port. The connector defines the relationship between the objects and identifies the communication between the roles.

ic-comp-depend Dependency (Role Binding)

Inserts the Dependency element, which indicates which connectable element of the classifier or operation, plays which role in the collaboration.


Component Diagram

Please see the Component Diagrams section in the tutorial for more information on how to add component elements to the diagram.


Deployment Diagram

Please see the Deployment Diagrams section in the tutorial for more information on how to add nodes and artifacts to the diagram.


Object Diagram

Please see the Object Diagrams section in the tutorial for more information on how to add new objects/instances to the diagram.


Package Diagram

Package diagrams display the organization of packages and their elements, as well as their corresponding namespaces. UModel additionally allows you to create a hyperlink and navigate to the respective package content.

Packages are depicted as folders and can be used on any of the UML diagrams, although they are mainly used on use-case and class diagrams.

Automatic Package Dependency diagram generation

UModel has the capability to generate a package dependency diagram for any package in the Model Tree.

Dependency links between packages are created if there are any references between the modeling elements of those packages. E.g. Dependencies between classes, derived classes, or if attributes have types that are defined in a different package.

To generate a package dependency diagram:

1. Right click a package in the Model Tree, e.g. altova, and select Show in new Diagram | Package Dependencies....

This opens the New Package Dependency Diagram dialog box.

2. Select the specific options you need and click OK to confirm.

A new diagram is generated and displays the package dependencies of the altova package.


Inserting Package Diagram elements

Using the toolbar icons:

1. Click the specific icon in the Package Diagram toolbar.

2. Click in the diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the Package Diagram:

Elements occurring in other diagrams, e.g. other packages, can be inserted into a Package diagram.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the diagram.

ic-package Package

Inserts the package element into the diagram. Packages are used to group elements and also to provide a namespace for the grouped elements. Being a namespace, a package can import individual elements of other packages, or all elements of other packages. Packages can also be merged with other packages.

ic-pack-profile Profile

Inserts the Profile element, which is a specific type of package that can be applied to other packages.

The Profiles package is used to extend the UML meta model. The primary extension construct is the Stereotype, which is itself part of the profile. Profiles must always be related to a reference meta model such as UML, they cannot exist on their own.

ic-dependency Dependency

Inserts the Dependency element, which indicates a supplier/client relationship between modeling elements, in this case packages, or profiles.

ic-pack-import PackageImport

Inserts an <<import>> relationship which shows that the elements of the included package will be imported into the including package. The namespace of the including package gains access to the included namespace; the namespace of the included package is not affected.

Note: elements defined as "private" within a package, cannot be merged or imported.

ic-pack-merge PackageMerge

Inserts a <<merge>> relationship which shows that the elements of the merged (source) package will be imported into the merging (target) package, including any imported contents the merged (source) package.

If the same element exists in the target package then these elements' definitions will be expanded by those from the target package. Updated or added elements are indicated by a generalization relationship back to the source package.

Note: elements defined as "private" within a package, cannot be merged or imported.

ic-profileApp ProfileApplication

Inserts a Profile Application which shows which profiles have been applied to a package. This is a type of package import that states that a Profile is applied to a Package.

The Profile extends the package it has been applied to. Applying a profile, using the ProfileApplication icon, means that all stereotypes that are part of it, are also available to the package.

Profile names are shown as dashed arrows from the package to the applied profile, along with the <<apply>> keyword.


Profile Diagram and stereotypes

Altova web site: AltovaWebLink UML profile diagrams

The UModel Profile diagram allows you to define custom stereotypes, tagged values and constraints in a dedicated diagram.

Profiles and stereotypes are used to extend the UML meta model. The primary extension construct is the Stereotype, which is itself part of the profile. Profiles must always be related to a reference meta model such as UML, they cannot exist on their own. UModel now supports the Profile Diagram in which you can define your own stereotypes.

The Java Profile.ump (C# Profile.ump, or VB Profile.ump) file need to be applied when creating new UModel projects using the menu item Project | Include Subproject. This profile supplies the Java datatypes and stereotypes, and is essential when creating code for round-trip engineering.

The following sections describe:

· Adding Stereotypes and defining tagged values
· Stereotypes and enumerations
· User-defined stereotype styles

The Bank_CSharp.ump sample file (in the ...\UModelExamples folder) shows how this is done. The C# profile has been applied to the BankView package.

· Profiles are specific types of packages, that are applied to other packages.
· Stereotypes are specific metaclasses, that extend standard classes.
· "Tagged values" are values of stereotype attributes.

A ProfileApplication shows which profiles have been applied to a package, and is a type of package import that states that a Profile is applied to a Package. The Profile extends the package it has been applied to. Applying a profile, using the ProfileApplication icon ic-profileApp , means that all stereotypes that are part of it, are also available to the package.

ProfileApplications are shown as dashed arrows from the package to the applied profile, along with the <<apply>> keyword.

Stereotypes:

A stereotype defines how an existing metaclass may be extended. It is a kind of class that extends Classes through Extensions. Stereotypes can only be created in Profiles. Stereotypes are displayed as classes, in class diagrams, with the addition of the keyword <<stereotype>> added above the name of the class.

· Stereotypes may have properties, which are called "tag definitions"
· When the stereotype is applied to a model element, the property values are called "tagged values"
· When stereotypes containing properties are applied, the tagged values are automatically displayed in a comment element (shown below). Please see Tagged values for more info on how to customize the tagged values view
· Stereotypes have their own style family
· If the attribute is of type "enumeration", then an popup menu allows you to select from the predefined values. You can also enter/select the specific value in the Properties tab e.g. <<GetAccessor>> visibility = public, protected etc.


Adding Stereotypes and defining tagged values

This section uses the Bank_MultiLanguage.ump file available in the ...\UModelExamples folder.

Creating a Profile diagram and a stereotype

1. Create a new profile in the Model Tree view, e.g. right click the Root package and select New element | Profile and name it "MyProfile".

2. Right click the MyProfile package in the Model Tree and select New Diagram | Profile diagram.

This adds the Profile diagram to the selected package.

2. Drag the newly created profile "MyProfile", from the Model Tree into the new Profile diagram.
3. Drag the DesignView package into the Profile diagram as well.
4. Click the ProfileApplication icon ic-profileApp in the icon bar, select the DesignView package and drag the connector onto the MyProfile package.

This allows the stereotypes defined in this profile (MyProfile) to be used in the DesignView package, or any of its subpackages.

5. Click the stereotype icon ic-stereotype in the icon bar and insert a stereotype "class", e.g. MyKeyValuePair.

6. Press F7 to add an attribute to the stereotype e.g. MyKey1. Do the same thing to add MyKey2.

This concludes the definition of the stereotype for the moment. We can now use/assign the stereotype when adding an attribute to a class which is part of the BankView package.

Using / assigning stereotypes

1. Double click the BankView Main class diagram icon in the Model Tree.

This opens the class diagram and displays the associations between the various classes. We now want to add an attribute to the BankView class, and assign/use the previously defined stereotype.

2. Click the BankView class and press F7 to add an attribute.
3. Use the scrollbar of the Properties tab to scroll to the bottom of the list. Notice that the MyKeyValuePair stereotype is available in the list box.

4. Click the MyKeyValuePair check box to activate/apply it. The two tagged values MyKey1 and MyKey2, are now shown under the Stereotype entry.
5. Double click in the respective fields and enter some values.

Displaying tagged values in a diagram

1. Click the Styles tab, scroll down to the Show Tagged Values entry and select all.

The diagram tab now displays the tagged values in the Note element. Double clicking a value in the note element allows you to edit it directly.

Show tagged Values: in compartment

Displays the tagged values in a separate class compartment.

Please note:

When hiding attributes or operations using the "Show / Hide node content" context menu option, tagged values are also shown/hidden together with the modeling element.

Association (member) ends can display stereotypes by setting the Show MemberEnd stereotypes option to "true" in the Styles tab.

For more information on displaying tagged values see Displaying tagged values.


Stereotypes and enumerations

UModel has an efficient method of selecting enumerated values of stereotypes.

Click the diagram tab containing the stereotype definition (i.e. the previously added Profile diagram):

1. Click the Enumeration icon ic-enum in the icon bar to insert an enumeration into the diagram (containing the previously defined stereotype e.g. ProfileDiagram1).
2. Add EnumerationLiterals to the enumeration by pressing SHIFT+F7, or use the context menu, e.g. the EnumerationLiterals - Yes, and No.

3. Click the stereotype "class" and press F7 to add a new attribute/property, e.g. Finished.
4. Select the "MyEnum" type from the Properties tab.

5. Switch back to the BankView Main class diagram.
6. The Property Finished, is now shown as a tagged value in the note element.

Double clicking the Finished tagged value, presents the predefined enumeration values in a popup. Click one of the enumerations to select it.

Enumeration default values

UModel allows you to define default tagged values. When adding an attribute to the stereotype, double click in the default field and enter one of the existing enumerations as the default value.

In this case, the default value "Yes" is entered.

When a property is added to a class, and the MyEnum type is selected, the default value is automatically inserted as the tagged value i.e. Finished = Yes.


User-defined stereotype styles

It is now possible to create user-defined styles for individual stereotypes. This means that you can have specific fonts, colors etc. that are applied to those classes which are of that type of stereotype.

To create user-defined stereotype styles:

1. Click a previously defined stereotype e.g. MyKeyValuePair in the Class diagram.
2. Activate the Styles tab, then select Styles of elements with this Stereotype from the combo box.
3. Define the styles of this stereotype using the options in the Styles tab, e.g. Header Gradient End Color = aqua.

Clicking the stereotype class automatically displays the stereotype styles in the Styles tab.

4. Switch to a different Class Diagram and insert a new class.
5. Click the Class Header/Title and activate the MyKeyValuePair stereotype check box.

The new class now has the styles that were assigned to the stereotype i.e. an aqua gradient. Note that the stereotype styles are not applied if the stereotype is applied to an property or operation within the class.

6. Click the new stereotype class in the diagram then click the Styles tab.
7. Select the "Appled Stereotype Styles" entry in the Styles combo box.

You can now preview the style settings defined for this stereotype in the Styles window. Note that you cannot change the style settings here. This must be done in the class diagram in which the stereotype was defined.


Custom stereotype icons - assigning

UModel allows you to create custom stereotype icons for custom stereotypes.

To create a custom stereotype icon:

1. Right click the Root package and select New element | Package.
2. Name the package MyPackage.

3. Right click MyPackage and select New Diagram | Deployment diagram.

This creates a deployment diagram in MyPackage.

4. Right click in MyPackage and select New | Node.

This adds the node object to the diagram.

5. In the Model Tree, right click the Root package and select New element | Profile.
6. Name the profile "MyProfile".

7. Right click the MyProfile package and select New Diagram | Class diagram.

Selecting the stereotype icon

1. Drag the MyPackage and MyProfile folders from the Model Tree into the Class diagram.

2. Click the Profile-Application ic-profileApp icon in the tool bar, and drag the connector from MyPackage to MyProfile.

3. Click the stereotype icon ic-stereotype in the toolbar and click in the MyProfile package to insert it.

While the stereotype element is active, make the following changes in the Properties tab:

4. Change the name of the element from Stereotype1 to "node".
5. Change the metaclass property value from Element to "Node".
6. Enter a path for the image that you want to use as the stereotype icon in the "icon file name" field, or click the Browse button to select a path, e.g. c:\Documents and Settings\Me\My Documents\Altova\UModel2011\UModelExamples\Bank-PC.bmp.

7. Switch back to the Deployment diagram by clicking the DeploymentDiagram1 tab.
8. Click the Node1 element in the diagram.
9. Using the Properties window, activate <node> checkbox.

The representation of the stereotype icon has now changed to that of the selected bitmap.

Please note:

When displaying the custom icons the RGB color 82,82,82 is the backgrougd transparent color.


Additional Diagrams

UModel now supports the import and generation of W3C XML Schemas as well as their forward and reverse-engineering in the code-engineering process.

UModel now supports the Business Processing Modeling Notation Standard version 1.0 which was adopted as an OMG standard in February 2006.

ic-xsd-pack XML Schema

ic-bpmn-dia Business Process Modeling Notation

ic-dia-sysml SysML diagrams

ic-db-diagrams Database diagrams


XML Schema Diagrams

Altova web site: AltovaWebLink XML Schemas in UML

XML Schema diagrams display schema components in UML notation. Global elements i.e. elements, simpleTypes, complexTypes are shown as classes, or datatypes, with attributes in the attributes compartment.

There are no operations in the Operation compartment. The Tagged Value note modeling element is used to display the schema details.

To see how the UML elements and XML schema elements/attributes are mapped, navigate to XML Schema to/from UModel elements.

Please note:

Invalid XML Schemas cannot be imported into UModel. XML Schemas are not validated when importing, or creating them in UModel. XML Schemas are also not taken into account during the project syntax check. A well-formed check is however performed when importing an XML schema.


Importing XML Schema(s)

To import a single XML Schema:

1. Select the menu option Project | Import XML Schema file.

2. Make sure that the Enable diagram generation check box is active and click Next, to continue.

3. Define the Content diagram options in the group of that name. The first option creates a separate diagram for each schema global element.
4. Select the compartments that are to appear in the class diagrams in the Style group. The "Show schema details as tagged values" option displays the schema details in the Tagged Value note modeling element.
5. Click Next to define the Package dependency diagram.

6. Click Finish to start the XML Schema import.

The schema(s) are imported into UModel and all diagrams are available as tabs. The screenshot below shows the content of the EU-Address (complexType) diagram.

Please note:

A new package called All Schemas was created and set as the XSD Namespace Root. All XSD globals generate an XML Schema diagram, with the diagrams under the respective namespace packages.

To import multiple XML Schemas:

1. Select the menu option Project | Import XML Schema directory.

2. Activate the "Process all subdirectories" if you want to import Schemas from all subdirectories.

The rest of the import process follows the sequence of importing a single XML schema described above.

Please note:

If an XML schema includes or imports other schemas, then these schemas will be automatically imported as well.

Displaying tagged values - schema details

Schema details displayed as tagged values in the Tagged Value note element, can be configured using the Show Tagged Values in the Styles tab, or by clicking the "Toggle compact mode" icon at the bottom right of the Tagged Value note. This switches between the two states "all" and "all, hide empty", etc. which are shown below.

Note:

Selecting the tagged values from the Styles tab sets the the tagged value settings project wide. Right clicking a class and selecting Tagged values | all etc., only affects the individually marked classes.

Show tagged values: all

Displays the tagged values of the class as well as those of the owned attributes, operations etc.

Show tagged values: all, hide empty

Displays only those tagged values where a value exists e.g. fixed=true.

Show tagged values: element

Displays the tagged values of the class but not those of the owned attributes, operations etc.

Show tagged values: element, hide empty

Displays only those tagged element values of a class, without the owned attributes, where a value exists e.g. id=123

Show tagged values: in compartment

Displays the tagged values in a separate class compartment.

Show tagged values: in compartment, hide empty

Displays only those tagged element values of a class, without the owned attributes, where a value exists.

XML Schema annotation:

When importing XML schemas, please note that only the first annotation of a complex- or simpleType is displayed in the Documentation window.


Inserting XML Schema elements

Using the toolbar icons:

1. Click the specific XML Schema diagram icon in the toolbar.
2. Click in the XML Schema diagram to insert the element.

Note that holding down CTRL and clicking in the diagram tab, allows you to insert multiple elements of the type you selected.

Dragging existing elements into the XML Schema diagram:

Elements occurring in other diagrams can be inserted into an existing XML Schema diagram.

1. Locate the element you want to insert in the Model Tree tab (you can use the search function text box, or press CTRL+F, to search for any element).
2. Drag the element(s) into the XML Schema diagram.

Note: you can also use the Copy and "Paste in diagram only" commands to insert elements.

Please note:

Either method described above, applies to any of the XML Schema elements that can be inserted onto the diagram.

ic-sch-namesp XSD Target Namespace

Inserts/defines the target namespace for the schema. The XSD Target Namespace must belong to an XSD Namespace Root package.

ic-sch-xsd XSD Schema

Inserts/defines an XML schema. The XSD schema must belong to an XSD Target Namespace package.

ic-sch-elemen Element (global)

Inserts a global element into the diagram. Note that a property is also automatically generated in the attributes compartment.

To define the property datatype:

1. Double click the property and place the cursor at the end of the line.

2. Enter a colon character ":", and select the datatype from the popup dialog box, e.g string.

Creating a "content model" consisting of a complexType with mandatory elements:

This will entail inserting a complexType element, a sequence element/compositor, and three elements.

1. Click the XSD ComplexType icon ic-sch-compl , then click in the diagram to insert it.
2. Double click the name and change it to Address.

3. Right click Address and select New | XSD Sequence.

4. Click the _sequence:mg_sequence attribute in the attribute compartment, and drag it out into the diagram.

This creates a sequence class/compositor at the drop position.

5. Right click the sequence class and select New | XSD Element (local).

This adds a new property element.

6. Double click the property, enter the element name, e.g. Name, add a colon ":" and enter "string" as the datatype.

7. Do the same for the two more elements naming them Street and City for example.
8. Click the Name property and drag it into the diagram.


Creating and generating an XML Schema

You would generally import a schema, edit it in UModel, and output the changes. It is however possible to generate a schema from scratch. This will only be described in broad detail however.

Creating a new schema in UModel:

1. Create a new package in the Model Tree e.g. MY-Schemas.

2. Right click the new package and select the menu option Code Engineering | Set as XSD namespace root.

You are asked if you want to assign the XSD profile if this is the first XSD Namespace root in the project.

3. Click OK to assign the profile.
4. Right click the new package and select New Element | Package.
5. Double click in the package name field and change it to the namespace you want to use, e.g. http://www.my-ns.com.
6. Click the <<namespace>> check box in the Properties tab, to define this as the target namespace.

7. Right click the namespace package and select New diagram | XML Schema diagram.

You prompted if you want to add the Schema diagram to a new XSD Schema.

8. Click Yes to add the new diagram.

You can now create your schema using the icons in the XML Schema icon bar.

Generating the XML schema:

1. Drag the XSDSchema onto a component to create a Component Realization.
2. Make sure that you set the code language, of the component, to XSD1.0, and enter a path for the generated schema to be placed in, e.g. C:\schemacode\MySchema.xsd.

3. Select the menu option Project | Overwrite Program Code from UModel project, and click OK to generate the schema.


Business Process Modeling Notation 1.0 / 2.0

Altova web site: AltovaWebLink Business Process modeling in UModel

BPMN is a standardized flow-chart notation which shows business processes as a workflow and is easily understandable by all involved in the business process. UModel now supports BPMN versions 1.0 and 2.0.

UModel adds the new BPMN 2.0 diagrams: Choreograpy, Collaboration, and BPMN 2.0 Standard Business Process Diagrams.

Both BPMN 1.0 and BPMN 2.0 diagrams can coexist in the same UModel project. Conversion from BPMN 1.0 to BPMN 2.0 can be done at any time.

There are four basic element BPMN categories:

Flow objects | Events, Activities (Tasks or Sub-Processes), Gateways
Connecting objects | Sequence flow, Message Flow, Association
Swimlanes | Pool, Lane
Artifacts | Data Objects, Group, Text Annotation

Inserting BPMN diagrams and BPMN objects works in exactly the same way as inserting modeling elements in UModel.

Objects can be inserted using the icon bar; associations to other objects can be directly created by clicking on the object "handles" and dragging the connector to the target object. Properties can be viewed and set using the Properties tab.

Note that you can use the Layers tab to create multiple layers per BPMN diagram, please see Layer for more information.

To convert BPMN 1.0 diagrams to BPMN 2.0 diagrams:

1. Right click in a BPMN 1.0 diagram and select the option Convert to BPMN 2.0 diagram.

If more than one BPMN 1.0 diagram exists in the same package, you will be prompted to convert all of those in that package.

A second prompt appears, asking if you want to include the BPMN 2 Profile to the project.

Clicking OK converts the diagrams.


Flow objects

Flow objects are the graphical elements that define the behaviour of a business process. There are three Flow Objects: Events, Activities and Gateways.

Events

An event is something that occurs during a business process and is represented by a circle. Events affect the flow of the process and generally have a cause (trigger) and a result. There are three different types of events: start, intermediate or end, where each group has its own drop-down combo box.

To insert an Event:

1. Click the combo box to open the drop-down list of the type of event you want insert.
2. Select the specific Event and click in the diagram tab to insert it.

Start Event

Intermediate Event

Intermediate events can be attached to the boundary of a Task or Sub-Process, and show that the activity is to be interrupted when the event is triggered.

End Event

BMPN 2.0 Events:

Start Events

Catching Events

Throwing Events

End Events:

Activity

Activities are actions that are performed during a business process, and are represented by rounded rectangles. Process models can contain the following types of activity: Process, Sub-Process and Task. Activites can occur singly or multiple times within a loop.

To insert an Activity:

1. Click the specific Task or Sub-Process icon of the icon bar.
2. Click in the diagram tab.

Activity - Task

Tasks are activities that are included in a process. Tasks cannot be broken down into lower level subtasks, they are atomic.

Loop Task | bp-task-loop
Multi Instance Task | bp-task-multi
Compensation Task | bp-task-comp

BPMN 2.0 Tasks

To define a Loop, Parallel, Sequential or Compensation marker:

1. Right click the inserted task and select the specific marker, e.g. Show | Show BPMN Parallel Marker.

Note: You can also define the Marker in the Properties tab under the "MultiInstanceLoopCharacteristics entry.

Activity - Sub-Process

A Sub-Process is a compound activity that is included in a process, and allows hierarchical business process model development. A Sub-Process can be broken down into finer detail through various sub-activities.

A collapsed Sub-Process is displayed as a top-level element, where the details of the sub-process are not visible. A "plus" icon in the element shows that an additional layer of complexity exists.

An expanded Sub-Process displays the details of the Sub-Process within its boundaries. Note that a sequence flow cannot cross the boundary of a Sub-Process.

Gateway

Gateways are used to determine how Sequence Flows branch and merge within a process, and are always shown as a diamond.

Inclusive Gateway (OR) | bp-gate-inclOR
Parallel Gateway (AND) | bp-gate-parAND
Data Based Exclusive Gateway (XOR) | bp-gate-xor
Event Based Exclusive Gateway (XOR) | bp-g-eventXOR
Complex Gateway (Decision/Merge) | bp-gate-decmerge

BPMN 2.0 Gateways:


Expanded Sub Processes

Expanded versions of sub processes show the process detail within the element boundaries.

Expanded Sub-Process | bp-exp-sp
Expanded Loop Sub-Process | bp-exp-sp-loop
Expanded Multi Instance Sub-Process | bp-exp-sp-multi
Expanded Ad Hoc Sub-Process | bp-exp-sp-hoc
Expanded Compensation Sub-Process | bp-exp-sp-comp

BPMN 2.0 Expanded Sub Processes:

To define a Loop, Parallel, Sequential or Compensation marker:

1. Right click the inserted task and select the specific marker, e.g. Show | Show BPMN Parallel Marker.


Collapsed Sub Processes

Collapsed versions of sub-processes hide the process detail. The specific type of Sub-Process is shown by the icon within the Sub-Process element.

Collapsed Sub-Process | bp-collsp
Collapsed Loop Sub-Process | bp-collsp-loop
Collapsed Multi Instance Sub-Process | bp-collsp-multi
Collapsed Ad Hoc Sub-Process | bp-collsp-hoc
Collapsed Compensation Sub-Process | bp-collsp-comp

BPMN 2.0 Collapsed Sub Processes:

To define a Loop, Parallel, Sequential or Compensation marker:

1. Right click the inserted task and select the specific marker, e.g. Show | Show BPMN Parallel Marker.


Connecting objects

There are two ways of connecting objects: a Flow (using a sequence or message), and an Association.

Sequence Flow

A Sequence Flow shows the order that activities are performed within a Process.

Conditional Flow

This type of Sequence Flow can have a conditional expression which is evaluated to determine if the flow will be used or not. If the conditional flow originates from an activity, then a mini diamond is displayed at the origin of the arrow.

Default Flow

This type of flow is used if all other conditional flows are "false" in Data-Base Exclusive, or Inclusive decisions. A diagonal slash at the beginning of the arrow line is used as a visual indication, e.g. "Accepted" default flow.

Message Flow

A Message Flow shows the flow of messages between two participants (entities or roles), that can send and receive them. Participants are shown as separate Pools in the diagram.

Association

Associations are used to associate Text and non-Flow Object data with Flow Objects, and show how data are input and output from Activities. The diagram below shows a Text annotation which provides the additional information "User Activity" for the Task "Review Issue List".

To create an Association between a Data Object and a Flow control:

1. Click the Association handle of the Data Object (on the left of the object).
2. Drag the connector onto the Flow Control arrow which is highlighted when you can drop it.

Alternatively,

Click the Association icon and drag from the Data Object to the Flow Control.


Pools / Swimlanes

Pool

Pools are used to partition and organize activities. A business process may show the interaction between various processes or participants. Each participant is represented by a rectangular box called a Pool. A participant could be a business role or entity.

· BPMN objects placed within a pool become part of it when the pool boundary is highlighted.
· Objects within a pool can be individually selected using CTRL+Click, or by dragging the marquee inside the pool.
· Click the pool boundary, or title, and drag to reposition it.

Lane

Pools can be further subdivided into Lanes, which categorize activities within a pool. Note that both horizontal and vertical lanes can be defined.

To add a new lane to a pool:

1. Right click the header of an existing pool object and select New | Lane.

This adds a new lane to the pool. Each lane can be named separately, by double clicking in the name field.

Note:

Right clicking in one of the lanes allows you to add any of the elements allowed to be placed in a pool using the New option.


Artifacts

Artifacts allow you to show additional information about a Process i.e. how data, documents and other objects are used and updated during the business process. Artifacts are not directly related to sequence, or message flow, of the process.

Data Object

Data Objects are documents or other types of data, that show how data are used during a business process. Data objects can be be used to define the input and output of data to/from activites.

To create an Association between a Data Object and a Flow control:

1. Click the Association handle of the Data Object (on the left of the object).
2. Drag the connector onto the Flow Control object which is highlighted when you can drop it.

Text Annotation

Text Annotations allow you to annotate various sections of a business process and are connected to the specific object using an association.

Group

Groups are often used to highlight certain sections of a diagram, even across different pools. Groups cannot connect to a sequence or message flow. Group objects are generally placed behind task or process objects in the diagram.


Choreography diagram

Choreography Diagrams specify the the way business participants coordinate their interactions. They can also be seen as a business contract between participants, where the focus lies on the exchange of information (Messages) between the participants.

Business contracts are often in the form of a purchase order sent to a supplier, the confirmation by the supplier to process the order, then the fulfilling of the order. Choreographies also have Activities ordered by Sequence Flows.

Activities comprise of one or more interactions between the various participants. Interactions are often called Message Exchange Patterns (MEP). A MEP is the "Activity" of a choreography, and can also be called a Choreography Task.


Choreography Tasks

There are four types of choreography tasks that can be inserted into the diagram:

ic-chor-task Choreography Task

ic-chor-subtask Sub Choreography Task (collapsed)

ic-chor-subtask-exp Sub Choreography Task (expanded)

ic-chor-call Call Choreography Task

To insert a choreography task:

1. Click the Task icon of the Task that you want to insert, e.g. Choreography Task, then click in the Choreography Diagram.

The screenshot shows the default view when the Task is inserted; the "Choreography Task" text is automatically highlighted.

2. Enter text to rename the Choreography Task.
3. Click in the top band to enter the name of Participant A, and in the bottom band to name Participant B.

The Participant bands are shown as shaded/unshaded. The initiator of the Activity is the unshaded Participant, which is Participant A when the Task is first inserted.

To add/associate messages to a Choreography Task:

1. Click the message icon ic-chor-msg in the icon bar, then click in the diagram to insert it.

2. Enter the name of the message, e.g. "I need to see the doctor".
3. Click the Association handle (on the left) and drag it to the Choreography Task you want to associate it to.

To add a message to a line e.g. association:

1. Click the line that you want to add the message to.
2. Click the Message icon in the icon bar.
3. Click the same line again to attach it.

The message is placed on top of the line and automatically attached to it.

To change the initiating Message / Participant:

· When inserting a Message, it will automatically be defined as the initiating message, i.e. it is unshaded.

1. Click the Message and select false from the "initiating" combo box, in the Properties tab.

The message element is now shaded.

· When inserting a Choreography Task, Participant A is automatically defined as the Initiating Participant.

1. Click the Choreography Task that contains the Participant you want to be the initiator.
2. Enter the name of the Participant you want to define as the initiator in the "InitiatingParticipantRef" combo box, e.g. "Doctor / Office".

The Doctor / Office band is now unshaded, showing that it is the Initiating Participant. The Patient band is now shaded.

To add new Participants to a Choreography Task:

1. Click the Task you want to add the Participant to in the diagram window.

2. Right click the participantsRefs field in the Properties tab and select Add Tagged Value | participantRefs.
3. Enter the name of the new Participant e.g. Participant C.


Tasks and Subprocesses

Click the Task drop-down icon to insert the specific Task.

Click the Collapsed Subprocess drop-down icon to insert the specific Collapsed Subprocess.

Use the Expanded Subprocess drop-down icon to insert the specific Expanded Subprocess.


Data Objects

Data is represented by five modeling elements and are inserted by clicking one of the following icons:

ic-datObj Data Object

Represents information flowing through the process, e.g. emails, business documents, etc. Data objects provide information about what activities require to be performed and/or what they produce.

ic-datOutput Data Output

Represents the result of the process.

ic-datInput Data Input

Is an external input for the entire process. Can be read by an activity.

ic-datCollect Data Collection

Represents a collection of information e.g. a list of order items.

ic-datStore Data Store

A place where the process can read or write data e.g. a database.


Collaboration diagram

Collaboration Diagrams specify the interactions between two or more processes.

A Collaboration generally consists of two or more pools which represent the participants in the collaboration. Message exchanges between participants are shown by Message Flows that connect the two pools, or the objects within the pools. Pools may also be empty, in this case they are black boxes.

All combinations of Pools, Processes, and a Choreography are allowed in a Collaboration diagram.


Conversations

A Conversation is a simplified version of a Collaboration, and has access to the same modeling elements. A Conversation defines a set of logically related message exchanges, where the message exchanges are related to each another reflecting a distinct business scenario, e.g. a request followed by a response.

A Conversation has two other graphical elements not available in any other BPMN diagrams:

· Conversation node elements (Conversation, Sub-Conversation and Call-Conversation)
· Conversaton links

ic-conv-conv Conversation

ic-conv-sub Sub-Conversation

ic-conv-call Call-Conversation

ic-conv-ParticPool Participant / Pool

ic-conv-link Conversation Link


Standard Business Process diagram BPMN 2.0

Business Process diagrams cover a wide range of information and employ several different types of modeling, to create Business Processes.

There are three types of Business Processes:

Private non-executable (internal) Business Processes:

· Non executable Processes are those where there is not enough detail for the process to execute; generally during the development cycle.

Private executable (internal) Business Processes:

· Executable Processes are processes that are executable, due to the fact that they have been completely modeled according to the BPMN 2.0 semantics.

Public Processes:

· Define the interaction between a private process and a separate process, or participant. E.g. Doctor, Patient interactions.


SysML Diagrams

SysML

Altova web site: AltovaWebLink Modeling SysML diagrams in UModel

SysML 1.2 is a graphical modeling language for system engineers and supports specification, design and validation of systems including hardware, software, procedures etc. SysML models and data can be exchanged via XMI in UModel.

SysML introduces two new diagram types and modifies three others while retaining some of the UML 2.0 diagrams.

New diagrams: | Requirement and Parametric diagrams
Modified UML diagrams: | Activity, Block Definition and Internal Block diagrams
Unchanged UML diagrams: | Sequence Diagrams, State Machine Diagrams, Use Case Diagram, and Package Diagram

SysML diagrams are split into two groups:

· Structure diagrams
· Behavior diagrams

SysML diagrams are available through the New Diagram | SysML diagrams context menu option in the Model Tree tab.

To insert a SysML diagram:

1. Right click a package in the Model Tree tab.
2. Select the SysML diagram you want to insert, e.g. New Diagram | SysML diagram | SysML Activity Diagram.

Please note:

SysML diagrams are created in their own SysML package, when you try to add them to the root package.


Structure diagrams

The Structure diagrams available in SysML are:

· Block Definition diagram
· Internal Block Definition diagram
· Parametric diagram
· Package diagram

The Block Definition and Internal Block definition diagrams are modified UML 2.0 diagrams while the Parametric diagram is new. The Package diagram follows the UML 2.0 standard.

Blocks are used to describe the structure of an element or system, and can have multiple compartments that define its characteristics. Note that behaviors can be assigned to a block.

Block Definition Diagrams

describe the relationship between blocks: associations, generalizations, dependencies.

Internal Block Diagrams

describes the internal structure of a block in terms of properties and connectors between properties, i.e. the relationship of its constituent parts; using ports, connectors, and flows.

Parametric diagrams

use constraint blocks, defined in a Block Definition Diagram, to constrain the properties of other blocks in the Parametric diagram and integrate engineering analysis with design modeling.

Package diagrams

organize model elements into packageable elements and define dependencies between the packages and/or model elements within the package.


Block Definition diagram

Block Definition Diagrams are based on the UML class diagram with restrictions and extensions as defined by SysML.

The Block Definition Diagram describes the relationship between various blocks, their associations, generalizations, as well as dependencies. This can lead to the modelling of a system hierarchy, or classification tree.

Blocks have several structures called "property"

· Part property
· Reference property
· Value property

To add a property to a block:

1. Right click an existing block and select New | Property (or PartProperty, ReferenceProperty, ValueProperty etc.).

Note: depending on what you insert, a new compartment is added to the Block, e.g. parts for a PartProperty, or values for a ValueProperty.

To show block properties as nodes:

1. Right click the Block and select Show | Show properties as nodes on node.

This shows the various Block properties, ports etc. as 'objects' in a compartment.


Internal Block diagram

Internal Block Diagrams are based on the UML Composite Structure Diagram with restrictions and extensions as defined by SysML.

The Internal Block Diagram describes the internal structure of a block in terms of properties and connectors between properties, i.e. the relationship of its constituent parts, using ports, connectors, and flows.

To add intial values to a Property:

1. Right click the Property and select New | Initial Values.
2. Double click the placeholder and enter the values e.g. speed = 700KB/s

To insert a FlowPort:

Making sure that the type of the property is set to a block or classifier:

1. Click the FlowPort icon ic-flow-port in the icon bar, then click the border of Property that you want to add the port to.

The FlowPort is now placed on the border of the Property.

2. Enter the name of the FlowPort in the name field of the Properties tab if necessary.
3. Select the port's type from the type list box e.g. Card.

While the port icon is still selected:

4. Scroll down the Properties tab and notice that additional FlowPort parameters are available.

To create a atomic conjugated flow port:

1. Create a FlowSpecification (interface) in a Block Definition Diagram.

2. Click the Flow port you want to define in the Internal Block Diagram (or BDD).

3. Set the Flow port "type" to a FlowSpecification in the Properties tab.

4. Set 'isConjugated' to true.

This type of port is shown with a dark background.

To change the FlowPort direction:

1. Click the existing FlowPort entry and select the in, out, or inout, from the direction combo box.

To join two ports:

1. Click the Connector icon ic-comp-conn in the icon bar.
2. Drag and drop from the first to the second port.
3. Drop the connector on the port, when the port object is highlighted in the diagram.

To create Item flows:

Item flows can be created between block associations, or on other connectors between parts of SysML diagrams.

1. Right click an existing connector and select New | Item flow (L to R, or R to L).

An arrowhead has been added to the connector displaying the direction of the item flow.


Parametric diagram

The Parametric diagram is a new diagram type specific to SysML that integrates engineering analysis with design modeling. A parametric diagram is similar to an internal block diagram with the exception that only those type of connectors may be shown, which are connected to constraint parameters on at least one of their ends.

The Parametric diagram makes use of constraint blocks, defined in a Block Definition Diagram, to constrain the properties of other blocks in the Parametric diagram. Constraint blocks are shown with rounded corners rather than being square as an ordinary part.

Parametric Diagram Wt

Block Definition Diagram - definition of constraints

The «constraint» keyword on a block definition states that the block is a constraint block. Parameters of the constraint are shown in a "parameters" compartment.


Package diagram

The package diagram is used to organize model elements into packageable elements and define dependencies between the packages and/or model elements within the package. The package defines a namespace for the packagable elements.

The model can be organized in multiple ways where each viewpoint shows a single aspect of the model e.g.:

· system hierarchy (by level)
· by diagram type (by domain)
· by viewpoints (IPT - integrated product team)

Viewpoints allow you to view the model in a different way, e.g. in an analysis view which shows multiple hierarchy levels, e.g. Enterprise, System, Logical design etc.


Requirement diagram

The requirement diagram is a new diagram type designed specifically for SysML and is used to integrate the behavior and structure models of SysML with engineering analysis models, e.g. performance, reliability models etc.

It is a modeling construct for text-based requirements, and the relationship between requirements and other model elements that satisfy or verify them.


Behavior diagrams

The Behavior diagrams available in SysML are:

· Activity diagram
· Sequence diagram
· State Machine diagram
· Use Case diagram

The Activity diagram is modified from UML 2.0 and is the one discussed in greater detail the following section, while the rest follow the UML 2.0 standard.


Activity diagram

The SysML Activity diagram is modified from UML 2.0. Please follow the links below to find out about the Activity diagram and how to create Activity diagrams using the various modeling elements.

· For a general introduction to Activity diagrams, see: Activity Diagram

· To insert Activity diagram elements, see Inserting Activity Diagram elements

· To create branches and merges, see Creating branches and merges

· To find an explanation with examples of Activity diagram elements, see Activity Diagram elements

In UML all behaviors, Activities included, are classes and Activity instances are the actual execution of the activity. Creating an activity instance, starts the execution, while destroying the instance terminates it.

SysML extensions to Activities diagrams:

· Support for continuous flow modeling using the continuous stereotype (streaming activities)
· Alignment of Activities using the Enhanced Functional Flow Block diagram (EFFBD) (which is basically an Activity diagram, with Allocate Partitions)

In SysML, Activities can appear in Block Definition diagrams as regular blocks with the <<Activity>> keyword/stereotype.

SysML Activity diagram:

Activity diagram without swimlanes

Activity diagram with swimlanes


Sequence diagram

The SysML Sequence diagram follows the UML 2.0 specification; for information on how to create Sequence diagrams use the following links:

· For general introduction to Sequence diagrams, see Sequence Diagram

· To insert the various Sequence diagram elements: Lifelines, Combined fragments etc., see Inserting sequence diagram elements

· To generate Sequence diagrams from source code, see Generating Sequence Diagrams from source code

SysML Sequence diagram:


State Machine diagram

The SysML State Machine diagram follows the UML 2.0 specification; for information on how to create State Machine diagrams use the following links:

· For a general introduction to State Machine diagrams, see State Machine Diagram

· To insert the various Sequence diagram elements, see Creating states, activities and transitions

· To create Composite States, see Composite states

· To find an explanation with examples of State Machine diagram elements, see State Machine Diagram elements

SysML State Machine diagram:


Use Case diagram

The SysML Use Case diagram follows the UML 2.0 specification; for information on how to create Use Case diagrams use the following links:

· To insert Use Case diagram elements, see the Use Cases section in the tutorial

SysML Use Case diagram


Database diagrams - Importing SQL databases

UModel is able to import/export SQL databases, and display the database structure as database modeling elements in a UML Database Diagram.

The following database elements can be imported to the database model:

Tables

Check Constraints

Primary / Foreign / Unique keys

Indices

Views

Triggers

Stored procedures

Functions

Please note:

Views, Triggers, Stored procedures and Functions can only be imported, though not added, in UModel.

Once the modeling process has been completed, the changed database model structure can be exported to the database using the "Merge Program Code from UModel project" menu item. This creates a database change script file which can be executed, or saved, for later execution.


Importing SQL databases into UModel

Currently supported databases (and connection types) are:

· Microsoft Access versions 2003 / 2007
· Microsoft SQL Server versions 2000, 2005 and 2008
· Oracle version version 9i, 10g, and 11g
· MySQL 4.x and 5.x
· PostgreSQL 8.0, 8.1, 8.2, 8.3
· Sybase 12
· IBM DB2 version 8.x and 9
· IBM DB2 for i 5.4
· IBM DB2 for i 6.1

Please note:

UModel fully supports the databases listed above. While Altova endeavors to support other ODBC/ADO databases, successful connection and data processing have only been tested with the listed databases.

When installing the 64-bit version of UModel, please make sure that you have access to the 64-bit database drivers needed for the specific database you are connecting to.

Note:

For an ADO connection to MS SQL Server via the driver SQL Server Native Client 10.0 the following property values must be set in the All tab of the Data Link Properties dialog: (i) Set the property value of Integrated Security to a space character; (ii) Set the property value of Persist Security Info to true.

To import an SQL database into UModel:

1. Select Project | Import SQL database.
2. Click the New... button if this is the first time you are importing a database into UModel.

(If you have previously imported a database click the Data Source combo box and select the datasource.)

3. Use the Connection wizard to select the database and the specific tables that you want to insert into UModel.

In this example we are going to insert an MS Access database supplied with UModel called Altova.mdb. Note that any of the databases listed in the Connection Wizard can be imported into UModel.

4. Click Connect to connect to the database, and enter a Data Source Name in the prompt that follows e.g. Altova.
5. The following dialog box allows you to select the specific tables that you want to import.
6. Click the User Tables entry to select all non-system tables, then click Next to continue.

The following dialog box allows you to define the database diagram settings; the default settings are shown.

7. Click Next again, to define the Package Dependency Diagram settings.

8. Click finish to insert the database into UModel.

The database has now been imported into two packages. Note that the Database Profile package has also been automatically imported.

9. Expand the altova package until you see the Content of altova diagram icon.

10. Double click the Content of altova icon to see the database modeling elements.


JDBC connections

This section describes how to connect to a DB via JDBC. The steps listed below describe a connection to an IBM DB2 database, but they apply also to other types of databases that can be connected to via JDBC.

Pre-connection steps

Before connecting to the DB via JDBC, you must do the following:

1. Ensure that the Java Runtime Environment (JRE) is installed. If it isn't installed, then install it. Use a 32-bit JRE for a 32-bit machine or a 64-bit JRE for a 64-bit machine.
2. Install a JDBC driver. No special installation setup is required. All you need to do is copy the driver to a local directory, for example, c:\jdbc. Note that JDBC drivers (which are Jar files) are platform-independent, and the drivers will work on 32 and 64 bit operating systems.
3. Set up the CLASSPATH to include the location where the JDBC driver is located. (The application reads the CLASSPATH environment variable to locate the JDBC driver.) To access and edit the CLASSPATH, do the following: Click Start | Control Panel | System | Advanced | Environment Variables. In the Environment Variables dialog that appears, select either the CLASSPATH user environment variable or the CLASSPATH system environment variable and click the Edit button. Add the path to the JDBC driver to the CLASSPATH. For example: CLASSPATH=C:\jdbc\sqljdbc.jar; C:\jdbc\db2jcc.jar;.
4. Log off and then log on again to make the CLASSPATH changes active.

Note: Installing the complete IBM DB2 or Oracle client will automatically populate the CLASSPATH with the JDBC drivers of the respective packages. For more details, see the summaries below.

Connecting via JDBC

To connect using a JDBC connection, select Insert | Database:

1. In the Select a Database dialog box, select JDBC Connections. The JDBC Connections pane (screenshot below) appears.

2. Select a JDBC driver from the Driver dropdown list (all detected drivers, i.e. those in the CLASSPATH environment variable, are listed). Edit the Database URL string and enter a user name and password as required. Given below is the connection string syntax for commonly used databases, each with an example.

Oracle | jdbc:oracle:thin:[user/password]@//[host][:port]/SID
 | jdbc:oracle:thin:@//abcd234/ORA11
IBM DB2 | jdbc:db2://host_name:port/dbname
 | jdbc:db2://MyDB2:50000/boz
MySQL | jdbc:mysql://host_name:port/dbname
 | jdbc:mysql://MyDB2:3306/moz
MSSQL | jdbc:sqlserver://host:port;databasename=name;user=name;password=Pwd
 | jdbc:sqlserver://abcd38:1433;databasename=coz
 | jdbc:sqlserver://Q5;DatabaseName=coz;SelectMethod=Cursor
PostgreSQL | jdbc:postgresql://host:port/database
 | jdbc:postgresql://abc993:5432/qanoz
Sybase | jdbc:sybase:Tds:host:port/dbname
 | jdbc:sybase:Tds:abc12:2048/QUE

3. Click Connect to make the connection. The connection is made and a dialog appears in which you select the required DB information.

Step-by-step: MSSQL, MySQL, PostGre, and other non-XML DBs

Given below is a step-by-step guide for connecting to a non-XML DB via JDBC:

1. JDBC JAR files (driver files): Copy the files to any local location. Then add the full path and filename to the Windows CLASSPATH variable. For example: C:\jdbc\sqljdbc.jar; C:\jdbc\db2jcc.jar;.
2. Log off and log on to make the CLASSPATH changes active.
3. Start UModel and access the Select a Database dialog box.
4. The JDBC Connections pane lists, in the Driver dropdown box, the detected JDBC drivers. If the dropdown box is empty, make sure that the file altovadb.jar is present in the folder: C:\Program Files\Altova\Common2013\jar.
5. Connect to a database as described in the section Connecting via JDBC above.

Step-by-step: Oracle

Given below is a step-by-step guide for connecting to an Oracle DB via JDBC. If you don't need the XML and XDB features of the Oracle DB, follow the instructions in the step-by-step guide for non-XML DBs. The installation folder of the Oracle client is indicated in the steps below by the placeholder: %ORACLE_HOME%.

1. Install Oracle client software with OCI and ODBC features enabled. If an Oracle client is already installed check if the two jar files below are present:

%ORACLE_HOME%\LIB\xmlparserv2.jar
%ORACLE_HOME%\RDBMS\jlib\xdb.jar

2. Add the following files to the Windows CLASSPATH environment variable:

%ORACLE_HOME%\jdbc\lib\ojdbc6.jar

%ORACLE_HOME%\LIB\xmlparserv2.jar

%ORACLE_HOME%\RDBMS\jlib\xdb.jar

3. Log off and log on to make the CLASSPATH changes active.
4. Start UModel and access the Select a Database dialog box.
5. The JDBC Connections pane lists, in the Driver dropdown box, the detected JDBC drivers. If the dropdown box is empty, make sure that the file altovadb.jar is present in the folder: C:\Program Files\Altova\Common2013\jar.
6. Connect to a database as described in the section Connecting via JDBC above.

Step-by-step: IBM DB2

Given below is a step-by-step guide for connecting to an IBM DB2 database via JDBC.

1. If an IBM DB2 client has already been installed, nothing needs to be done since the CLASSPATH will have been set by the installation process.
2. If no IBM DB2 client has been installed, add the IBM DB2 JDBC driver jar files db2jcc.jar and db2jcc_license_cu.jar to the Windows CLASSPATH. Log off and log on to make the CLASSPATH changes active.
3. Start UModel and access the Select a Database dialog.
4. The JDBC Connections pane lists, in the Driver dropdown box, the detected JDBC drivers. If the dropdown box is empty, make sure that the file altovadb.jar is present in the folder: C:\Program Files\Altova\Common2013\jar.
5. Connect to a database as described in the section Connecting via JDBC above.

Note: When databases are connected to via JDBC, due to insufficient information returned by the drivers: (i) data editing is not possible for tables without a primary key; (ii) Execute for data-editing in SQL Editor will not work.

If you connect using JDBC and use a SELECT statement with the Add/Remove Table command to retrieve data, then the SELECT statement must have no final/terminating semicolon.


Viewing database modeling elements

· Tables in the UML data profile are shown as classes with the <<Table>> stereotype.

· Columns are shown as properties/attributes of the Table class.

· Behaviour i.e. operations, are shown as stereotyped classes. E.g. <<index>>, <<Check constraints>>, etc.

· Relationships are shown as associations between tables.

To view the various table properties, using e.g. database altova.mdb:

1. Click the top left expand button of the Altova table.

This opens the properties compartment of the Altova Table class and displays the PrimaryKey and Name columns.

ForeignKey classes

1. Click the top expand button of the Address Table.

The first two fields/columns are the Primary and Foreign key entries. The rest are the Address fields.

The OfficeAddress <<ForeignKey>> class defines the primary/foreign key relationships between tables.

· The ForeignKey:Address entry stipulates that there is a column, named "ForeignKey", in the owner Table "Address", which references a foreign column.
· The PrimaryKey:Office entry stipulates that the column "PrimaryKey" in the table "Office", is referenced as a foreign key by the abovementioned column, (Address) ForeignKey.

Note that an association arrow, labeled PrimaryKey, exists between the Address and Office Tables to show the relationship.

When adding ForeignKey classes make sure that:

- The first entry/column refers to the owner table, Address in this case

- the second entry/column refers to the foreign table, Office in this case

Index classes

The Index classes show the currently defined indexes for each table. The Address table has two indexes: ForeignKey and OfficeAddress.

· Index ForeignKey is the foreign key of the Address table and has an ascending sort.
· Index OfficeAddress is the foreign key of the OfficeAddress class and also has an ascending sort.

Note:

Multiple primary/foreign keys can be defined per ForeignKeys class. Multiple Indexes can also be defined per table, you are not restricted to the two shown in the examples above.

Syntax checks:

Syntax checks are automatically performed when adding structural information, and a Syntax Error popup automatically appears when necessary.

To perform a syntax check on your whole project, select Project | Check Project Syntax.

A complete rundown of all project-related errors and warnings is presented in the Messages window.


Adding columns to a table

Database modeling elements can be added in UModel and then synchronized with a database(s). E.g. we want to add a postcode field to the Address table.

To add a new column/field to a table:

1. Right click the Address table and select New | Column.

2. Replace the "Column1" text with the name of the field i.e. postcode, enter a colon and select the datatype e.g. text.

3. Click between the guillemets (angle brackets), enter "n" and select nullable from the auto completion popup.

4. Enter a square bracket "[" and select the text length that the text field should have e.g. 255, and hit Enter.

To synchronize the updated model with the database (i.e. code):

1. Select the menu option Project | Merge Program code from UModel project.

2. If the default synchronization settings shown in the dialog box are fine, click OK to continue.

A Database Change Script dialog box is opened. It shows the SQL change script commands needed to update the database.

3. To execute the code immediately, click the Execute button.

A prompt appears with specific details of the database update execution process.

Please look in the Messages window for syntax check and update code information.

Please note:

Please make sure that you execute the change script to keep the model and database in sync! The next synchronization process will proceed as if the change script has been executed.

Starting the database will show you that the postcode column has been added to the database.

To delete a column:

The method described above can also be used to delete a column of a database.

· Select the operation/column you want to delete, and delete it from the table.
· Synchronize the model with the database.
· The change script generates a DROP COLUMN command.

Please note:

Executing this command on an existing database will, of course, delete the column and all the data it contains.


Adding a new table to model / database

To add a new table to the model/database:

1. Right click in the database diagram and select the New | Table, and enter Car as the table name.
2. Press the F7 function key, then press the left arrow key of the keyboard to set the cursor at the far left.
3. Place the cursor between the angle brackets and enter <<nullable, unique>>. The autocompletion popup helps you select the entries, press Enter to select one.
4. Move the cursor to Property1 and overwrite it with PrimaryKey:int then hit Enter.

5. Press F7 and use the same method to enter <<FK, nullable>>ForeignKey:int. This ends the key definition for the table.
6. Press F7 and enter the LicensePlate and EngineNo columns/fields as shown below. When entering the text length by pressing the square open bracket"[" key, note that the closing bracket is automatically supplied. Press Enter after entering the length number, 255.

Adding ForeignKey and Index classes:

1. Right click the Car table and select New | ForeignKey and enter the key name DepartementCar.

2, Double click the top entry/property (PrimaryKey:Car) of the class and change it to ForeignKey:Car.

3. Delete the second entry (foreignColumn) below it.
4. Right click the Car table and select New | Index, enter the index name CarForeignKey.
5. Double click the (automatically inserted) IndexedColumn entry, and change it to ForeignKey.
6. Place the cursor between the angle brackets and select <<ascending>> from the autocompletion popup.

7. Select Project | Check Project Syntax to see if all database rules have been adhered to.

The error message refers to the fact that only one operation/column has been created in the DepartmentCar class, while at least two are needed. The next section will add the missing operation/column.

To create relationships between tables:

1. Click the Database Relationship Association icon ic-db-assoc in the icon bar.
2. Click the DepartmentCar class in the Car table and drop the line on the Department table.

This creates an association between the two tables.

3. With the association selected, click in the A:name field of the Properties tab, and enter PrimaryKey.
4. Click the A:memberEndKind combo box and select memberEnd.

Note that this adds a new property, PrimaryKey:Department to the DeparmentCar ForeignKey class.

5. Selecting Project | Check Project Syntax, shows that only one warning remains.

To synchronize the model with the database:

1. Select the menu option Project | Merge Program code from UModel project.

This opens the Synchronization settings dialog box.

2. Click OK if the settings are correct.

Database Change Script code is generated and is displayed in a dialog box. Note that the change script cannot be edited here. Each tab in this dialog box represents a database.

3. Click the Execute All and Close button.

A message box appears displaying any errors or warnings, click OK to continue.

More detailed information on the update process is supplied in the Messages window.

Opening the Altova database shows that the new Car table, and all of its columns, have been added to the database.

The relationship structure can be seen in the Relationships window.


XMI - XML Metadata Interchange

Altova web site: AltovaWebLink Exchanging UModel projects using XMI

UModel supports the export and import of XMI 2.4 for UML 2.0 / 2.1 / 2.1.1 and 2.1.2, 2.2, 2.3, 2.4. Do not use the Export to XMI function to archive your UModel projects, please archive the *.ump project files instead.

Select the menu item File | Export to XMI File to generate an XMI file from the UModel project, and File | Import from XMI File, to import a previously generated XMI file.

The XMI Export dialog box allows you to select the specific XMI format you want to output, XMI for UML 2.0/2.1.1. During the export process included files, even those defined as "include by reference" are also exported.

Please note:

If you intend to reimport generated XMI code into UModel, please make sure that you activate the "Export UModel Extensions" check box.

Pretty-print XMI output

This option outputs the XMI file with XML appropriate tag indentation and carriage returns/line feeds.

Export UUIDs

XMI defines three versions of element identification: IDs, UUIDs and labels.

· IDs are unique within the XMI document, and are supported by most UML tools. UModel exports these type of IDs by default, i.e. none of the check boxes need activated.

· UUID are Universally Unique Identifiers, and provide a mechanism to assign each element a global unique identification, GUID. These IDs are globally unique, i.e. they are not restricted to the specific XMI document. UUIDs are generated by selecting the "Export UUIDs" checkbox.

· UUIDs are stored in the standard canonical UUID/GUID format (e.g "6B29FC40-CA47-1067-B31D-00DD010662DA", "550e8400-e29b-41d4-a716-446655440000",...)

· Labels are not supported by UModel.

Please note:

The XMI import process automatically supports both types of IDs.

Export UModel Extensions

XMI defines an "extension mechanism" which allows each application to export its tool-specific extensions to the UML specification. Other UML tools will, however, only be able to import the standard UML data (ignoring the UModel extensions). This UModel extension data will be available when importing into UModel.

Data such as the file names of classes, or element colors, are not part of the UML specification and thus have to be deleted in XMI, or be saved in "Extensions". If they have been exported as extensions and re-imported, all file names and colors will be imported as defined. If extensions are not used for the export process, then these UModel-specific data will be lost.

When importing an XMI document, the format is automatically detected and the model generated.

Export diagrams

Exports UModel diagrams as "Extensions" in the XMI file. The option "Export UModel Extensions" must be active to be able to save the diagrams as extensions.


Teamwork support for UModel projects

UModel projects can be split up into multiple subprojects allowing several developers to simultaneously edit different parts of a single project. Each individual subproject can be added to a source control system.

The top-level project i.e. the project from which the subprojects can be included, is called the main project. Subprojects are created on the package level as individual UModel project files and have a *.ump extension.

Subprojects can be created/included in two different ways:

· As editable from within the main project, and at the subproject level
· As read-only from within the main project, i.e. only editable at the subproject level.

Subprojects can be structured in any way that you wish, in a flat or hierarchical structure, or a combination of both. This makes it theoretically possible to split off every package of a main project, into read-only/editable subproject files.

During the code-engineering process all subordinate components of a subproject are considered, there is no difference between a single project file or one that consists of multiple editable subprojects.

This also applies to UML diagrams, they can also be edited at the main, or subproject, level.


Creating and editing subproject files

The example discussed here shows how the Bank_MultiLanguage.ump project was split up into multiple subprojects.

Please note:

UModel allows you to share packages and UML diagrams they might contain, between different projects. Packages can be included in other projects by reference, or as a copy. Please see Sharing Packages and Diagrams for more information.

To create a subproject file

Subproject files can be split off a main, or subproject, file at any time.

1. Right click a package(s) e.g. Banking access and select Subproject | Create new Subproject.

2. Click the Browse button and select the subdirectory \Bank_MultiLanguage_Java.

3. Select "Editable" to be able to edit the subproject from the main project. (Selecting Read-only makes it uneditable in the main project.) Then click OK.

The name of the subproject file is shown in square brackets next to the package name and the file Banking access.ump file is placed in the UModelExamples\Bank_MultiLanguage_Java folder.

The same method is used to create a subproject of the BankView folder. The BankView.ump file is placed in the ...\UModelExamples\Bank_MultiLanguage_Java\ folder.

Please note:

The file path of the subproject can be changed at any time by right clicking the subproject and selecting Subproject | Edit File Path.

Opening and editing subproject files

Having created a subproject file, the resulting *.ump file can then be opened, and edited, as a "main" UModel project file. For this to be successful there should not be any unresolved references to other elements. UModel automatically performs checks when creating a subproject from the "main" project, and whenever a file is saved.

1. Right click the subproject package (e.g. Bank Server.ump) in the main project and select Project | Open as Project.

This starts another instance of UModel and opens the subproject as a "main" project. Any unresolved references are shown in the Messages window.

Reusing subprojects

Subprojects that have been split off from a main project can be used in any other main project(s).

1. Right click a project and select Project | Inlcude Subproject.
2. Click the Browse button and select the *.ump file that you want to include, e.g. Banking access.ump.

3. Choose how the file is to be included; by reference tor as copy.

Saving projects

When saving the main project file, all editable subproject files are also saved. I.e. all data contained in the shared packages of the subproject files are saved.

You should therefore not create/add data (components) outside of the shared/subproject structure, if the subproject is defined as "editable" in a main project file. If data exists outside of the subproject structure, a warning message will be displayed in the Messages window.

Saving subproject files

When saving subprojects (from the main project level) all references to sibling, as well as child subprojects, are considered and saved. E.g. if two sibling subprojects, sub1 and sub2, exist and sub1 uses elements from sub2, then sub1 is saved in such a way that it automatically saves references to sub2 as well.

If sub1 was opened as a "main" project, then it is considered as a self contained project and can be edited without any reference to the actual main project.

Reintegrating subprojects into the main project

Previously defined subprojects can be copied back into the main project again. If the subproject does not contain any diagrams then the reintegration will be immediate. If diagrams exist a dialog box will open.

1. Right click the subproject and select Subproject | Include as Copy.

This opens the "Include Subproject" dialog box, which allows you to define the diagrams styles you want to use when including the subproject.

2. Select the style option that you want to use, then click OK to include the project again.


UModel Plugin for MS Visual Studio

UModel can now be integrated into the Microsoft Visual Studio IDE version 2005, 2008 or 2010. This unifies the best of both worlds, integrating advanced modeling capabilities with the advanced development environment of Visual Studio. To do this, you need to do the following:

· Install Microsoft Visual Studio 2005, 2008, or 2010.

· Install UModel Enterprise Edition.

· Download and run the UModel Enterprise Edition Integration Module for Microsoft Visual Studio. This package is available on the UModel download page at www.altova.com.

How to enable the plug-in

It is possible that the plug-in was not automatically enabled during the installation process.

To enable the plug-in:

1. Navigate to the directory Visual Studio IDE executable was installed in, e.g. c:\Program Files\Microsoft Visual Studio 8\Common7\IDE
2. Enter the following command on the command-line devenv.exe /setup.
3. Wait for the process to terminate normally before starting to use the application within Visual Studio.

Version control systems:

The Visual Studio version of UModel now supports the version control functions, and menu items, available in the Visual Studio IDE.


Opening UModel files in MS Visual Studio

To open a UModel file in Visual Studio:

1. Select the menu option File | Open | Project/Solution.
2. Select the Bank_CSharp.ump file from the ...\UmodelExamples folder.
3. Double click the BankView Main diagram icon in the Model Tree to see the Class diagram.

Please note:

You may have to reposition several of the windows to have them appear as shown in the screenshot above. The window layout follows that of the standalone version of UModel.

Synchronizing program and model code

1. Click the menu item Project | UModel Project.

You will notice that the menu contains two new items which are automatically set as active, Automatically synchronize Program Code... and Automatically synchronize UModel Project...

What this enables is the automatic updating of model and code, as soon as changes are made to one or the other. Disabling these options requires you to generate code manually using the "Merge UModel Program Code from UModel project..." option shown in the screenshot above.


Differences between Visual Studio and standalone versions

Prerequisites:

The source code files you intend to use/synchronize with UModel, must be part of the same solution as the UModel model.

Currently only one UModel project file, *.ump, should be present in a solution. All C# or VB code projects that are part of the solution, are automatically available for synchronization.

The menu items Project | Import Source Directory and Project | Import Source Project do not have the option to select "C#" or "VB.NET" in the Language combo box of each "Import source..." dialog box. C# and VB.NET code are automatically added when you add a C# or VB.NET project to your Visual Studio solution.

The Visual Studio version of UModel, now supports the native version control functions, and menu items, available in the Visual Studio IDE. The version control commands relating to source code files are available through the specific built-in support, and not through UModel specific menus.

E.g. Right clicking a UModel project in the Solution Explorer window, displays the version control options in the context menu.

UModel projects can be split up into multiple subprojects allowing several developers to simultaneously edit different parts of a single project. Each individual subproject can be added to a source control system. Subprojects are shown in their own SubProjects folder in the Visual Studio Solution Explorer.

Please see Teamwork support for UModel projects for more information on the Teamwork capabilities.

Source control systems support for 3-way project merging

When checking in/out project files, UModel automatically generates "Common ancestor" files which are then used for the 3-way merge process. This enables a much finer merge result than the normal 2-way merge. Note that snapshot files, used for a 3-way merge in the standalone UModel version, cannot be created automatically in Visual Studio!

To check out a subproject file:

1. Select File | Source control | Check out for Edit.

2. Select the file you want to check out and click the Check Out button.

New menu items (UModel / context menu)

· Jump to UML Model / Jump to Code (Visual Basic and C#).
· Reverse engineer current file (Visual Basic and C#).
· Generate Sequence Diagram...

Both these menu items are available in the context menu of the respective code or model windows.

Unsupported features in Visual Studio

· The Scripting environment (Tools | Scripting Editor...) is currently not supported.
· Menu option Tools | Restore Toolbars and Windows is not supported.

Enabling / disabling various UModel windows (entry helpers):

· Select the menu item View | UModel and click the respective check box.

Code-engineering

The merging/updating of a single class is not available in the Model Tree of Visual Studio. Automatic or manual synchronization updates all changes immediately.

If code is not parseable then a red UModel status icon appears in the status bar, showing the code and model are currently not synchronized. It also appears if the last reverse engineering / forward engineering process encountered an error. The same is true if the syntax check throws an error in UModel. Clicking a parsing error in the Messages window opens the corresponding source code file, with the cursor positioned on the line containing the error.

A progress bar in the status bar shows that model/code are currently being synchronized.

Wherever changes are made to code in the Visual Studio environment, class details viewer etc., the code is always reparsed and the model is updated.

Synchronization notes for the Visual Studio edition of UModel:

Due to Visual Studio limitations some C# and Visual Basic code modifications in Visual Studio do not trigger an internal Visual Studio event and are thus not automatically updated in UModel.

This means that making these changes in Visual Studio code does not update the UML model immediately, you have to force a synchronization manually, or make a different modification which triggers a source file update.

Manual synchronization is necessary when adding/changing:

· Default values for attributes
· Default values for operation parameters
· TemplateParameters
· TemplateBindings
· Summary section for all elements
· Remark section for all elements
· all changes in method bodies

To force a manual synchronization:

Having made any of the above changes to your code:

1. Right click in the source code file and force an update of the file by selecting "Reverse engineer current file".

Please note:

Changing any of the above-mentioned modeling elements in UModel, automatically updates the source code, there are no automatic synchronization limitations from model to code.

Java limitations:

If your UModel project contains the language profile for Java, then automatic synchronization is automatically disabled for that project; a message box informs you of this when opening such a project. Synchronization has to be started manually for such projects.


Minimalist project in Visual Studio

This section describes the quickest way to create a UModel project in Visual Studio .NET and generate code.

There are basically only few things to do:

· Create a new Visual Studio project.
· Add a UModel project to the Visual Studio project.
· Start the code engineering process and generate code.

Creating a Visual Studio project

1. Select the menu option File | New Project.
2. Select Visual C# in the Project types group, then select Windows Application in the Templates group. Click OK when you have completed filling out the other fields in the dialog box.

A new solution, WindowsApplication1, is created in the Solution Explorer window.

Adding a UModel project to the Visual Studio project

1. Right click the newly created solution project name in the Solution window, and select Add | New Project | UModel project, then click OK to confirm.

You are prompted if you want new UML diagrams to be created automatically for the WindowsApplication1 project.

2. Click Yes to confirm.
3. Select the Content diagram options from the dialog box, click Next if you want to create Package dependency diagrams, or click Finish if not.

A message box appears informing you that code synchronization of the project has started. The UModel project has now been added to the solution and you can start the code-engineering process.

Note that the class diagram "Content of WindowsApplication" is part of the UModel project.

Code engineering and code generation

To create a Component and define the code directory:

1. Right click the Component View package in the Model Tree and select New Diagram | Component Diagram.
2. Drag the previously created class, myClass, from the Model Tree into the into the Component diagram.
3. Right click in the diagram and select New | Component e.g. myComponent.
4. Click the component in the diagram to select it, then click in the directory field of the Properties window and enter the directory you want the code to be placed in e.g. C:\mycode.

Realizing the class

1. Click MyClass and drag the "ComponentRealization" handle at the bottom of the element and drop it on the new component, MyComponent.

A class has to be "realized" before code can be generated. Note that you could also drag the class and drop it on the component directly in the Model Tree.

Syntax check and code generation

1. Select Project | UModel Project | Check Project Syntax to check to see if everything is OK.
2. Select Project | UModel Project | Merge Project code from UModel Project... to output/generate the C# code.

Double click the "Content of WindowsApplication" Diagram icon below Class Diagrams (in the Solution window) that has automatically been created.


UModel plug-in for Eclipse

Eclipse is an open source framework that integrates different types of applications delivered in form of plugins. UModel for the Eclipse Platform, is an Eclipse Plug-in that allows you to access the functionality of a previously installed UModel Edition from within the Eclipse 3.6 / 3.7 / 4.2 Platform.

The UModel Plug-in for Eclipse supplies the following functionality:

· A fully-featured modeling tool that supports automatic synchronization between model and code for Java.
· Code generation in Java, C# and Visual Basic.
· UModel user help under the menu item Help | UModel | Table of Contents.

Version control systems:

The Eclipse versions of UModel now support the version control functions, and menu items, available in the Eclipse IDE.


Installing the UModel Plugin for Eclipse

Before installing the UModel Plugin for Eclipse, ensure that the following are already installed:

· UModel (Enterprise or Professional Edition).
· Java SE Runtime Environment 5.0 (JRE 5.0) or higher, which is required for Eclipse. See the Eclipse website for more information. Install a 32-bit or 64-bit JRE to match your version of <%STYLEVISION%> (32-bit or 64-bit).
· Eclipse Platform 3.6 / 3.7 / 4.2. Install a 32-bit or 64-bit Eclipse to match your version of UModel (32-bit or 64-bit).

After these have been installed, you can install the UModel Plugin for Eclipse, which is contained in the UModel Integration Package (see below).

Note on JRE

If, on opening a document in Eclipse, you receive the following error message:

java.lang.UnsupportedClassVersionError: com/altova/....

(Unsupported major.minor version 49.0)

it indicates that Eclipse is using an older JRE that is on your machine. Since Eclipse uses the PATH environment variable to find a javaw.exe, the problem can be solved by fixing the PATH environment variable so that a newer version is found first. Alternatively, start Eclipse with the command line parameter -vm, supplying the path to a javaw.exe of version 5.0 or higher.

UModel Integration Package

The UModel Plugin for Eclipse is contained in the UModel Integration Package and is installed during the installation of the UModel Integration Package. Install as follows:

1. Ensure that UModel (Enterprise or Professional Edition), JRE, and Eclipse are already installed (see above).
2. From the Components Download page of the Altova website, download and install the UModel Integration Package. There are two important steps during the installation; these are described in Steps 3 and 4 below.
3. During installation of the UModel Integration Package, a dialog will appear asking whether you wish to install the UModel Plugin for Eclipse (see screenshot below). Check the option and then click Next.

4. In the next dialog ((Eclipse) Installation Location, screenshot below), you can choose whether the Install Wizard should integrate the UModel Plugin into Eclipse during the installation (the Automatically option) or whether you will integrate the UModel Plugin into Eclipse (via the Eclipse GUI) at a later time.

We recommend that you let the Installation Wizard do the integration. Do this by checking the Automatically option and then browsing for the folder in which the Eclipse executable (eclipse.exe) is located. Click Next when done. If you choose to manually integrate UModel Plugin for Eclipse in Eclipse, select the Manually option (screenshot below). See the section below for instructions about how to manually integrate from within Eclipse.

5. Complete the installation. If you set up automatic integration, the UModel Plugin for Eclipse will be integrated in Eclipse and will be available when you start Eclipse the next time.

Manually integrating the UModel plugin in Eclipse

To manually integrate the UModel Plugin for Eclipse, do the following:

1. In Eclipse, click the menu command Help | Install New Software.
2. In the Install dialog that pops up (screenshot below), click the Add button.

3. In the Add Repository dialog that pops up (screenshot below), click the Local button.
4. Browse for the folder c:\Program Files\Altova\Common2013\eclipse\UpdateSite, and select it. Provide a name for the site (such as 'Altova'), and click OK.

5. Repeat Steps 2 to 4, this time selecting the folder c:\Program Files\Altova\UModel2013\eclipse\UpdateSite, and providing a name such as 'Altova UModel'.
6. In the Work With combo box of the Install dialog, select the option -- All Available Sites -- (see screenshot below). This causes all available plugins to be displayed in the pane below. Check the top-level check box of the Altova category folder (see screenshot below). Then click the Next button.

7. An Install Details screen allows you to review the items to be installed. Click Next to proceed.
8. In the Review Licenses screen that appears, select I accept the terms of the license agreement. (No license agreement (additional to your UModel Enterprise or Professional Edition license) is required for the UModel plugin.) Then click Finish to complete the installation.

If there are problems with the plug-in (missing icons, for example), start Eclipse via the command line with the -clean flag.

Currently installed version

To check the currently installed version of the UModel Plugin for Eclipse, select the Eclipse menu option Help | About Eclipse. Then select the UModel icon.


Starting Eclipse and using UModel plugin

To start Eclipse:

1. Double click the Eclipse icon ic-eclipse to start Eclipse.

This opens the Eclipse Welcome screen.

2. Click the Workbench icon to switch to the Eclipse Workbench.

This opens an empty workbench and loads the UModel icon bar.

UModel properties:

1. Select the menu option Window | Preferences, and click the UModel entry.
2. Activate the "Automatically switch to UModel perspective at file open" check box, to switch to the UModel perspective when opening a file, and click OK to confirm.

Clicking the "Open UModel Options Dialog" button, opens the Options dialog which allows you to define the specific UModel settings, i.e. Libraries, Code generation settings etc.


UModel / Editor, View and Perspectives

To enable the UModel perspective in Eclipse:

· Select the menu option Window | Open perspective | Other | UModel.

The individual UModel tabs are now visible in the Eclipse Environment:

The UModel perspective can be automatically set if you activate the "Automatically switch to UModel perspective at file open" in the Window | Preferences dialog box.


Creating new (opening existing) UModel project / file

An Eclipse project has to be created, or one has to exist, before you can open, or create a new UModel *.ump project.

1. Right click in the Navigator pane and select New | Project.
2. Select General | Project and click Next.
3. Enter a project name in the Project name field, e.g. my_uml and click the Finish button.

This adds a new Eclipse project to the workspace.

4. Right click the new project folder and select New | Other..., click the UModel Project File entry and click Next.

5. Enter a UModel project file name, or use the one automatically supplied e.g. my_uml.ump, then click Finish.

This creates a new empty UModel project.

You can now create UModel project files inside this Eclipse project, or copy existing ones into it. Whenever a model changes, the corresponding code will be generated automatically. Code generation errors and warnings will be shown in the UModel view called Messages and added to the Problems view of Eclipse.


Importing / opening examples from Navigator

To Import the UModel Examples folder into the Navigator:

1. Right-click in the Navigator tab and click Import.
2. Select General | File system, then click Next.

3. Click the Browse button to the right of the "From directory:" text box, select the UModelExamples directory checkbox in your C:\Documents and Settings\User folder\My Documents\Altova\UModel2013 folder and click OK.

5. If not automatically supplied, click the Browse button, next to the "Into folder:" text box, to select the target folder, then click Finish.

The selected folder structure and files will be copied into the Eclipse workspace.

To open an existing UModel project in the workspace:

1. Right click a file in Navigator tab, e.g. Bank_Java.ump, and select UModel | Load.

The file is opened and the folder structure is visible in the Model Tree tab.

2. Expand the Design View folder and double click the Overview diagram icon.

This opens the Component diagram and displays the components and interface elements.

Please note:

You can also click the UModel combo box and select Load Bank_Java from the entries avaiable there.


Differences between Eclipse and standalone versions

Prerequisites:

All Java, C#, VB code projects that are part of the project workspace, are automatically available for synchronization. Automatic synchronization is only supported for Java code.

The menu items Project | Import Source Directory and Project | Import Source Project do not have the option to select "Java" in the Language combo box of each "Import source..." dialog box. Java code is automatically added when you add a Java project to your Eclipse project.

The Eclipse version of UModel, now supports the native version control functions, and menu items, available in the Eclipse IDE. The Version Control commands relating to source code files are available through the specific built-in support, and not through UModel specific menus.

UModel projects can be split up into multiple subprojects allowing several developers to simultaneously edit different parts of a single project. Each individual subproject can be added to a source control system.

Please see Teamwork support for UModel projects for more information on the Teamwork capabilities.

Source control systems support for 3-way project merging

When checking in/out project files, UModel automatically generates "Common ancestor" files which are then used for the 3-way merge process. This enables a much finer merge result than the normal 2-way merge. Note that snapshot files, used for a 3-way merge in the standalone UModel version, cannot be created automatically in Eclipse!

To check out a subproject file:

1. Use the standard Eclipse commands to check out the subproject file.

New menu items:

In general, most UModel commands are available from the UModel menu.

· Automatically synchronize Program Code from UModel Project.
· Automatically synchronize UModel Project from Program Code.

New toolbar:

A new toolbar is available in Eclipse and supplies the following functions:

· Code engineering status, checks the current status of the code engineering process and displays any relevant information in the Messages tab.

· Open Umodel help, opens the UModel2013 User and Reference manual help file.

· Load UModel file, allows you to select the UModel project you want to open using the combo box control. All UModel *.ump files that are in the currently loaded Eclipse project, are displayed in the drop-down box. The name of the UModel file then appears in the combo box.

Unsupported features in Eclipse

· The Scripting environment (Tools | Scripting Editor...) is currently not supported.
· Menu option Tools | Restore Toolbars and Windows is not supported.

Code-engineering

The merging/updating of a single class is not available in the Model Tree. Automatic or manual synchronization updates all changes immediately.

If code is not parseable then a red UModel status icon appears in the tool bar, showing the code and model are currently not synchronized. The icon also appears if the last reverse engineering / forward engineering process encountered an error. The same is true if the syntax check throws an error in UModel.

Clicking a parsing error in the Messages window opens the corresponding source code file, with the cursor positioned on the line containing the error.

A progress bar in the status bar shows that model/code are currently being synchronized.

Wherever changes are made to code in the Eclipse environment, the code is always reparsed and the model is updated.

Synchronization notes for the Eclipse edition of UModel:

Some C# and Visual Basic code modifications in Eclipse do not trigger an internal event and are thus not automatically updated in UModel.

This means that making these changes in Eclipse code does not update the UML model, you have to force a synchronization manually, or make a different modification which triggers a source file update.

C# and Visual Basic limitations:

If your UModel project contains the language profile for C#, and Visual Basic then automatic synchronization is automatically disabled for that project; a message box informs you of this when opening such a project. Synchronization has to be started manually for such projects.


UModel code generation

Build Integration

Generation of code can be triggered manually by selecting Merge Program code..., or Merge UModel Project.. menu entries of the UModel menu.

· Full integration into the Eclipse auto-build process is achieved by assigning the UModel builder to an Eclipse project.

· For manual code generation: see below.

To manually build code

1. Right click the specific folder/package in the Model Tree tab, and select Code Engineering | Merge Program Code from UModel Project.

You are prompted for a target folder for the generated code.

2. Select the folder and click OK to start code generation.


UModel Diagram icons

The following section is a quick guide to the icons that are made available in each of the modeling diagrams.

The icons are split up into two sections:

· Add - displays a list of elements that can be added to the diagram.

· Relationship - displays a list of relationship types that can be created between elements in the diagram.


Activity Diagram

Add

Action (CallBehaviorAction)

Action (CallOperationAction)

AcceptEventAction

AcceptEventAction (TimeEvent)

SendSignalAction

DecisionNode (Branch)

MergeNode

InitialNode

ActivityFinalNode

FlowFinalNode

ForkNode (vertical)

ForkNode (horizontal)

JoinNode

JoinNode (horizontal)

InputPin

OutputPin

ValuePin

ObjectNode

CentralBufferNode

DataStoreNode

ActivityPartition (horizontal)

ActivityPartition (vertical)

ActivityPartition 2-Dimensional

ControlFlow

ObjectFlow

ExceptionHandler

Activity

ActivityParameterNode

StructuredActivityNode

ExpansionRegion

ExpansionNode

InterruptibleActivityRegion

Note

Note Link


Class Diagram

Relationship:

Association

Aggregation

Composition

AssociationClass

Dependency

Usage

InterfaceRealization

Generalization

Add:

Package

Class

Interface

Enumeration

Datatype

PrimitiveType

Profile

Stereotype

ProfileApplication

InstanceSpecification

Note

Note Link


Communication diagram

Add

Lifeline

Message (Call)

Message (Reply)

Message (Creation)

Message (Destruction)

Note

Note Link


Composite Structure Diagram

Add

Collaboration

CollaborationUse

Part (Property)

Class

Interface

Port

Relationship

Connector

Dependency (Role Binding)

InterfaceRealization

Usage

Note

Note Link


Component Diagram

Add:

Package

Interface

Class

Component

Artifact

Relationship:

Realization

InterfaceRealization

Usage

Dependency

Note

Note Link


Deployment Diagram

Add:

Package

Component

Artifact

Node

Device

ExecutionEnvironment

Relationship:

Manifestation

Deployment

Association

Generalization

Dependency

Note

Note Link


Interaction Overview diagram

Add

CallBehaviorAction (Interaction)

CallBehaviorAction (InteractionUse)

DecisionNode

MergeNode

InitialNode

ActivityFinalNode

ForkNode

ForkNode (Horizontal)

JoinNode

JoinNode (Horizontal)

DurationConstraint

Relationship

ControlFlow

Note

Note Link


Object Diagram

Relationship:

Association

AssociationClass

Dependency

Usage

InterfaceRealization

Generalization

Add:

Package

Class

Interface

Enumeration

Datatype

PrimitiveType

InstanceSpecification

Note

Note Link


Package diagram

Add

Package

Profile

Relationship

Dependency

PackageImport

PackageMerge

ProfileApplication

Note

Note Link


Profile Diagram

Add

Profile

Stereotype

Relationship

Generalization

ProfileApplication

PackageImport

ElementImport

Note

NoteLink


Protocol State Machine

Add

Simple state

Composite state

Orthogonal state

Submachine state

FinalState

InitialState

EntryPoint

ExitPoint

Choice

Junction

Terminate

Fork

Fork (horizontal)

Join

Join (horizontal)

ConnectionPointReference

Relationship

Protocol Transition

Note

Note link


Sequence Diagram

Add

Lifeline

CombinedFragment

CombinedFragment (Alternatives)

CombinedFragment (Loop)

InteractionUse

Gate

StateInvariant

DurationConstraint

TimeConstraint

Message (Call)

Message (Reply)

Message (Creation)

Message (Destruction)

Asynchronous Message (Call)

Asynchronous Message (Reply)

Asynchronous Message (Destruction)

Note

Note Link

No message numbering

Simple message numbering

Nested message numbering

Toggle dependent message movement

Toggle automatic creation of replies for messages

Toggle automatic creation of operations in target by typing operation names


State Machine Diagram

Add

Simple state

Composite state

Orthogonal state

Submachine state

FinalState

InitialState

EntryPoint

ExitPoint

Choice

Junction

Terminate

Fork

Fork (horizontal)

Join

Join (horizontal)

DeepHistory

ShallowHistory

ConnectionPointReference

Relationship

Transition

Note

Note link

Toggle automatic creation of operations in target by typing operation names


Timing Diagram

Add

Lifeline (State/Condition)

Lifeline (General value)

TickMark

Event/Stimulus

DurationConstraint

TimeConstraint

Message (Call)

Message (Reply)

Asynchronous Message (Call)

Note

Note Link


Use Case diagram

Add:

Package

Actor

UseCase

Relationship:

Association

Generalization

Include

Extend

Note

Note Link


XML Schema diagram

Add

XSD TargetNamespace

XSD Schema

XSD Element (global)

XSD Group

XSD ComplexType

XSD ComplexType (simpleContent)

XSD SimpleType

XSD List

XSD Union

XSD Enumeration

XSD Attribute

XSD AttributeGroup

XSD Notation

XSD Import

Relationship

XSD Include

XSD Redefine

XSD Restriction

XSD Extension

XSD Substitution

Note

Note link


Business Process Modeling Notation

Add

Start Event

Intermediate Event

Stop Event

Task

Loop Task

Multi Instance Task

Compensation Task

Collapsed Sub Process

Collapsed Loop Sub Process

Collapsed Multi Instance Sub Process

Collapsed Ad Hoc Process

Collapsed Compensation Sub Process

Expanded Sub Process

Expanded Loop Sub Process

Expanded Multi Instance Sub Process

Expanded Ad Hoc Process

Expanded Compensation Sub Process

Gateway

Inclusive Gateway (OR)

Parallel Gateway (AND)

Data Based Exclusive Gateway (XOR)

Event Based Exclusive Gateway (XOR)

Complex Gateway (Decision/Merge)

Relationship

Sequence Flow

Conditional Flow

Default Flow

Message Flow

Association

Pool

Data Object

Group

Text Annotation

Annotation Association


Business Process Modeling Notation 2.0

Add

Start Event

Catch Event

Throw Event

End Event

Task

Expanded Sub Process

Collapsed Sub Process

Call Activity

Gateway

Relationship

Sequence Flow

Default Sequence Flow

Conditional Sequence Flow

Message Flow

Association

Pool

Group

Data Object

Data Output

Data Input

Collection Data Object

Data Store

Message

Text Annotation

Annotation Association


Database Modeling

Add

Table

CheckConstraint

PrimaryKey

ForeignKey

UniqueKey

Index

Relationship

Database Relationship Association

Database Relationship with Attributes


UModel Reference

The following section lists all the menus and menu options in UModel, and supplies a short description of each.


File

New

Clears the diagram tab, if a previous project exists, and creates a new UModel project.

Open

Opens previously defined modeling project. Select a previously saved project file *.ump from the Open dialog box.

The standard Open dialog is shown below. Please note the "Switch to URL..." button at the base of the dialog box.

The Switch to URL button changes the appearance of the dialog box and allows you to open a UModel project file from an URL.

1. Enter the URL you want to access, in the Server URL field.
2. Enter your User-ID in the User and Password fields, if the server is password protected.
3. Click Browse to view and navigate the directory structure of the server.
4. Click the file you want to load into UModel. If the server is a Microsoft® SharePoint® Server, check the Microsoft® SharePoint® Server check box. See the Microsoft® SharePoint® Server Notes below for further information about working with files on this type of server.

The file URL now appears in the File URL field at the top of the dialog box.

The Open button only becomes active at this point.

5. Click the Open button to load the file. The file appears in the main window.

Please note: The Browse function is only available on servers which support WebDAV and on Microsoft SharePoint Servers. The supported protocols are FTP, HTTP, and HTTPS.

To give you more control over the loading process, you can choose to load the file through the local cache or a proxy server (which considerably speeds up the process if the file has been loaded before). Alternatively, you may want to reload the file if you are working, say, with an electronic publishing or database system; select the Reload option in this case.

Microsoft® SharePoint® Server Notes

Note the following points about files on Microsoft® SharePoint® Servers:

· In the directory structure that appears in the Available Files pane, file icons have symbols that indicate the check-in/check-out status of files.

Right-clicking a file pops up a context menu containing commands available for that file.

· The various file icons are shown below:

MSSharePtCheckedIn | Checked in. Available for check-out.
MSSharePtCheckedOutByOther | Checked out by another user. Not available for check-out.
MSSharePtCheckedOut | Checked out locally. Can be edited and checked-in.

· After you check out a file, you can edit it in your Altova application and save it using File | Save (Ctrl+S).
· You can check-in the edited file via the context menu in the Open URL dialog (see screenshot above).

· When a file is checked out by another user, it is not available for check out.
· When a file is checked out locally by you, you can undo the check-out with the Undo Check-Out command in the context menu. This has the effect of returning the file unchanged to the server.

· If you check out a file in one Altova application, you cannot check it out in another Altova application. The file is considered to be already checked out to you. The available commands at this point in any Altova application supporting Microsoft® SharePoint® Server will be: Check In and Undo Check Out.

Reload

Allows you to reload the current project and save, or discard, the changes made since you opened the project file.

Save

Saves the currently active modeling project using the currently active file name.

Save as

Saves the currently active modeling project with a different name, or allows you to give the project a new name if this is the first time you save it.

Save Copy As

Allows you to save a copy of the currently active UModel project with a different file name.

Save Diagram as Image

Opens the "Save as..." dialog box and allows you to save the currently active diagram as a .PNG, or .EMF (enhanced metafile) file. Very large PNG files, in the gigabyte range, can now be saved.

Save all Diagrams as Images

Save all diagrams of the currently active project as a .PNG, or .EMF (enhanced metafile) files.

Import from XMI file

Imports a previously exported XMI file. If the file was produced with UModel, then all extensions etc. will be retained.

Export to XMI file

Export the model as an XMI file. You can select the UML version, as well as the specific IDs that you want to export please see XMI - XML Metadata Interchange for more information.

Send by Mail

Opens your default mail application and inserts the current UModel project as an attachment.

Print

Opens the Print dialog box, from where you can print out your modeling project as hardcopy.

"Use current", retains the currently defined zoom factor of the modeling project. Selecting this option enables the "Page split of pictures" group.

The Prevent option prevents modeling elements from being split over a page, and keeps them as one unit.

"Use optimal" scales the modeling project to fit the page size. You can also specify the zoom factor numerically.

Print all diagrams

Opens the Print dialog box and prints out all UML diagrams contained in the current project file.

Print Preview

Opens the same Print dialog box with the same settings as described above.

Print Setup

Opens the Print Setup dialog box in which you can define the printer you want to use and the paper settings.


Edit

Undo ic-undo

UModel has an unlimited number of "Undo" steps that you can use to retrace you modeling steps.

Redo ic-redo

The redo command allows you to redo previously undone commands. You can step backward and forward through the undo history using both these commands.

Cut/Copy//Delete

The standard windows Edit commands, allow you to cut, copy, etc., modeling elements, please see "Cut, copy and paste in UModel Diagrams" for more information.

Paste

using the keyboard shortcut CTRL+V, or "Paste" from the context menu, as well as Paste from the Edit menu, always adds a new modeling element to the diagram and to the Model Tree, please see "Cut, copy and paste in UModel Diagrams".

Paste in Diagram only

using the context menu, i.e. right clicking on the diagram background, only adds a "link/view" of the existing element, to the current diagram and not to the Model Tree, please see "Cut, copy and paste in UModel Diagrams".

Delete from Diagram only

Deletes the selected modeling elements from the currently active diagram. The deleted elements are not deleted from the modeling project and are available in the Model Tree tab. Note that this option is not available to delete properties or operations from a class, they can be selected and deleted there directly.

Select all

Select all modeling elements of the currently active diagram. Equivalent to the CTRL+A shortcut.

Find

There are several options you can use to search for modeling elements:

· Use the text box in the Main title bar ic-find-txt-field
· Use the menu option Edit | Find
· Press the shortcut CTRL+F to open the find dialog box.

Allows you to search for specific text in:

· Any of the three Model Tree panes: Model Tree, Diagram Tree and Favorites tab.
· The Documentation tab of the Overview pane.
· Any currently active diagram.
· The Messages pane.

Find Next ic-find-next F3

Searches for the next occurrence of the same search string in the currently active tab or diagram.

Find Previous SHIFT+F3

Searches for the previous occurrence of the same search string in the currently active tab or diagram.

Replace

Allows you to search and replace any modelling elements in the project. When the element is found it is highlighted in the diagram as well as in the Model Tree.

Search and replace works in:

· All diagrams
· Any of the three Model Tree panes: Model Tree, Diagram Tree and Favorites tab.
· The Documentation tab of the Overview pane.

Copy as bitmap

Copies the currently active diagram into the clipboard from where you can paste it into the application of your choice.

Please note:

Diagrams are copied into the system clipboard, you have to insert them into another application to see, or get access to them.

Copy selection as bitmap

Copies the currently selected diagram elements into the clipboard from where you can paste them into the application of your choice.


Project

Check Project Syntax...

Checks the UModel project syntax. The project file is checked on multiple levels detailed in the tables below:

Level | Checks if... | Message...
Project level | at least one Java Namespace Root exists | Error
Components | Project file / Directory is set | Error
 | If Realization exists | Error
 | "Use for code engineering" check box unchecked: no check is performed and syntax check is disabled. | None

Class | Code file name is set. If class is nested then no check performed. | Error if the local option "Generate missing code file names" is not set. Warning if the option is set.
 | If contained in a code language namespace | Error
 | Type for operation parameter is set | Error
 | Type for properties is set | Error
 | Operation return type is set | Error
 | Duplicate operations (names + parameter types) | Error
 | If classes are involved in Realization, only if the class is not nested. | Warning

Interface | Code file name is set. | Error if the local option "Generate missing code file names" is not set. Warning if the option is set.
 | Contained in a code language namespace | Error
 | Type for properties are set | Error
 | Type for operation param. are set | Error
 | Operation return type is set | Error
 | Duplicate operations (names + parameter types) | Error
 | If interfaces are involved in a ComponentRealization | Warning

Enumeration | Belongs to Java Namespace Root: gives a warning to say that no code will be generated. | Warning
 | Does not belong to Java Namespace Root: no check is performed and syntax check is disabled for the enumeration. No check is performed on contained package | None

Syntax check for all UML elements involved in code generation

class | Checks name is a valid Java name (no forbidden characters, name is not a keyword) | Error
class property | Checks name is a valid Java name (no forbidden characters, name is not a keyword) | Error
class operation | Checks name is a valid Java name (no forbidden characters, name is not a keyword) Checks for existence of return parameter | Error
class operation parameter | Checks name is a valid Java name (no forbidden characters, name is not a keyword) Checks type has a valid Java type name | Error
interface | Checks name is a valid Java name (no forbidden characters, name is not a keyword) | Error
interface operation | Checks name is a valid Java name (no forbidden characters, name is not a keyword) | Error
interface operation parameter | Checks name is a valid Java name (no forbidden characters, name is not a keyword) | Error
interface properties | Checks name is a valid Java name (no forbidden characters, name is not a keyword) | Error
package with stereotype namespace | Checks name is a valid Java name (no forbidden characters, name is not a keyword) | Error
package without stereotype namespace | no element to check | None
class | multiple inheritance | Error

Please note:

Constraints on model elements are not checked, as they are not part of the Java code generation process. Please see "constraining model elements" for more information.

Source control

UModel now supports Microsoft SourceSafe and other compatible repositories.

Microsoft has defined a Registry Entry, where all SCC compatible programs can register themselves. UModel only reads this entry.

HKEY_LOCAL_MACHINE\SOFTWARE\SourceCodeControlProvider\InstalledSCCProviders

Also note that Source Control plugins are not automatically installed by all SSC products. Please read the documentation supplied with your specific source control software for more information.

Please see:

Source control systems for detailed information on source control servers and clients and how to use them.

Import Source Directory...

Opens the Import Source Directory wizard shown below. Please see "Round-trip engineering (code - model - code)" for a specific example.

Import Source Project...

Opens the Import Source Project wizard shown below. Clicking the browse ic-browse button allows you to select the project file and the specific project type. Please see "Importing source code into projects" for a specific example.

Java projects:

· JBuilder .jpx, Eclipse .project project files, as well as NetBeans (project.xml) are currently supported.

C# projects:

· MS Visual Studio projects, csproj, csdprj..., as well as
· Borland .bdsproj project files

VB.NET projects:

· MS Visual Studio projects, vbproj, vbdproj.

Import Binary Types

Opens the Import Binary Types dialog box allowing you to import Java, C#, and VB binary files. Please see "Importing Java, C#, and VB binaries" for more information.

Import XML Schema directory

Opens the Import XML Schema Directory allowing you to import all XML Schemas in that directory and optionally all XML Schemas in any of the subfolders.

Import XML Schema File

Opens the Import XML Schema File dialog box allowing you to import schema files. Please see "XML Schema Diagrams" for more information.

Generate Sequence diagrams...

Opens the Select Operations dialog box, in which you select (multiple) operations that are to be the basis of the generated Sequence diagram.

Having selected the operations and clicked OK, the Sequence Diagram Generation dialog box is opened allowing you to further define the generation settings.

Merge Program Code from UModel Project

Opens the Synchronization Settings dialog box with the "Code from Model" tab active. Clicking the Project Settings button allows you to select the specific programming language settings.

Merging or overwriting code

Assuming that code has been generated once from a model, and changes have since been made to both model and code e.g.:

· Model elements have been added in UModel e.g. a new class X

· A new class has been added to the external code e.g. class Y

Merging (model into code) means that:

· the newly added class Y in the external code is retained
· the newly added class X, from UModel, is added to the code.

Overwriting (code according to model) means that:

· the newly added class Y in the external code is deleted
· the newly added class X, from UModel, is added to the code.

Merge UModel Project from Program Code

Opens the Synchronization Settings dialog box with the "Model from Code" tab active. Clicking the Project Settings button allows you to select the specific programming language settings.

Merging or overwriting code

Assuming that code has been generated once from a model, and changes have since been made to both model and code e.g.:

· Model elements have been added in UModel e.g. a new class X

· A new class has been added to the external code e.g. class Y

Merging (code into model) means that:

the newly added class X in UModel, is retained

the newly added class Y, from the external code, is added to the model

Overwriting (Model according to code ) means that:

the newly added class X in UModel is deleted

the newly added class Y, from the external code, is added to the model

Project settings

Allows you to define the specific languages settings for your project.

Synchronization Settings...

Opens the Synchronization Settings dialog box as shown in the screenshots above.

Merge Project...

Merges two UModel project files into one model. The first file you open is the one the second file will be merged into. Please see Merging UModel projects for more information.

Include Subproject

UModel is supplied with several files that can be included in a UModel project. Clicking the Java tab allows you to include Java lang classes, interfaces and packages in your project, by selecting one of the supplied files.

1. Select Project | Include to open the "Include" dialog box.
2. Click the UModel project file you want to include and press OK.

UModel projects can be included within other UModel projects. To include projects place the respective *.ump files in:

· ...\UModel2013\UModelInclude to appear in the Basic tab, or

· ...\UModel2013\UModelInclude\Java to appear in the Java tab.

Please note:

An include file, which contains all types of the Microsoft .NET Framework 2.0, is available in the C# 2.0 tab.

To create a user-defined tab/folder:

1. Navigate to the ...\UModel2013\UModelInclude and create/add your folder below ...\UModelInclude, i.e. ...\UModelInclude\myfolder.

To create descriptive text for each UModel project file:

1. Create a text file using the same name as the *.ump file and place in the same folder.

Eg. the MyModel.ump file requires a descriptive file called MyModel.txt.

To remove an included project:

1. Click the included package in the Model Tree view and press the Del. key.
2. You are prompted if you want to continue the deletion process.
3. Click OK to delete the included file from the project.

Please note:

· To delete or remove a project from the "Include" dialog box, delete or remove the (MyModel).ump file from the respective folder.

Open Subproject as project

Opens the selected subproject as a new project.

Clear Messages

Clears the syntax check and code merging messages, warnings and errors from the Messages window.

Please note:

Errors are generally problems that must be fixed before code can be generated, or the model code can be updated during the code engineering process. Warnings can generally be deferred until later. Errors and warnings are generated by the syntax checker, the compiler for the specific language, the UModel parser that reads the newly generated source file, as well as during the import of XMI files.

Generate documentation

Allows you to generate documenation for the currently open project in HTML, Microsoft Word, and RTF formats. please see Generating UML documentation for more information.

List Elements not used in any Diagram

Creates a list of all elements not used in any diagram in the project.

List shared Packages

Lists all shared packages of the current project.

List included Packages

Lists all include packages in the current project. Java Profile (Java Profile.ump) and Java Lang (Java Lang.ump) are automatically supplied in the Bankview example supplied with UModel.


Layout

The commands of the Layout menu allow you to line up and align the elements of your modeling diagrams.

When using the marquee (drag on the diagram background) to mark several elements, the element with the dashed outline becomes the "active" element, i.e. the last marked element. All alignment commands use this element as the origin, or basis for the following alignment commands.

Align:

The align command allows you to align modeling elements along their borders, or centers depending on the specific command you select.

Space evenly:

This set of commands allow you to space selected elements evenly both horizontally and vertically.

Make same size:

This set of commands allow you to adjust the width and height of selected elements based on the active element.

Line up:

This set of commands allow you to line up the selected elements vertically or horizontally.

Line Style:

This set of commands allow you to select the type of line used to connect the various modeling elements. The lines can be any type of dependency, association lines used in the various model diagrams.

Autosize:

This command resizes the selected elements to their respective optimal size(s).

Autolayout all:

This command allows you to choose the type of presentation of the modeling elements in the UML diagram tab.

"Force directed"

displays the modeling elements from a centric viewpoint.

"Hierarchic"

displays elements according to their relationships, superclass - derived class etc.

"Block"

displays elements grouped by element size in rectangular fashion.

Reposition text labels:

Repositions modeling element names (of the selected elements) to their default positions.


View

The commands available in this menu allow you to:

· Switch/activate tabs of the various panes

· Define the modeling element sort criteria of the Model Tree and Favorites tab

· Define the grouping criteria of the diagrams in the Diagram Tree tab

· Show or hide specific UML elements in the Favorites and Model Tree tab

· Define the zoom factor of the current diagram.


Tools

The tools menu allows you to:

· Start spell checking your UModel project and define the spell checker options.
· Access the Scripting Environment of UModel. You can create, manage and store your own forms, macros and event handlers.
· View and execute the currently defined macros.
· Customize your version: define your own toolbars, keyboard shortcuts, menus, and macros.
· Restore Toolbars and Windows to their default state.
· Define the global program settings/options


Spelling...

Select Tools | Spelling to start the spell check process. The standard spell checker options are available in this dialog box.

To define the specific spell checker options, click the "Options" button, or select the menu option Tools | Spelling Options.

Please note:

You can spell check entries in the Model Tree as well as in UML diagrams. Right clicking in the Model Tree and selecting "Documentation Spelling" spell checks the comments and notes of the Model Tree.

Not in Dictionary

This text box contains the word that cannot be found in either the selected language dictionary or user dictionary.

Suggestions

This list box displays words resembling the unknown word (supplied from the language and user dictionaries). Double-clicking a word in this list automatically inserts it in the document and continues the spellchecking process.

Ignore once

This command allows you to continue checking the document while ignoring the first occurrence of the unknown word. The same word will be flagged again if it appears in the document.

Ignore all

This command ignores all instances of the unknown word in the whole document.

Add to dictionary

This command adds the unknown word to the user dictionary. You can access the user dictionary (in order to edit it) via the Options dialog.

Change

This command replaces the currently highlighted word in the XML document with the (edited) word in the Not in Dictionary text box.

Change all

This command replaces all occurrences of the currently highlighted word in the XML document with the (edited) word in the Not in Dictionary text box.

Recheck Document

The "Recheck Document" button restarts the check from the beginning of the document.

Adding dictionaries for the spellchecker

For each dictionary language there are two Hunspell dictionary files that work together: a .aff file and .dic file. All language dictionaries are installed in a Lexicons folder at the following location:

On Windows 7: C:\ProgramData\Altova\SpellChecker\Lexicons

On Windows XP: C:\Documents and Settings\All Users\Application Data\Altova\SharedBetweenVersions\SpellChecker\Lexicons

Within the Lexicons folder, different language dictionaries are each stored in different folder: <language name>\<dictionary files>. For example, on a Windows 7 machine, files for the two English-language dictionaries (English (British) and English (US)) will be stored as below:

C:\ProgramData\Altova\SpellChecker\Lexicons\English (British)\en_GB.aff

C:\ProgramData\Altova\SpellChecker\Lexicons\English (British)\en_GB.dic

C:\ProgramData\Altova\SpellChecker\Lexicons\English (US)\en_US.dic

C:\ProgramData\Altova\SpellChecker\Lexicons\English (US)\en_US.dic

In the Spelling Options dialog, the dropdown list of the Dictionary Language combo box displays the language dictionaries. These dictionaries are those available in the Lexicons folder and have the same names as the language subfolders in the Lexicons folder. For example, in the case of the English-language dictionaries shown above, the dictionaries would appear in the Dictionary Language combo box as: English (British) and English (US).

All installed dictionaries are shared by the different users of the machine and the different major versions of Altova products (whether 32-bit or 64-bit).

You can add dictionaries for the spellchecker in two ways, neither of which require that the files be registered with the system:

· By adding Hunspell dictionaries into a new subfolder of the Lexicons folder. Hunspell dictionaries can be downloaded, for example, from http://wiki.services.openoffice.org/wiki/Dictionaries or http://extensions.services.openoffice.org/en/dictionaries. (Note that OpenOffice uses the zipped OXT format. So change the extension to .zip and unzip the .aff and .dic file to the language folders in the Lexicons folder. Also note that Hunspell dictionaries are based on Myspell dictionaries. So Myspell dictionaries can also be used.)
· By using the Altova dictionary installer, which installs a package of multiple language dictionaries by default to the correct location on your machine. The installer can be downloaded by clicking the link in the Dictionary language pane of the Spelling Options dialog (see screenshot below).

Note: It is your choice as to whether you agree to the terms of the license applicable to the dictionary and whether the dictionary is appropriate for your use with the software on your computer.

Working with the user dictionary

Each user has one user dictionary, in which user-allowed words can be stored. During a spellcheck, spellings are checked against a word list comprising the words in the language dictionary and the user dictionary. You can add words to and delete words from the user dictionary via the User Dictionary dialog (screenshot below). This dialog is accessed by clicking the User Dictionary button in the Spelling Options dialog (see screenshot at top of section).

To add a word to the user dictionary, enter the word in the Word text box and click Add. The word will be added to the alphabetical list in the Dictionary pane. To delete a word from the dictionary, select the word in the Dictionary pane and click Delete. The word will be deleted from the Dictionary pane. When you have finished editing the User Dictionary dialog, click OK for the changes to be saved to the user dictionary.

Words may also be added to the User Dictionary during a spelling check. If an unknown word is encountered during a spelling check, then the Spelling dialog pops up prompting you for the action you wish to take. If you click the Add to Dictionary button, then the unknown word is added to the user dictionary.

The user dictionary is located at:

On Windows 7: C:\Users\<user>\Documents\Altova\SpellChecker\Lexicons\user.dic

On Windows XP: C:\Documents and Settings\<user>\My Documents\Altova\SpellChecker\Lexicons\user.dic


Spelling options...

Elements

This group allows you to choose between spell checking all UML elements, or only the Notes and Comments objects.

Prefixes

Double clicking in the "Prefix to ignore" column lets you enter the prefixes, of specific UML elements, you want to ignore during spell checking, e.g. m_ for properties, and I for Interfaces.

The "Append" button adds a new row to the Prefixes table. "Delete" deletes the currently active row.

Clicking the "More spelling options..." button opens the Spelling Options dialog box shown below.

More Spelling Options

The Spelling Options dialog is used to define global spellchecker options.

Always suggest corrections:

Activating this option causes suggestions (from both the language dictionary and the user dictionary) to be displayed in the Suggestions list box. Disabling this option causes no suggestions to be shown.

Make corrections only from main dictionary:

Activating this option causes only the language dictionary (main dictionary) to be used. The user dictionary is not scanned for suggestions. It also disables the User Dictionary button, preventing any editing of the user dictionary.

Ignore words in UPPER case:

Activating this option causes all upper case words to be ignored.

Ignore words with numbers:

Activating this option causes all words containing numbers to be ignored.

Split CamelCase words

CamelCase words are words that have capitalization within the word. For example the word "CamelCase" has the "C" of "Case" capitalized, and is therefore said to be CamelCased. Since CamelCased words are rarely found in dictionaries, the spellchecker would flag them as errors. To avoid this, the Split CamelCase words option splits CamelCased words into their capitalized components and checks each component individually. This option is checked by default.

Dictionary Language

Use this combo box to select the dictionary language for the spellchecker. The default selection is US English. Other language dictionaries are available for download free of charge from the Altova website.


Scripting Editor

The Scripting Editor command opens the Scripting Editor window. How to work with the Scripting Editor is described in the Scripting section of this documentation.

Note: The .NET Framework version 2.0 or higher will have to be installed on your machine in order for the Scripting Editor to run.


Macros

Placing the mouse cursor over the Macros entry, opens a flyout menu containing a list of the currently defined macros in the Scripting Project. The active Scripting Project is defined in the Scripting tab of the Options dialog box.

E.g.


User-defined Tools

Placing the cursor over the User-defined Tools command rolls out a sub-menu containing custom-made commands that use external applications. You can create these commands in the Tools tab of the Customize dialog. Clicking one of these custom commands executes the action associated with this command.

The User-Defined Tools | Customize command opens the Tools tab of the Customize dialog (in which you can create the custom commands that appear in the menu of the User-Defined Tools command.)


Customize...

The customize command lets you customize UModel to suit your personal needs.

Commands

Toolbars

Tools

Keyboard

Menu

Macros

Plugin

Options


Commands

The Commands tab allows you customize your menus or toolbars.

To add a command to a toolbar or menu:

1. Open this dialog box using Tools | Customize.
2. Select the command category in the Categories list box. The commands available appear in the Commands list box.
3. Click on a command in the commands list box and drag "it" to an to an existing menu or toolbar.
4. An I-beam appears when you place the cursor over a valid position to drop the command.
5. Release the mouse button at the position you want to insert the command.

· A small button appears at the tip of mouse pointer when you drag a command. The check mark below the pointer means that the command cannot be dropped at the current cursor position.
· The check mark disappears whenever you can drop the command (over a tool bar or menu).
· Placing the cursor over a menu when dragging, opens it, allowing you to insert the command anywhere in the menu.
· Commands can be placed in menus or tool bars. If you created you own toolbar you can populate it with your own commands/icons.

Please note:

You can also edit the commands in the context menus (right click anywhere opens the context menu), using the same method. Click the Menu tab and then select the specific context menu available in the Context Menus combo box.

To delete a command or menu:

1. Open this dialog box using Tools | Customize.
2. Click on the menu entry or icon you want to delete, and drag with the mouse.
3. Release the mouse button whenever the check mark icon appears below the mouse pointer.

The command, or menu item is deleted from the menu or tool bar.


Toolbars

The Toolbars tab allows you to activate or deactivate specific toolbars, as well as create your own specialized ones.

Toolbars contain symbols for the most frequently used menu commands. For each symbol you get a brief "tool tip" explanation when the mouse cursor is directly over the item and the status bar shows a more detailed description of the command.

You can drag the toolbars from their standard position to any location on the screen, where they appear as a floating window. Alternatively you can also dock them to the left or right edge of the main window.

To activate or deactivate a toolbar:

1. Click the check box to activate (or deactivate) the specific toolbar.

To create a new toolbar:

1. Click the New... button, and give the toolbar a name in the Toolbar name dialog box.
2. Add commands to the toolbar using the Commands tab of the Customize dialog box.

To reset the Menu Bar

· Click the Menu Bar entry and
· Click the Reset button, to reset the menu commands to the state they were when installed.

To reset all toolbar and menu commands

· Click the Reset All button, to reset all the toolbar commands to the state they were when the program was installed. A prompt appears stating that all toolbars and menus will be reset.
· Click Yes to confirm the reset.

Show text labels:

This option places explanatory text below toolbar icons when activated.


Tools

The Tools tab allows you to create your own menu entries, and associated arguments, to start external tools from within UModel via the Tools menu.

Click the folder icon (in the Menu contents: bar) to add a new menu entry, and use the Command field to associate it to an application.

The Tools tab now also supports the definition of Arguments. Arguments are variables that are assigned specific values when the external tool is started using the menu item.

E.g. Open the source code file of the currently selected UML class in Notepad.

1. Select the menu item Tools | Customize and click the Tools tab.
2. Enter the name and path of the external application e.g. C:\...\notepad.exe.
3. Click the Flyout button of the Arguments field and select the argument you want to use, e.g. Code File Name.

4. Click the Close button to finish.
5. Click the Tools menu and select "Open code file".

The BankServer.cs file is opened in Notepad and is ready to be edited.

UModel Arguments

Project File Name

The file name of the active UModel project file, e.g. “Test.ump”.

Project File Path

The absolute file path of the active UModel project file, e.g. “c:\MyDirectory\Test.ump”.

Focused UML Data – Name

The name of the currently focused UML element, e.g. “Class1”.

Focused UML Data – UML Qualified Name

The qualified name of the currently focused UML element, e.g. “Package1::Package2::Class1”.

Focused UML Data – Code File Name

The code file name of the currently focused UML class, interface or enumeration as shown in the Property window (relative to the realizing component), e.g. “Class1.cs” or “MyNamespace\Class1.Java”.

Focused UML Data – Code File Path

The code file path of the currently focused UML class, interface or enumeration as shown in the Property window, e.g. “C:\Temp\MySource\Class1.cs”.

Focused UML Data – Code Project File Name

The file name of the code project the currently focused UML class, interface or enumeration belongs to.

The code project file name can be relative to the UModel project file and is the same as shown in the Properties of the component, e.g. “C:\Temp\MySource\MyProject.vcproj” or “MySource\MyProject.vcproj”.

Focused UML Data – Code Project File Path

The file path of the code project the currently focused UML class, interface or enumeration belongs to, e.g. “C:\Temp\MySource\MyProject.vcproj”.


Keyboard

The Keyboard tab allows you to define (or change) keyboard shortcuts for any command.

To assign a new Shortcut to a command:

1. Select the commands category using the Category combo box.
2. Select the command you want to assign a new shortcut to, in the Commands list box
3. Click in the "Press New Shortcut Key:" text box, and press the shortcut keys that are to activate the command.

The shortcuts appear immediately in the text box. If the shortcut was assigned previously, then that function is displayed below the text box.

4. Click the Assign button to permanently assign the shortcut.

The shortcut now appears in the Current Keys list box.

(To clear this text box, press any of the control keys, CTRL, ALT or SHIFT).

To de-assign (or delete a shortcut):

1. Click the shortcut you want to delete in the Current Keys list box, and
2. Click the Remove button (which has now become active).
3. Click the Close button to confirm all the changes made in the Customize dialog box.


Menu

The Menu tab allows you to customize the main menu bars as well as the (popup - right click) context menus.

You can customize both the Default and UModel Project menu bars.

The Default menu is the one visible when no XML documents of any type are open.

The UModel Project menu is the menu bar visible when a *.ump file has been opened.

To customize a menu:

1. Select the menu bar you want to customize from the "Show Menus for:" combo box
2. Click the Commands tab, and drag the commands to the menu bar of your choice.

To delete commands from a menu:

1. Click right on the command, or icon representing the command, and
2. Select the Delete option from the popup menu,

or,

1. Select Tools | Customize to open the Customize dialog box, and
2. Drag the command away from the menu, and drop it as soon as the check mark icon appears below the mouse pointer.

To reset either of the menu bars:

1. Select either the Default or UModel Project entry in the combo box, and
2. Click the Reset button just below the menu name.

A prompt appears asking if you are sure you want to reset the menu bar.

To customize any of the Context menus (right click menus):

1. Select the context menu from the "Select context menus" combo box.
2. Click the Commands tab, and drag the specific commands to context menu that is now open.

To delete commands from a context menu:

1. Click right on the command, or icon representing the command, and
2. Select the Delete option from the popup menu

or,

1. Select Tools | Customize to open the Customize dialog box, and
2. Drag the command away from the context menu, and drop it as soon as the check mark icon appears below the mouse pointer.

To reset any of the context menus:

1. Select the context menu from the combo box, and
2. Click the Reset button just below the context menu name.

A prompt appears asking if you are sure you want to reset the context menu.

To close an context menu window:

1. Click on the Close icon at the top right of the title bar, or
2. Click the Close button of the Customize dialog box.

Menu shadows

· Click the Menu shadows check box, if you want all your menus to have shadows.


Macros

The Macros tab allows you to select from the macros defined in the Scripting Project that is currently active in UModel.

The active Scripting Projects are specified in the Scripting tab of the Options dialog, or in the Scripting tab of the project settings.

Please see Running a Macro for more information.


Plug-Ins

The Plug-Ins tab allows you to select a UModel Plugin file (.dll) to the list of currently active Plug-Ins.

Please see Testing the UModel plugin for more information.


Options

The Options tab allows you to set general environment settings.

Toolbar

When active, the Show ToolTips on toolbars check box displays a popup when the mouse pointer is placed over an icon in any of the icon bars. The popup contains a short description of the icon function, as well as the associated keyboard shortcut, if one has been assigned.

The Show shortcut keys in ToolTips check box, allows you to decide if you want to have the shortcut displayed in the tooltip.

When active, the Large icons check box switches between the standard size icons, and larger versions of the icons.


Restore Toolbars and Windows

The Restore Toolbars and Windows command closes down UModel and re-starts it with the default settings. Before it closes down a dialog pops up asking for confirmation about whether UModel should be restarted.

This command is useful if you have been resizing, moving, or hiding toolbars or windows, and would now like to have all the toolbars and windows as they originally were.


Options

Select the menu item Tools | Options to define your project options.

The View tab allows you to define:

· Where the program logo should appear.

· The application title bar contents.

· The types of elements you want listed when using the "List elements not used in any diagram" context menu option in the Model Tree, or Favorites tab. You also have the option of ignoring elements contained in included files.

· If a selected element in a diagram is automatically selected/synchronized in the Model Tree.

· The default depth of the hierarchy view when using the Show graph view in the Hierarchy tab.

· The Autolayout Hierarchic settings, which allow you to define the nesting depth up and down in the hierarchy window.

· "Expand each element only once", only allows one of the same classifiers to be expanded in the same image/diagram.

· If you want snap lines to help you align elements when dragging in a diagram.

The Editing tab allows you to define:

· If a new Diagram created in the Model Tree tab, is also automatically opened in the main area.
· Default visibility settings when adding new elements - Properites or Operations.

· The default code language when a new component is added.

· If a newly added constraint, is to automatically constrain its owner as well.

· If a prompt should appear when deleting elements from a project, from the Favorites tab or in any of the diagrams. This prompt can be deactivated when deleting items there; this option allows you to reset the "prompt on delete" dialog box.
· The delay with which the syntax error popup should be closed.

options2

The Diagram Editing tab allows you to define:

· The number of items that can be automatically added to a diagram, before a prompt appears.
· The display of Styles when they are automatically added to a diagram.

· If Associations between modeling elements, are to be created automatically when items are added to a diagram.

· If the associations to collections are to be resolved.
· If templates from unknown externals are to be resolved as not fully qualified.

· or use preexisting Collection Templates, or define new ones.

Collection Templates should be defined as fully qualified i.e. a.b.c.List. If the template has this namespace then UModel automatically creates a Collection Association. Exception: If the template belongs to the Unknown Externals package, and the option "Unknown externals: resolve unqualified", is enabled, then only the template name is considered (i.e. List instead of a.b.c.List).

· If the autocompletion window is to be available when editing attributes or operations in the class diagram.

The File tab allows you to define:

· The actions performed when files are changed.
· If the contents of the Favorites tab are to be loaded and saved with the current project, as well as the any currently open diagrams.
· If the previously opened project is to automatically be opened when starting the application.
· If you want to structure the project file with CR/LF and tab indents in a pretty-print format.

The Code Engineering tab allows you to define:

· The circumstances under which the Message window will open.

· If all coding elements i.e. those contained in a Java / C# / VB namespace root, as well as those assigned to a Java / C# / VB component, are to be checked, or

only elements used for code engineering, i.e. where "use for code engineering" check box is active, are to be checked.

· When updating program code if:

If a syntax check is to be performed.

If missing ComponentRealizations are to be automatically generated.

If missing code file names in the merged code are to be generated.

If namespaces are to be used in the code file path.

· The Indentation method used in the code, i.e. tabs or any number of spaces.

· The directories to be ignored when updating a UModel project from code, or directory. Separate the respective directories with a semicolon ";". Child directories of the same name are also ignored.

· The location of the XMLSpy Catalog File, RootCatalog.xml, which enables UModel as well as XMLSpy to retrieve commonly used schemas (as well as stylesheets and other files) from local user folders. This increases the overall processing speed, and enables users to work offline.

The Source Control tab allows you to define:

· The current source control plugin using the combo box. The Advanced button allows you to define the specific settings of the source control plugin-that you selected. These settings change depending on the source control plugin that you use.

· The login ID for the source control provider.

· Specific settings check in/out settings.

· The Reset button is made available if you have checked/activated the "Don't show this again" option in one of the dialog boxes. The Don't show this again prompt is then reenabled.

The Scripting tab allows you to define:

· If the Scripting environment should be active for the current UModel project.

· Which Global scripting file you want to use

· If auto-macros are to be executed when UModel starts

· If Scriping events are to be processed.


Window

Cascade:

This command rearranges all open document windows so that they are all cascaded (i.e. staggered) on top of each other.

Tile horizontally:

This command rearranges all open document windows as horizontal tiles, making them all visible at the same time.

Tile vertically:

This command rearranges all open document windows as vertical tiles, making them all visible at the same time.

Arrange icons:

Arranges haphazardly positioned, iconized diagrams, along the base of the diagram viewing area.

Close:

Closes the currently active diagram tab.

Close All:

Closes all currently open diagram tabs.

Close All but Active:

Closes all diagram tabs except for the currently active one.

Next:

Switches to the next modeling diagram in the tab sequence, or the next hyperlinked element.

Previous:

Switches to the previous modeling diagram in the tab sequence, or the previous hyperlinked element.

Window list:

This list shows all currently open windows, and lets you quickly switch between them.

You can also use the CTRL+TAB or CTRL F6 keyboard shortcuts to cycle through the open windows.


Help

Allows access to the Table of Contents and Index of the UModel documentation, as well as Altova web site links. The Registration option opens the Altova Licensing Manager, which contains the licensing information for all of Altova products.


UModel Programmer's Reference

UModel as an Automation Server

UModel is an Automation Server. That is, it is an application that exposes programmable objects to other applications (called Automation Clients). As a result, an Automation Client can directly access the objects and functionality that the Automation Server makes available. This is beneficial to an Automation Client because it can make use of the functionality of UModel. For example, an Automation Client can use the reverse engineering functionality of UModel. Developers can therefore improve their applications by using the ready-made functionality of UModel.

The programmable objects of UModel are made available to Automation Clients via the UModel API, which is a COM API. The object model of the API and a complete description of all available objects are provided in this documentation (see the section UModelAPI).

Execution environments

The Application API can be accessed from within the following environments:

· Scripting Editor
· IDE Plug-ins
· External programs

Each of these environments is described briefly below.

Scripting Editor: Customizing and modifying UModel functionality

You can customize your installation of UModel by modifying and adding functionality to it. You can also create Forms for user input and modify the user interface so that it contains new menu commands and toolbar shortcuts. All these features are achieved by writing scripts that interact with objects of the Application API. To aid you in carrying out these tasks efficiently, UModel offers you an in-built Scripting Editor. A complete description of the functionality available in the Scripting Editor and how it is to be used is given in the Scripting Editor section of this documentation. The supported programming languages are JScript and VBScript.

IDE Plug-ins: Creating plug-ins for UModel

UModel enables you to create your own plug-ins and integrate them into UModel. You can do this using UModel's special interface for plug-ins. A description of how to create plug-ins is given in the section IDE Plug-ins.

An application object gets passed to most methods that must be implemented by an IDE plug-in and gets called by the application. Typical languages used to implement an IDE plug-in are C# and C++. For more information, see the section IDE Plugins.

External programs

Additionally, you can manipulate UModel with external scripts. For example, you could write a script to open UModel at a given time, then open a UModel project generate UML documention , and print it out. External scripts would again make use of the Application API to carry out these tasks. For a description of the Application API, see the section Application API .

Using the Application API from outside UModel requires an instance of UModel to be started first. How this is done depends on the programming language used. See the section, Programming Languages, for information about individual languages.

Essentially, UModel will be started via its COM registration. Then the Application object associated with the UModel instance is returned. Depending on the COM settings, an object associated with an already running UModel can be returned. Any programming language that supports creation and invocation of COM objects can be used. The most common of these are listed below.

· JScript and VBScript script files have a simple syntax and are designed to access COM objects. They can be run directly from a DOS command line or with a double click on Windows Explorer. They are best used for simple automation tasks.
· C# is a a full-fledged programming language that has a wide range of existing functionality. Access to COM objects can be automatically wrapped using C#..
· Java: Altova products come with native Java classes that wrap the Application API and provide a full Java look-and-feel.
· Other programming languages that make useful alternatives are: Visual Basic for Applications, Perl, and Python.

About UModel Programmers' Reference

The documentation contained in the Programmers' Reference for UModel consists of the following sections:

· Release Notes, which lists changes since the previous version
· Scripting: a user reference for the Scripting Environment available in UModel
· IDE Plug-ins: a description of how to create plug-ins for UModel
· UModelAPI: a reference for the UModel API


Release Notes

For each release of the UModel API, important changes since the previous release are listed below.

A change in the major version of the type library (e.g. 1.0 => 2.0 => 3.0) means that non-scripting clients (e.g. IDE PlugIns written in C#, VB.NET, C++,...) should be recompiled.

Automation Interface for UModel 2013 - type library version 5.0

Changes since the previous release (UModel 2012 - type library version 4.1) are as follows:

UModel API

· IDocument has a new method GenerateSequenceDiagramsForAllOperations

UModel API - UMLData

· ENUMExportXMIType has a new entry for UML2.4 (eXMI24ForUML24).
· ENUMUMLGuiTextLabelKind has a new literal eTextLabel_DotNetPropertyName
· ENUMUMLPredefinedElement has new literals for SysML 1.2.
· IUMLGuiSequenceDiagram has new properties UseForForwardEngineering and CodeOperation regarding code generation.
· IUMLExecutionEvent, IUMLCreationEvent, IUMLDestructionEvent, IUMLSendOperationEvent, IUMLSendSignalEvent, IUMLReceiveOperationEvent and IUMLReceiveSignalEvent have been removed since the corresponding classes are not part of UML2.4 anymore.

Automation Interface for UModel 2012 - type library version 4.1

Changes since the previous release (UModel 2011r3 - type library version 4.0) are as follows:

· For model transformations, IModelTransformationDlg, IModelTransformationTypeMappings and IModelTransformationTypeMapping have been introduced. IDocument has a new method ModelTransformation.
· ILocalOptionsView has a new property EnableSnapLines.

UModel API - UMLData

· ENUMCodeLang has a new literal eCodeLang_UML.
· ENUMUMLPredefinedElement has several new literals for model transformations.

Automation Interface for UModel 2011r3 - type library version 4.0

Changes since the previous release (UModel 2011r2 - type library version 3.2) are as follows:

UModel API

· ILocalOptionsDiagramEditing has new properties UseDotNetPropertyCompartment and ShowDotNetPropertyCompartment for the handling of .NET properties.
· IDialog has new properties Application and Parent
· IImportSourceDlg has got new properties Content_UseDotNetPropertyCompartment and Content_ShowDotNetPropertyCompartment for the handling of .NET properties.

UModel API - UMLData

· Property BehaviorSpecification can be set for IUMLBehavior
· ENUMUMLGuiStyleKind has a new literal eUMLGuiStyle_ShowDotNetPropertyCompartment for the handling of .NET properties

Automation Interface for UModel 2011r2 - type library version 3.2

Changes since the previous release (UModel 2011 - type library version 3.1) are as follows:

UModel API

· For state machine code generation, IGenerateStateMachineCodeDlg has been introduced and IDocument has got method GenerateStateMachineCode.
· IGenerateDocumentationDlg has new properties UseFixedDesign and SPSFile for SPS documentation generation; a new property Include_IncludedPredefinedSubprojects and a new method Fonts_SetDefaults.
· ENUMDocumentationOutputFormat has got a new literal for documentation generation in PDF format
· ENUMUMLPredefinedElement has several new literals for BPMN2 support

UModel API - UMLData

· IUMLGuiBPMN2Diagram, IUMLGuiBPMN2ChoreographyDiagram and IUMLGuiBPMN2CollaborationDiagram haven been introduced for BPMN2

Automation Interface for UModel 2011 - type library version 3.1

Changes since the previous release (UModel 2010r3 - type library version 3.0) are as follows:

UModel API

· IImportDatabaseDlg has been introduced for importing databases.
· IDocument has new methods ImportDatabase for importing databases and MergeProject3Way for 3-way project merges

UModel API - UMLData

· ENUMCodeLangVersion and ENUMUMLPredefinedElement have new literals for database support
· ENUMUMLDBDataSourceMethod has been introduced for database support

Automation Interface for UModel 2010r3 - type library version 3.0

Changes since the previous release (UModel 2010r2 - type library version 2.1) are as follows:

UModel API

· IGenerateSequenceDiagramDlg has property OperationIgnoreList to ignore distinct operations when generating a sequence diagram from source code.
· The IGenerateDocumentationDlg interface has the new property Details_Constraints.
· ENUMDiagramLayoutKind has a new entry for layout kind “Block”
· ENUMCodeLangVersion has a new entry for C# 4.0

UModel API - UMLData

· IUMLElement has method GetOwnedElementsOfKind to retrieve all owned elements of a specific kind.
· IUMLClass, IUMLEnumeration and IUMLInterface have method GetCodeFilePath to get the full code file path (also see GetCodeFileName which returns the file name only).
· IUMLInterface has property Protocol and method SetNewProtocol to reference a IUMLProtocolStateMachine.
· IUMLConstraint has new properties OwningTransition and OwningState.
· IUMLState has property StateInvariant and method SetNewStateInvariant.
· IUMLPort has a new property Protocol
· IUMLStructuredClassifier has method InsertOwnedPortAt.
· ENUMUMLPredefinedElement has several new literals for C# 4.0
· Additionally following new interfaces have been introduced: IUMLValueSpecificationAction, IUMLProtocolStateMachine, IUMLProtocolTransition, IUMLGuiProtocolStateMachineDiagram

Automation Interface for UModel 2010r2 - type library version 2.1

Changes since the previous release (UModel 2010 - type library version 2.0) are as follows:

UModel API

· IGenerateSequenceDiagramDlg has property SplitIntoSmallerDiagrams for the new sequence diagram split.

UModel API - UMLData

· ENUMExportXMIType has a new entry for UML2.3.
· IUMLAction has property IsLocallyReentrant.
· IUMLPort has property IsConjugated.
· Property ConnectorKind of IUMLConnector is now read only.
· IUMLClassifier has property IsFinalSpecialization.
· IUMLActivityGroup now derives from IUMLNamedElement.

Automation Interface for UModel 2010 - type library version 2.0

Changes since the previous release (UModel 2009 - type library version 1.0) are as follows:

UModel Plugins

· Support for ActiveX controls. Any IDE PlugIn which is also an ActiveX control will be displayed in a Dialog Control Bar inside UModel (also see ActiveX Controls or the StatisticsActiveX sample)

UModel API

· IApplication has property ServicePackVersion and method RunMacro to start a macro of an (already loaded) scripting project.
· IDocument has the new methods: SaveCopyAs, CanFocusUMLDataInModelTree, FocusUMLDataInModelTree, Reload.
· Property FocusedUMLDataNotifier of IDocument can be used to get the new _IFocusedUMLDataEvents interface for focus change events.
· Method OnModifiedFlagChanged of _IDocumentEvents has the IDocument interface as second parameter.
· The IDiagramWindow interface has following methods for auto-layout: Autolayout, AutolayoutSelection.
· The IProjectSettingsDlg interface has the new properties CSharp_ResolveAliases and VBasic_ResolveAliases.
· The IGenerateDocumentationDlg interface has the new properties EmbedCSSinHTML and CreateFolderForDiagrams.
· ILocalOptionsCodeEngineering has following new properties: CodeFromModel_Indentation_InsertTabs, CodeFromModel_Indentation_InsertNSpaces.

UModel API - UMLData

· The new interface IUMLHyperlink2Model allows hyperlinks to model elements (in the Model Tree). IUMLNamedElement has got InsertOwnedHyperlink2ModelAt, IUMLGuiTextHyperlink has SetHyperlinkModelElementAddress to set links to model elements.
· IUMLCommentTextHyperlink is new and enables hyperlinks for IUMLComments (also see How to create and use Hyperlinks). IUMLComment is extended by InsertOwnedCommentTextHyperlinkAt and OwnedHyperlinks to insert and access these hyperlinks.
· In the same way IUMLGuiDiagram has been extended by InsertOwnedGuiTextHyperlinkAt and OwnedHyperlinks.
· The IUMLElement interface has the properties OwnedDocComment and OwnedDocCommentBody to directly access the body of the comment, which is shown in the documentation window when the element is focused.
· IUMLGuiDiagram has a method AddUMLGuiContainmentLink to insert containment lines on diagrams.
· ENUMUMLGuiTextLabelKind has the new literal eTextLabel_InformationFlow.
· ENUMUMLPredefinedElement has new literals for XSD datatypes and the SysML profile.
· Additionally, following new interfaces have been added: IUMLInformationFlow, IUMLGuiContainmentLink, IUMLGuiSysMLActivityDiagram, IUMLGuiSysMLBlockDefinitionDiagram, IUMLGuiSysMLInternalBlockDiagram, IUMLGuiSysMLPackageDiagram, IUMLGuiSysMLParametricDiagram, IUMLGuiSysMLRequirementDiagram, IUMLGuiSysMLSequenceDiagram, IUMLGuiSysMLStateMachineDiagram, IUMLGuiSysMLUseCaseDiagram


Appendices

These appendices contain technical information about UModel and important licensing information.

License Information

· Electronic software distribution
· Copyrights
· End User License Agreement

Previous Top