Work smarter with #PowerDesigner – adding a sub-Requirements tab in the RQM

The PowerDesigner Requirements Model (RQM) is a powerful tool for managing requirements, or anything else you want to keep track of that has a hierarchical structure but doesn’t fit well with any of the other PowerDesigner Models.

For example, take a look at a sample RQM supplied by SAP, in the WebLibrary project, which is usually installed at “C:\Program Files\SAP\PowerDesigner 16\Examples\WebLibrary\WebLibrary.prj“. Here we can see a simple hierarchy of Requirements in the Browser:01 WebLibrary RQM - browser

The same hierarchy is also visible in a Requirements Document view, like this one:02 WebLibrary RQM - requirements document view

However, when I’m editing a Requirement via the properties dialogue, I can’t see a list of sub-Requirements. That means I have to use the Browser or a Requirements Document View to work on the sub-Requirements. Most of the time, I’d like to work in a spreadsheet-like view, the same as in any other type of model in PowerDesigner, like this list of Columns in a Table:

List of Columns

I can’t access a list of Requirements via the Model menu, so it doesn’t look like I can use my favourite editing approach – or can I?

The answer is that I can work on such a list – with a very simple model extension, I can add a ‘Sub-Requirements’ tab to the Requirement editor, like this one:

03 WebLibrary RQM - sub-reqs tab

Like any other list of objects in PowerDesigner, I can filter this list, edit single entries, edit multiple entries, change the sequence, and create new entries.

So, how is this possible? Simple, I exposed the existing collection of sub-Requirements on the new tab, by creating a new Form in a model extension.

04 Model Extension

This isn’t the place for detailed instructions for creating an extension, so I’ll limit this to a few pointers for you:

  • “Requirement” is a Metaclass
  • You can call the Form anything you like
  • “Requirements” is a Collection, not an Attribute

There are probably other areas in PowerDesigner where this technique is useful, let me know if you find one.

Advertisements

Work smarter with #PowerDesigner – How to display a ‘Relationships’ tab for entities

Data modelling tools vary in the kinds of dependencies that you can create between objects. For example, they all recognise that entities in a Conceptual or Logical Data Model (CDM or LDM) can participate in Relationships – when you view or edit the properties of an entity most (perhaps all) tools will show you a list of relationships as part of the dialogue. They might also show you other dependencies, such as a list of diagrams the entity appears on, a list of related tables in Physical Data Models, or some Data Lineage or other mappings. With most tools, that’s the limit. PowerDesigner goes beyond these basic modelling and development connections, allowing you to create several other different types of dependencies:

  • shortcuts – the entity is used in another model, but cannot be amended
  • replications – the entity is used in another model, and can be amended, subject to limitations
  • traceability links – the entity can be connected to virtually anything else in any type of model, if it makes sense to you
  • related diagrams – the entity can be connected to a diagram in any type of model, if it makes sense to you
  • extended collections – using a model extension, you can create your own links between entities and other objects

One side-effect of this power and flexibility is the impact on the entity properties dialogue – most of these dependencies are all shown on the same tab. In the example below, the Contribution entity participates in four relationships, listed on a sub-tab; I can see that the entity also appears on at least one Diagram (indicated by the presence of the Diagrams sub-tab). There could be more tabs, if the entity has other types of dependencies.

dependencies

If you’re used to other data modelling tools, you might prefer to see relationships listed in a tab of their own. Well, with a little work, you can add that tab for yourself; you just need a simple model extension.

You create or use Model Extensions to change the way that PowerDesigner works, usually by adding additional metadata, or additional features such as imports, exports, and new object properties. In this example, we’re not adding a new feature, merely exposing some metadata – the Relationships collection – that already exists.

You may already have one or more extensions attached to your model, such as the Excel Import extension, but I’ll assume that you don’t.

  • On the Model menu, select Extensions
  • Create a new entry in the list – just type the name – then click on OKadd extension
  • The new extension will appear in the Browser

extension in Browser

  • Double-click the extension to open it, then right-click Profile, and add the Entity metaclass to the extension

 

  • Add a new Form to the metaclass, call it Relationships

add form

  • Add the Relationships collection to the Form, then close the extension editor
  • Here’s the new tab

the new tab

It’s possible to add more than one collection to a Form, plus lots of other things; I’ll cover these in future tips.