IBM Support

PI17055: Adding links to collaboration diagrams using the Java API results Rhapsody Runtime Exception

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When trying to add the corresponding GraphElements to a new
    Collaboration Diagram, it is not possible to add Links between
    objects on the diagram in IBM Rational Rhapsody.
    
    
    SYMPTOM
    
    The full error message is:
    
    Exception in thread 'main'
    com.telelogic.rhapsody.core.RhapsodyRuntimeException:
     at
    com.telelogic.rhapsody.core.RPDiagram.AddNewEdgeForElementNative
    (Native
    Method)
     at
    com.telelogic.rhapsody.core.RPDiagram.addNewEdgeForElement(Unkno
    wn
    Source)
     at process.main(process.java:34)
    
    
    Steps to reproduce:
    
    1. Create an empty project.
    
    2. Run the following code on an empty project:
    
            IRPApplication app =
    RhapsodyAppServer.getActiveRhapsodyApplication();
    
            IRPPackage pkg =
    app.activeProject().addPackage('CollaborationPkg');
            IRPCollaborationDiagram col =
    pkg.addCollaborationDiagram('Collab');
    
            IRPClass DishwasherClass =
    (IRPClass)pkg.addNewAggr('Class', 'Dishwasher');
            IRPClass JetClass = (IRPClass)pkg.addNewAggr('Class',
    'Jet');
    
            // Next we add an object to the diagram for each class.
    We specify the class as the classifierRole.
            IRPGraphNode DWNode =
    col.addNewNodeForElement(DishwasherClass, 500, 100, 200, 100);
    
            IRPGraphNode JNode = col.addNewNodeForElement(JetClass,
    500, 500, 200, 100);
    
            IRPRelation rel = DishwasherClass.addRelation('Jet',
    'CollaborationPkg', '', 'Association', '1', '', 'Association',
    '1', '');
            IRPClass aRole =
    (IRPClass)pkg.addAssociation(rel.getInverse(), rel,
    'itsDishwasher_itsJet');
    
            IRPGraphEdge JEdge = col.addNewEdgeForElement(aRole,
    DWNode, 500, 100, JNode, 500, 500);
    
            col.openDiagram();
    
    Expected Result:
    
    Both Objects and Links should have corresponding GraphElements.
    
    Actual Result:
    
    - The code fails on the second from last line with the
    addNewEdgeForElement
      method.
    
    - Links do not have corresponding GraphElements.
    
    - Unable to create Collaboration diagrams IBM Rational Rhapsody
    using the
      API.
    
    
    ENVIRONMENT
    
    All.
    
    
    WORKAROUND
    
    No workaround available.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Adding links to collaboration diagrams using the Java API
    results Rhapsody Runtime Exception
    

Problem conclusion

  • Fixed in 8.1.1
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI17055

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    806

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-04-30

  • Closed date

    2014-09-11

  • Last modified date

    2014-09-11

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TLOGIC RHAPSODY

  • Fixed component ID

    5724V74RP

Applicable component levels

  • R806 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.6","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
11 September 2014