IBM Support

Example of a BIRT report that lists the attributes of a DataType

Question & Answer


Question

How can you retrieve the attributes of a UML DataType using BIRT in IBM Rational Software Architect?

Cause

The attributes of a UML DataType are not of type Property (like the attributes of a UML Class). The attributes of a UML DataType are of type ExtensionEnd

Answer

The following steps describe how you can show the ExtensionEnds of UML data types in a BIRT report:

1. Create a new BIRT Report.
2. Create a new Data Source of type UML Model.
3. Create a new Data Set called ExtensionEnds using the Row Mapping:

Row Query Expression:
//ExtensionEnd
Row Query type:
uml:ExtensionEnd


4. Specify the Column Mapping as:

NameQueryType
name@nameString
ownerUrigetURI(./owner)String



5. Create a new data set called DataTypes using the Row Mapping:

Row Query Expression:
//DataType
Row Query Type:
uml:DataType


6. Specify the Column Mapping as:

NameQueryType
name@nameString
urigetURI(.)String


7. Create a new Joint Data Set called DataTypesWithExtensionEnds

8. Reference the two data sets previously created: DataTypes and ExtensionEnds
9. Select: Inner Join
10. Select DataTypes::uri and ExtensionEnds::ownerUri as join columns:


11. Add a new Table on the report surface

12. Bind the table to the data set DataTypesWithExtensionEnds


13. Add the columns DataTypes::name and ExtensionEnds::name to the table:


14. Preview the report. It will show something like this:


A sample model with the above report created in Rational Software Architect 8.0.4.1 is attached to this document.

[{"Product":{"code":"SSYK2S","label":"Rational Software Architect Designer"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Reports","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.5;8.0.4.1;8.0.4;8.0.3;8.0.2;8.0.1;8.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Reports","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.4.1;8.5","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}}]

Document Information

Modified date:
10 September 2020

UID

swg21617025