Sunday, 26 July 2026

IBM Engineering Rhapsody Tip #111 - Rhapsody 10 and fixing SysMLHelper example

One for more advanced Rhapsody users this one. This video is a thought a little look behind the scenes, showing I fix I needed to make to the open-source SysMLHelper I have on GitHub to get my Executable MBSE Profile to work with Rhapsody 10.0.3. It's for the Rhapsody geeks perhaps, but then I do think the metamodeling profile that I use is pretty handy. A bit of a drop-off in Cameo SysML/UAF training for me, but I have had some flair-ups in interest in the Executable MBSE Profile helper over the last year. There has been a bit more interest in Rhapsody and a pick-up in interest in executable systems modeling hence been exploring Rhapsody 10.0.3 more recently.


Here's the transcript:

Hello, welcome to my video 111 on the currently owned by IBM, SysML/UML2 tool, called Rhapsody. 

I've been testing Rhapsody 10 with one of my open source profiles called the Executable MBSE Profile. There is still life in the old dog, perhaps, and that's not just the tool. This is 10.0.3 which was released in April 2026. As you can see Rhapsody 10 has a new Visual Studio dock able windows style user interface.

As you can see most of it works fine, but I did find an issue with my new term activity diagram called Textual Activity, When you draw a control flow, it wants Transition in the aggregates list for the diagram stereotype.  This stereotype is the profile. Most things in Rhapsody are controllable through properties, there are thousands of them, but these are the overridden properties for my profile's Textual Activity stereotype, including the aggregates property that controls the ownership in the browser, which is giving us this problem in Rhapsody 10.

The profile itself is read-only here, as it's been copied into the Profiles folder, so that it can be added by reference to multiple models.

One of the great things about Rhapsody is its upward compatibility and also the stability of its Java API for writing plugins, hence in this video I'm going to walk through the steps I have taken to update the profile to fix the issue. This will also highlight its open source nature/ As you can see here, it is in GitHub, and part of an assembly of profiles called the SysMLHelper.

--------

The version of the Executable MBSE Profile I'm going to fix for Rhapsody 10 is in the 4.3.h.Release of the SysML Helper.

Now a nuance here is that the Rhapsody version I'm using to maintain the profile's file format is 8.3.1, a conscious decision I took, as this was a highly stable version after Rhapsody moved to an xml-based file format for storing units. 

This means that the profile format can be read by versions of Rhapsody, 8.3.1 and above, including version 10. This is one advantages of maintaining my own profile outside of a Rhapsody release cycle. We can use it with older versions, if we want.


I'm actually cloning the GitHub profile directly into my Profiles folder of my 8.3.1 installation. The Share folder in 8.3.1 is stored in a read-write location, in this case by ProgramData folder as it was installed for all users.

--------

I'll start by launching Rhapsody 8.3.1 then. Although this is Windows 11, I was still able to make it work, although there were a few compatibility warnings during installation.

It doesn't really matter too much which edition I launch here, so I'll launch the Designer Edition of Rhapsody. 

I get the usual animation won't work warning as I also have Rhapsody 10 open, but that's not an issue. 

The Executable MBSE Profile is managed by a combination of a profile, stored in a Rhapsody project, and a Java plugin, developed using the free Eclipse IDE Java development environment.

I'll start by opening the project that has the profile in it therefore, and this is in the 8.3.1 Profiles folder I just did the Clone of the GitHub repository into.

Now the interesting thing about the ExecutableMBSE profile is that it has a lot of new term stereotypes and a lot of properties that need to be kept consistent, hence I moved to using a metamodel with a self-built java helper to do this, the project is therefore bigger than you think.

--------

With it now open, you can see that this is the same unit that was added by reference to my test project.

Here's is the new term stereotype Textual Activity that controls the toolbars for my activity diagram.

And the aggregates property that I want to update to contain the Transition metaclass.

--------

So, I'm not going to edit it directly. What I found when developing SysML language extensions using new term stereotypes, is that the larger the profile, the harder it is to maintain all the property value settings.

Initially I moved using Excel but then it got even harder, so I moved to using a metamodel created in Rhapsody, and I wrote a Java helper that reads the UML metamodel and updates all the property values for the associated stereotypes.

Composition is used to model ownership in the browser, and Add New menus, and aggregation is to uses to model the =drawing toolbar lists. I also use dependencies with stereotypes to set other properties, such as the target and source lists for new term relation types.

--------

Currently, as I don't customize any drawing toolbars with Transitions on them, they're not in the metamodel. 

Default Transitions are, however, so what I'll do is clone this to create a Transition metaclass.

If I then drag it on to the diagram and establish a directed composition to it, then this will cause it to be added to the Aggregates list of the owner.

I'll do a similar thing for the Call Operation Activity new term diagram type.

--------

The metamodeling profile and its associated Java plugin for updating the properties are included in the SysML Helper bundle we downloaded from GitHub.

Rather than run the property renderer from a right-click menu, I chose to do it from a table renderer.

So, when I double-click this table, the Java runs to query the profile metamodel and update all the properties in the stereotypes that are pointed to from the metamodel.

--------


If I inspect the property setting then I can see that the comma separated list now includes Transition. I'll have a look in Notepad as it's hard to see here.

--------

I usually look at my working tree differences in Git. Although you wouldn't normally edit the xml files directly, it's a good way of understanding the changes.

I could then do some testing. What I'm going to do is to copy the profile into the Profiles folder of my 10.0.3 Rhapsody installation.

I've got Rhapsody 10 closed and hence it won't have a lock on the units, so I'll delete the old folder and paste in the new version

I would need admin rights to do this with version 10, as I'm putting it in Profiles rather than UserProfiles.

--------

I'll then launch Rhapsody and open the project that I used to show the issue, initially.

Here I can test that the issue is fixed.

I'll also do some updates to the version numbering in the helper, so that I can release a new version with new timestamp.

As you can see the source code is present in the SysMLHelper package and I can import a project into an Eclipse workspace.

To get the project to compile I am just going to fix the build properties so they point at a Rhapsody API Jar file.

I'll also fix the native Library Folder Configuration location.

There are some other problems here, however, they are expected.

I have some CSV example import code that uses the Apache POI library. It's not used, however.

The Executable MBSE and Metamodeling profile do not use or require any 3rd party jar files, partly for security  and distribution reasons. 

--------

This bit is slightly clunky, I recognise there may be better ways of doing it, but I'll show what I do anyway.

I am going to create a 4.3.i.Release.

I use a correspondling named Text file in the profile, as both a versionmarker file and change log, hence I've changed its name.

As you can see the SysMLHelper profile is now over 10 years old, hence there's a lot of development here, but also a lot of iterative changes.

This change is going to be change 0874, hence I'll add it to the log here and give it a short description.

I'll then copy the description and add use it in the commit to Git.

There's also a few configuration files to update.

--------

In the profile itself, I also use tags on this Profile Info stereotype to record both the version and timestamp information.

This is used by the Java code to compare with tag information stored in models that use the profile, so that users who open up a project created with a newer version of the profile, are warned to upgrade.

Ok, so, I've now updated the profile.

I'll just do a final test to make sure the version info is appearing correctly when I open up a project that was created with an earlier version version of the profile.

--------

Here we can see that the plugin has given some information in the output window to tell me that I might want to run the set-up project properties command to apply some updates to the project.

This command is in the MBSE Method: Others submenu.

When you run it, you can see that the tags on the project are updated to align with the tag values in the profile. 

If users open this project and have an earlier version of the profile, then they would get a warning in the output window telling them to also upgrade the profile.

I'll just do a final sanity check that the fix I applied is still working.

I'll then commit and push the change to GitHub. I'll use the change line number and comment in the commit.

If I go back to GitHub, we can see the change comments have come through. Periodically, I'd then create a new release.

This may not be the most professional use of all the GitHub features, but it does the job for me as a single developer. 

Periodically, I'd then create a new release, and post the info also to my www.executablembse.com blog site.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.