IBM Support

Organization of Rational Rhapsody RPE Schema to address different Types

Question & Answer


Question

How is the IBM Rational Rhapsody Schema organized to address different types?

Cause

New types might include New terms as well.

Answer

The complexity of the Rhapsody model is increased with the fact that it allows creation of New Terms.

To cater to this increased complexity a generic approach is needed.

APPROACH 01 : Reach a common type and cast it to specific type

This approach is to use Common Types to get to a more Generic/Base Type and then use a Casting to filter the Specific/Concrete Type.

This approach is not much different from what was prevalent with COM API as well. An example with COM/Java API which clarifies this approach is the use of interface IRPState which provides a substates to iterate over states. User can then perform a cast to get the right concrete type.

Even Reporter Plus employs this same approach where you can see that Actions, SendActions, SubActivity are all of the same metaClass named State, however their StateType is State, EventState and SubActivity respectively. The stateType distinguishes them from each other. The ObjectFlow, ControlFlow are again of same metaClass named Transition. Here the userDefinedMetaClass distinguishes them from each other.

  • TIP 01 : The metaClass of the element in Reporter Plus can give an indication of possible common type in the RPE schema.

  • TIP 02 : Casting from a common type to a concrete type can be achieved using the CAST operator provided by RPE.

Note: It is still not documented as to what common type contains what other concrete types.



APPROACH 02 : Use the containers along with Filters

Every diagram has a containedElements node except for Statechart and Activity Diagrams. So iterating over Contained Elements with filter set to particular metaclass example "metaClass=Object" will extract the required information.

[{"Product":{"code":"SSUBFB","label":"IBM Engineering Lifecycle Optimization - Publishing"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"1.1.2","Edition":"All Editions","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.2.1;7.5.3;7.5.3.1;7.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody;Rational Publishing Engine

Document Information

Modified date:
27 May 2022

UID

swg21507945