Friday, 23 October 2020

IBM Engineering Rhapsody Tip #86 - The Parts Browser - a SysML profile feature (Intermediate)

I wanted to show how it's possible to create a custom requirement traceability browser in Rhapsody. First off, though, it's worth understanding the Parts Browser in Rhapsody; a feature added by Rhapsody's factory SysML profile. The parts browser allows you to launch a browser to drill down a Block/part hierarchy tree. The parts browser is available as a submenu on the right-click 'Browse Hierarchy' menu  The browser is formed using a context pattern which defines how to traverse relationships in the model to form the browser. In this short, caption-based (i.e. silent) video, I show how it works and then look at some of the properties behind it. In the next video in this series, I'll show how it's possible to use a similar technique to create a browser for showing requirements traceability.

Here's the transcript for those that need it:

This silent video shows the Parts Browser: a SysML profile-based example of Rhapsody's 'Browse Hierarchy' feature.

The Parts Browser is added by the SysML profile, so let's create a SysML project.

The right-click menu now has a Browse Hierarchy > Browse Parts submenu (added by the SysML profile) which launches a Browse Parts window.

Let's create some blocks and parts using a SysML Block Definition Diagram (BDD). Use of Directed Composition relationships on the BDD will define the parts.

In the normal browser the tree stops at parts and we have to right-click to navigate to their types. The parts browser, however, allows us to drill down recursively, e.g. the itsBlock_4 part is typed by block_4.

The tree is dynamic. We can drill down the complete block/part hierarchy.

So, how’s it done?

Well, like many things in Rhapsody, it's done using properties, in this case conveyed by the SysML profile. These 3 properties define the Browse Parts submenu name and pattern (for a Project).

The metaclass for a Block defines its submenu name and context pattern. This context pattern includes displaying attributes/operations contracted on the ports.

Let's create a port with an interface to illustrate.

Now, if we right-click a Block then the context pattern we saw earlier will come into play.

We can create our own custom browsers, if we wish. In the next video in this series, I'll show how to create a requirements traceability browser! ;-)

No comments:

Post a comment

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