IBM Support What's New?

After a UML-to-Java transformation, the enumeration is not fully qualified in an operation's parameter list

Technote (troubleshooting)


In IBM Rational Software Architect, if you have a UML class with operations whose parameters are of different enumeration types that have the same name, the enumeration within the parameter list will not be qualified.


The following steps reproduce the problem:

  1. Create a Java project and UML model

  2. Add a package, Package1, two classes, Class1 and Class2, two interfaces, Interface1 and Interface2, and a class diagram to the model

  3. Draw an interface realization relationship from Class1 to Interface1 and from Class2 to Interface2

  4. Add two operations, Operation1 and Operation2, and an enumeration, Enumeration1, to Interface1

  5. Add two enumeration literals, ONE and TWO, to Interface1::Enumeration1

  6. Add an operation, Operation2, and an enumeration, Enumeration1, to Interface2

  7. Add two enumeration literals, A and B, to Interface2::Enumeration1

  8. Add an In parameter, Parameter1, to Interface1::Operation1, Interface1::Operation2, and Interface2::Operation2

  9. Give Interface1::Operation1::Parameter1, Interface1::Operation2::Parameter1, and Interface2::Operation2::Parameter1 the types, Interface1::Enumeration1, Interface2::Enumeration1, and Interface2::Enumeration1, respectively

  10. Save the changes and add a UML-to-Java transformation configuration with the model as the source and the project as the target

  11. Run the transformation and examine the Java code

    Expected Result: The signature from Class1::Operation2 reads:
    public void Operation2(Package1.Interface2.Enumeration1 Parameter1)

    Actual Result: The signature from Class1::Operation reads:
     public void Operation2(Enumeration1 Parameter1)


This has been identified as a product defect under APAR PM74254.

Resolving the problem

Contact IBM Rational Client Support to request a testfix.

Cross reference information
Segment Product Component Platform Version Edition
Software Development Rational Software Architect for WebSphere Software Transformation Windows

Document information

More support for: Rational Software Architect

Software version:

Operating system(s): Windows

Reference #: 1617011

Modified date: 2012-11-12