Skip to Content

PowerDesigner: Unique IDs for RQMs

Hi,

We have a set of requirement models (RQMs), several colleagues are working on these models simultaneously. Therefore, it is important that we label each requirement with a fixed ID which is unique throughout all the RQMs.

Is there a way to achieve this in PD?

We had the following idea:

  1. Create a custom ID-table in the repository using SQL, which contains IDs
  2. Create an event handler which, for example after saving the model, lists all the new requirements
  3. For each new requirement, generate a new ID incrementing the latest ID in the ID-table, set the requirement’s ID and add the ID to the ID-table

This way, the IDs would be unique throughout all RQMs. The problem is that this would require every user has an ODBC connection to the DB since he needs to run SQL commands. Since we are using a proxy, this constitutes a problem.

Consequently, we have the following questions:

  • Is there a way to generate unique IDs for Requirements? Since the objects’ permanent-IDs are obviously unique in the repository, perhaps there is a way to use a similar strategy. In our opinion, there should be a way to generate unique IDs in PD, since it is otherwise veyr difficult to work on models simultaneously.
  • Is there a way to execute SQL commands via a proxy connection?
  • Is there a way to access the objects’ Permanent-IDs before the objects have been checked-in to the repository? Or are they generated during check-in?

Kind regards,

Milan

Add comment
10|10000 characters needed characters exceeded

  • If necessary, there is a PD function that allows you to generate another unique ID -

    NewGUID()

    (this might be useful if you want an ID that can survive "save as new model" or generating a new RQM, both of which cause new object IDs to be created)

  • Hi Milan,

    there is no need to create anything new. You can use unique ObjectID attribute, which is assigned to any object in PowerDesigner during its creation. By script, you can access it in your current RQM model like this:

    For each req in Activemodel.Requirements
      output req.ObjectID
    Next

    And you can customize your model by Extension to display this unique ObjectID on the General tab in the properties of any Requirement. If you need more information, you can send me an email (available in my profile).

    Regards,

    Ondrej

  • Get RSS Feed

1 Answer

  • Oct 10 at 10:33 AM

    Hi Ondrej,

    Thanks for your reply!

    Is the Object-ID unique in the repository? We also considered using the Object-ID, but we aren't sure about two things:

    - If two people are working offline on two requirements, is it possible that the same Object-ID is generated? Or are they hashed in a way that they are by definition always unique?

    - If I open a new branch, or if I integrate a requirement into another branch, does it still have the same Object-ID? I thought that the object's permanent-ID (POID) is constant if you have the same object in different branches, but the object-ID depends on the branch the object is located in. Or is this not correct?

    Thanks and kind regards,

    Milan

    Add comment
    10|10000 characters needed characters exceeded

    • Object IDs are unique, and they do not change, as long as it's the same object in the same model. Every version of an object will have the same object ID - that's how PD knows for certain that it's the same object