Tuesday 29 October 2019

Rational Rhapsody Tip #68 - Installing the Rhapsody integration for RTC plugin (Intermediate)

The IBM Rational Rhapsody integration for Rational Team Concert plugin is installed into the RTC Eclipse client to enable a direct and supported integration between RTC or Rhapsody Model Manager project and IBM Rational Rhapsody. This short tips and tricks video shows you how to install it.

Check out the help here:

Wednesday 23 October 2019

Rational Rhapsody Tip #67 - What are implicit classes? (Intermediate)

In this short tips and tricks video for IBM Rational Rhapsody I give an overview of how objects in Rhapsody can be used for modeling software or systems architectures without using classes. I then compare this with the benefits of using classes. The key thing is that if you create an object in Rhapsody that is not typed, then it can support all the concepts that a class can. It does this by creating an implicit class under-the-hood, but just showing the object in the browser. The key reason you expose classes is where you need to enable re-use, or a separation of concern between the definition of an element and its usage. This is why I tend to recommend always using classes (in UML), or blocks (in SysML), if you can. It means you can have a consistent approach that copes with the future.

Rhapsody creates an implicit class under-the-hood whenever you create an untyped Object. This enables Objects to have ports and statecharts. They can also have operations and attributes.

This is the basis of Rhapsody in C's optional File rather than Class-based mapping to the C programming language. A File in Rhapsody in C is a type of Object where the attributes and operations are mapped to variables and functions in .h/.c files.

Using only objects you can created nested hierarchies to visual a software or system architecture. The implicit class under the hood enables you to exploit composite structure notation with ports, parts and connectors without needing to expose classes in the browser.

There are good reasons, however, to expose classes. The main reason is to enable re-use of the underlying classes features in a different context. Suppose, for example, that you want to do represent a Function block that has inputs, outputs and requirements, but is used by two different features. Well, by exposing the class you can re-use the function in a different composite structure.

Two parts are now typed by the same class. The visual representation of each part (it's operations, attributes, statecharts and ports etc) are defined by the class.

A flatter browser results when you do this and it also means that you can move classes/blocks that define the properties of an element to a different package in the model from the classes that use them. This can assist with re-use of library functions/blocks/classes, or the creation of blocks/classes by different users than the modeler who is using them.

Of course, the user now needs to be aware of the different between objects/parts and classes in UML. Note: A part is the name given to an object that is declared in the context of another class, and is the basis of component-based design in UML (and SysML).

Connectors and links are used in a composite structure to wire together parts. They are created in the context of the owning class. These work when both implicit and explicit classes are used because the connector is a link between parts/objects, rather than classes.

One hundred and seventy eight - 178

I've got a break of work, so I've been looking at my statistics for the year so far. 178 is the number of different people I've trained this year on Rhapsody. This is detailed 'nuts-and-bolts of the tool/language' with hands-on labs (rather than fluffy UML 'look how pretty these boxes and ellipses') training.

A few things I'm looking at are:
a) Offering web-based public training on a regular cycle (1 per quarter).
b) Offering SysML for automotive software architecture, looking at key adaptations to automotive market segment for 26262 and A-SPICE.

p.s. My latest training adds an optional day that combines C++ or C code generation with the use of RMM for storing the models and DNG for linking to requirements as external artefacts in the Rhapsody browser.

Monday 7 October 2019

Rational Rhapsody Tip #66 - What are .hep files used for? (Intermediate)

.hep files are IBM Rational Rhapsody helper files. They are used to extend Rhapsody's menus and usually associated with profiles. Many of Rhapsody's standard profiles use .hep files to add additional menus when the profile is present. This video illustrates a couple that are part of Rhapsody's factory SysML profile.

Hep files can invoke a Java plugin that runs in process, or alternatively they can invoke an external Java application. This extract from the SysML.hep shows an example of how a helper file can load a Java plugin

The plugin is associated with a name and the name is then associated with new context menu commands. For example, a Create Swimlanes From Parts command is added to the right-click menu for Activity Diagrams.

Here's an example of the results. In this instance the Java extension is running as a plugin. This means that it's running in the JRE loaded into the Rhapsody process.

It's also possible to get a helper file to invoke a Java application that is a separate from Rhapsody. In this instance you may need to provide additional arguments to tell it what libraries and classpaths to use.

The Elaborate Connector Via Ports... command added by the SysML.hep is an example of invoking an external application. In this instance a separate Java application is launched, with a separate GUI, to provide the extended functionality.

By convention, if a profile has a hep file with the same name, then the helper file will be loaded when the profile is loaded. For example, the SysML.sbs has a SysML.hep file in the same folder. Another way to get a helper file to load is using the General::Model::HelpersFile property.

That said, associating a .hep file with a profile is often the best way because you can bring in other extensions at the same time, such as stereotypes, tags, and Rhapsody properties or property files.

This Create Use Case package structure command is an example from a profile that I wrote called the ExecutableMBSEProfile (which is one of the optional profiles in my open source SysMLHelper project). It adds menus to accelerate an MBSE method based on use case analysis to define system requirements

As well as creating the model structure, it also creates to triggers in Rhapsody. For example, automatically moving requirements created in the use case diagrams package into a separate requirements package.

Finally, there are other properties that can be used to associated .hep files with models or profiles. If you have more than one .hep file that you want your profile to load then you could use the General::Model::AdditionalHelperFiles property.