It's all about the answers!

Ask a question

A unique identifier for rhapsody model elements


Madhusudhan Acharya (134) | asked Dec 02 '22, 7:02 a.m.

Hello,


I need to assign a unique id(As property) for any newly created rhapsody model elements. Is there any rhapsody generated id I can use?

I'm thinking about using the RMM server id(Element id). Is it safe? Is there a chance of this id getting changed later?

Thanks,
Madhu

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Jan 04 '23, 3:05 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

If you create a new model element, and then look in the Rhapsody file that contains it. You'll notice two IDs.
One is a Rhapsody generated GUID. Ex: "GUID 91cfe3f9-534e-4ab2-8426-819865ffdc6e". The Rhapsody client will assign a GUID to any newly created model element. It will not change (even if the model element moves around in the model).
(See this on how to force change a GUID if 'copying' models however: link)

When a model project is RMM enabled, it also gets assigned a RMM server ID. This ID is also constant and is expected to map to a GUID (and remains the same even if the model element gets moved around in the model itself).

This RMM server ID is much more human readable however (similar to work item IDs). Ex: 1015876.
This ID is also shown in the URL when viewing the model element in the RMM web-ui for example.

Example URL:
https://HOST:9443/ccm/web/projects/ProjectA#action=com.ibm.team.rmm.designs.viewResource&resourceUri=https%3A%2F%2FHOST%3A9443%2Fccm%2Fresource-rmm%2F1015876&oslc_config.context=https%3A%2F%2FHOST%3A9443%2Fccm%2Frtcoslc%2Fscm%2Fconfig%2Fs%2F_bV7-MYsrEe2CQcNgz1Kzcw

Note: There is some rare exception where model elements created in the past (ex: RMM 6.x timeframe) may have the same RMM ID (i.e. two different GUIDs with the same RMM ID). This is a rare scenario, and often prevents change set delivery. To fix this, a user would have to run Java API (RhapsodyModelManagerDataValidation) on the Rhapsody client to repair conflicting RMM IDs. This will update the files on disk with the new IDs which can then be checked-in and delivered. (instructions here: link)

Madhusudhan Acharya selected this answer as the correct answer

Comments
Madhusudhan Acharya commented Mar 29 '23, 5:56 a.m.

Thanks for your explanation, David.


After some consideration, we have deicided to use the combination of GUID and RMM server id.

RMM server id at the front end because it's more human readable and GUID for automation purposes.  

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.