Topic
  • 6 replies
  • Latest Post - ‏2013-01-21T10:56:31Z by MartinHansson
MartinHansson
MartinHansson
59 Posts

Pinned topic How do I clean up unresolved elements?

‏2013-01-18T10:32:03Z |
We have tons (hundreds or thousands) of unresolved elements in our models after several years of use with files being write protected due to CM.

Is there an "easy" way to clean the models? I tried running a simple Java helper using the cleanUnresolvedElements operation but it doesn't seem to do anything.

I used this in my script:
rpApp = RhapsodyAppServer.getActiveRhapsodyApplication();
rpy = rpApp.activeProject();
rpy.cleanUnresolvedElements(rpy);

The reason we want to do this is that we want to check to see if it has any performance impact when generating the code.
Updated on 2013-01-21T10:56:31Z at 2013-01-21T10:56:31Z by MartinHansson
  • ZvikaV.
    ZvikaV.
    16 Posts

    Re: How do I clean up unresolved elements?

    ‏2013-01-20T11:34:05Z  
    Hi,

    In general, this is the right way to do that.
    To understand what is the problem with your model, please attach it.
    If you prefer to send it to me directly, please send it to me to zvikaver@il.ibm.com

    Regards,
    Zvika.
  • MartinHansson
    MartinHansson
    59 Posts

    Re: How do I clean up unresolved elements?

    ‏2013-01-21T06:30:14Z  
    • ZvikaV.
    • ‏2013-01-20T11:34:05Z
    Hi,

    In general, this is the right way to do that.
    To understand what is the problem with your model, please attach it.
    If you prefer to send it to me directly, please send it to me to zvikaver@il.ibm.com

    Regards,
    Zvika.
    Thanks for the offer,

    Unfortunately I can't do that. It is proprietary code that I can't share with anyone outside our company.

    I will have a look again and see if the script failed in some way. Although it seems it is running (albeit a lot faster than I expected).
  • SystemAdmin
    SystemAdmin
    1305 Posts

    Re: How do I clean up unresolved elements?

    ‏2013-01-21T08:40:03Z  
    Thanks for the offer,

    Unfortunately I can't do that. It is proprietary code that I can't share with anyone outside our company.

    I will have a look again and see if the script failed in some way. Although it seems it is running (albeit a lot faster than I expected).
    I've a question to that... I understood that unresolved elements are elements which are used for instance in a diagram, but which are not defined in the model. Could be, because the definition package was removed.

    But if you do a clean-up for the unresolved elements - what will happen to them? They cannot simply be removed and also the definition cannot be created automatically. I would like to understand how it works.

    Sebastian
  • MartinHansson
    MartinHansson
    59 Posts

    Re: How do I clean up unresolved elements?

    ‏2013-01-21T08:46:39Z  
    I've a question to that... I understood that unresolved elements are elements which are used for instance in a diagram, but which are not defined in the model. Could be, because the definition package was removed.

    But if you do a clean-up for the unresolved elements - what will happen to them? They cannot simply be removed and also the definition cannot be created automatically. I would like to understand how it works.

    Sebastian
    Unresolved elements in this case is an element (class, type etc) that has been removed. However other parts of the model might still have a reference to these elements and since they are read only Rhapsody can't remove them at the time when the source was removed. The dependency is not neccesarily one that is visible. Not sure if it also works the other way around so that you get a "broken link" if you remove a dependency but the source is read only.

    If the dependency was need to generate/build the code this will be found and fixed but that is not always the case.
  • SystemAdmin
    SystemAdmin
    1305 Posts

    Re: How do I clean up unresolved elements?

    ‏2013-01-21T10:22:43Z  
    Unresolved elements in this case is an element (class, type etc) that has been removed. However other parts of the model might still have a reference to these elements and since they are read only Rhapsody can't remove them at the time when the source was removed. The dependency is not neccesarily one that is visible. Not sure if it also works the other way around so that you get a "broken link" if you remove a dependency but the source is read only.

    If the dependency was need to generate/build the code this will be found and fixed but that is not always the case.
    Hi,

    some may have seen this before but just in case, please read the published technote on removing unresolved elements.

    http://www-01.ibm.com/support/docview.wss?uid=swg21393534

    A.
  • MartinHansson
    MartinHansson
    59 Posts

    Re: How do I clean up unresolved elements?

    ‏2013-01-21T10:56:31Z  
    Hi,

    some may have seen this before but just in case, please read the published technote on removing unresolved elements.

    http://www-01.ibm.com/support/docview.wss?uid=swg21393534

    A.
    In my particular case I have seen that tech note. However with the amount of unresolved elements we have it is an impossible task to do them manually one by one.