The User Interface Generator, a component of the IBM® InfoSphere Master Data Management (MDM) Workbench, helps you to quickly construct a Unified Modeling Language (UML) user model. Once complete, the user model can be used to generate a full Web application. The User Interface Generator provides several extensions to Rational Software Architect, allowing you to easily create a user model with only minimal knowledge of UML techniques. This article introduces the extensions, and shows how you can use them to quickly construct a valid UML user model. In the example in this article, you will:
- Use the extensions to create a simple user model for a fictitious publishing organization.
- Create objects that will represent articles within the publishing house.
- Model the roles that define who manages these objects, and the goals that must be met by executing tasks on these objects.
To fully follow along with the example in this article, it is assumed that you have installed Rational Software Architect™ (RSA) version 7.0.0.5 or greater and the User Interface Generator tooling.
As mentioned previously in the "Modeling demystified" series, elements in a user model are denoted using UML stereotypes, such as «user_object» (applied to classes) and «primary_goal» (applied to properties). The user modeling tooling offers all the stereotypes grouped in the form of a UML profile, aptly called the User Modeling Profile. Because of this grouping, any user model you build must have this profile applied. You can use RSA to apply the profile to a model manually (useful if you have existing models to which you wish to add user modeling entities), or you can create a new model with the profile preapplied.
Creating a user model from a template
To create a user model from a template:
- From the menu select File > New >
UML Model.
The New UML Wizard appears.
- Select to create a model from a Standard Template.
- Click Next.
- From the list of templates, select the User Model item.
- Choose a name for your model if you wish. The model used in this
article is called
Sample. - Click Finish.
The new model is created. It will have the User Modeling Profile preapplied and the necessary user modeling data type libraries imported.
In this section you:
- Define teams and roles
- Create user goals and tasks diagrams
- Build a glossary
It is often convenient to start at the “top” of the model, and to think about what roles exist in your domain and how they function together in teams. For the example model, you will use the following:
«user_team» Content Management
- «user_role» Author
- «user_role» Editor
- «user_role» Publisher
You define these notions in their own diagram within the User Roles package that was created when you built the model. Notice that, by default, a number of packages have been created inside your user model. This structure is created inside a user model automatically to provide a logical separation between the different components within the model. This ensures models are easier to maintain as they grow in size and complexity over many iterations. It is recommended that modelers utilize this package structure and place their different components inside the relevant packages.
Creating a new diagram
To create a new diagram:
- Right click on the User Roles package in the model.
- From the Add Diagram submenu, select either Class Diagram
or Freeform Diagram.
The new diagram is created and opened in the diagram editor.
- Enter the name of the new diagram. The example used
User Roles.
With the empty diagram built and opened, you should have a model structure similar to that shown in Figure 1.
Figure 1. User role diagram
Now you add the roles to the new diagram using the palette. The palette is provided by RSA, and allows quick creation of nodes and edges on a diagram. It consists of a number of tools that are categorized into drawers, as shown below.
Figure 2. RSA modeling palette
In the palette, expand the User Model drawer, as in Figure 2, if it is not already expanded. The User Model drawer contains tools for creating classes with any of the stereotypes in the User Modeling Profile preapplied, and some other items that will be discussed later. For now you just need to create some roles.
Creating classes from the palette
There are two ways in which
elements from the palette can be added to a UML diagram, as follows.
- Either:
- Click the User Role tool.
- Move the mouse to the location where you want the object on the diagram.
- Click the diagram.
- The new «user_role» is created.
- Or:
- Click the User Role tool and drag it to where you want the role placed on the canvas.
- Release the mouse button.
- The new «user_role» is created.
Once added to the diagram, you will have the opportunity to give the new
entity a name. Rename it to Author. Figure 3
shows the new <user_role>
Figure 3. Newly created <user_role>
To explain the purpose of the role, you should give it a definition.
Adding a definition to an element
To add a definition to an
element:
- Right click on the Author «user_role» in the diagram.
- From the context menu, select Add UML -> User
Model -> Definition.
An attribute with the «definition» stereotype is created within the Author «user_role».
You will be able to change the default «definition», and should do it so that the Author «user_role» is sensibly defined.
Repeat the process for the Editor and Publisher roles. Your diagram should look similar to Figure 4.
Figure 4. All <user_roles>
At this point you group the roles into the content management «user_team». Use the palette to create the «user_team» and rename it appropriately. You should then give it a «definition», as you did with the roles.
You need to connect the «user_team» to its constituent roles. As defined in User modeling demystified, each connection is represented as a property belonging to the «user_team» with the «member» stereotype applied. The relationship between the two should also be that of an aggregation (also called shared) from the «user_team» to the «user_role». You needn’t worry about remembering all that information though, since RSA will fill in those details for you if you use the Dynamic Connection tool. The Dynamic Connection, located on the palette, will attempt to produce the correct connection for the two classes you are connecting. It will even notice if you mix up the source and target classes.
Creating a dynamic connection
To create a dynamic connection:
- Select the Dynamic Connection tool from the User Model drawer of the palette.
- Click the Content Management «user_team» and drag the connection to the role you want to connect it to.
- Release the mouse button.
A correctly stereotyped and aggregated connection is created.
Using the dynamic connection tool, create a connection between the «user_team» and the author «user_role».
Connect the remaining roles to their «user_team». Your diagram should now look similar to Figure 5.
Figure 5. <<user_team>> mapped to the <<user_role>> objects
Now that the teams and roles are defined, you need to represent how they will interact with the system. As outlined in the previous section, you'll separate these parts of the model into their own diagrams. Repeat the procedure to create two new diagrams:
- A diagram named
User Goalswithin the User Goals package. - A diagram named
User Taskswithin the User Tasks package.
Your model should now look similar to Figure 6.
Figure 6. User Goal and User Task diagrams
You need to define the goals. Since the goals you create will then be linked to the roles that act upon them, build them with the roles in mind. You will need the existing roles to be on the User Goals diagram you just created. Let's start with the author «user_role».
Dragging existing classes onto a diagram
To drag an existing
class onto a diagram:
- Open the newly created User Roles diagram.
- Click the Author «user_role» in the Project Explorer and drag it to where you would like it to appear on the diagram.
- Release the mouse button.
The existing «user_role» is added to the new diagram.
The user modeling tools give you the capability to create new elements in relation to existing ones. You can connect new classes to existing classes with the correctly stereotyped relationships. You can use this feature to save time, since you know you'll be connecting any new goals you create to existing roles.
Creating new classes from existing classes
To create new
classes from existing classes:
- Right click on the Author «user_role» in the User Goals diagram.
- From the context menu, select Add UML -> User
Model -> User Goal.
A new «user_goal» is created and connected to the «user_role» with an appropriate relationship.
As with all new elements you've created up to this point, you will be able
to rename the new «user_goal» after its construction. Rename it to
Write Articles. The linking property will
likely still have the default name class1 (or something similar). If this
is the case, you should also rename it to
Write Articles. Add a sensible definition to
the «user_goal» following the same steps outlined earlier.
Your User Goals diagram should now resemble Figure 7.
Figure 7. Author <<user_role>> to Write Articles <<user_goal>>
Look at the Write Articles property. It has the «primary_goal» stereotype applied. RSA has also determined that the use of an aggregation relationship is appropriate. RSA uses the same logic for both this function and the Dynamic Connection tool, so you can enjoy the same time-savings whether adding new elements or linking existing ones.
Drag the editor and publisher <<user_roles>> onto the same diagram and add the following remaining goals:
- A Manage Articles goal for the editor role.
- A Publish Articles goal for the publisher role.
Your User Goals diagram is now complete, and should look similar to the example in Figure 8.
Figure 8. <<user_role>> to <<user_goal>> mappings
Though it would seem that the next logical step would be the addition of tasks to these goals, let's first discuss other aspects of the model in order to take advantage of some of the other tools provided by the User Interface Generator.
The glossary is the collection of objects that make up your organization.
Give the glossary its own diagram entitled
Glossary within the Glossary package, as shown
below.
Figure 9. Glossary diagram
The next step is to define the Article «user_object». You can create this using any of the previously outlined methods. You are adding a new element to a blank diagram, so there's no benefit to be gained by using one over the other.
Figure 10. Article <<user_object>>
You need to flesh out the definition of this «user_object» by adding attributes with the «user_attribute» stereotype applied. The quickest way to do this is to use the context menu in the same way you used it when creating new elements from existing ones.
Adding stereotyped attributes to a class
To add stereotyped
attributes to a class:
- Right click on Article «user_object».
- From the context menu, select Add UML -> User
Model -> User Attribute.
A new «user_attribute» is added to the selected class.
- Rename the «user_attribute» to
Article ID.
Using the above steps, create two more «user_attributes» within the Article
«user_object». Name them Status and
Title.
You can apply multiple stereotypes to objects within UML models. Two useful stereotypes that can be applied to «user_attributes» are «dynamic_enum» and «identifier». Both can be used meaningfully within your «user_object». Use the context menu to do the following (the meanings of the stereotypes are explained in User modeling demystified):
- Apply the «dynamic_enum» stereotype to the <user_attribute> named Status. This will be used for tracking an article's progress, such as whether it's in draft or published state, for example.
- Apply the «identifier» stereotype to the «user_attribute» named Title. This will be used to represent the article's title and as a sensible identifier for all article objects.
After adding the attributes described above, the glossary diagram should look like Figure 11.
Figure 11. Completed Article object
There's a benefit to building the glossary before the tasks. It's now clear from the goals and the Article «user_object» that the users of this system will need to be able to perform simple tasks, such as adding new articles, editing existing articles, and deleting old ones. The tasks can be called CRUD: Create, Read, Update and Delete operations. These are common operations on «user_object»s, and the User Interface Generator tooling can create them for you.
Adding CRUD operations to a «user_object»
To add CRUD
operations a «user_object»:
- Right click on the Article «user_object».
- From the context menu, select Add UML -> User
Model ->Default Tasks.
Tasks representing the CRUD operations are created around the existing «user_object».
A lot of new objects will be created for you. Rearrange the created elements, rename them according to the keywords applied to their relationships, and add definitions for each. You can then see this information expressed diagrammatically, as shown below.
Figure 12. CRUD tasks
The User Interface Generator tooling has generated four «user_tasks» and connected them to the Article «user_object». A task has been created for each of the CRUD actions, and relationships have been added with the correct keyword applied for that task, («create», «view», «update», «delete»).
A «user_object_filter» has been added to the diagram, along with two «select» relationships. They show that the tasks that have the linkage (View, Update and Delete) must first select an article to act upon before performing their task-specific function.
Notice that the new tasks that were created for us were automatically created inside the User Tasks package to maintain the model's structure.
Moving semantic elements around the model
To move semantic
elements around the model:
- Select the element you wish to move in the Project Explorer.
- Drag the element to its new location.
- Release the mouse button.
The element will be relocated, but will still appear on any diagrams it was on before.
The model is now nearly complete, lacking only the linkages between goals and tasks. At this point your model should resemble Figure 13.
Figure 13. Model structure
The only remaining task is to model which tasks contribute to the achievement of which goals. Begin by opening the User Tasks diagram (that we created in the User Tasks package previously). Drag the existing goals and tasks onto it from the project navigator.
Use the Dynamic Connection tool to make the following relationships:
- Creating articles accomplishes the goal of writing articles.
- Managing articles is concerned with viewing, deleting and updating articles.
- Publishing articles requires the Updating of articles (since the information required is stored in the Status «user_attribute» of the article).
Your final diagram should resemble Figure 14.
Figure 14. <<user_goal>> to <<user_task>> mapping
This model is now complete. It can be passed through the User Interface Generator wizard. The model will generate a working Web application that can be deployed to a supported Web application server to provide a user interface containing the roles, goals, and tasks modeled here.
In this article you learned how user modeling specific extensions to RSA, provided by the User Interface Generator, can make user modeling easier than ever. Using the method in this article removes the complexity and the learning curve for those unfamiliar with user modeling. Sensible defaults and inferred choices made by the User Interface Generator tooling let you rapidly construct user models that can be used to produce working role-based user interfaces.
You can rest assured that the models you create will be compatible with the User Interface Generator transformations and applications that consume them. You no longer have to worry about details such as stereotypes and keywords. Using the features outlined in this article promotes productivity, and makes the more complicated aspects of modeling accessible to new users.
Learn
- The User Interface Generator is a
component of the MDM Workbench, which is available as part of IBM InfoSphere Master Data Management Server.
- The
MDM
Workbench
space contains articles and forums with useful information for users of
the MDM Workbench and the User Interface Generator.
- Learn more from the User Interface
Generator User Guide available from the
Rational
library.
See the section "Creating UI’s with the User Interface Generator" in the
RSA Infocenter with the tooling installed.
Get products and technologies
- Download a trial
version of
Rational Software
Architect.
- Download
IBM product evaluation versions
or
explore
the online trials in the IBM SOA Sandbox
and get your hands on application development tools and middleware
products from DB2®, Lotus®, Rational®, Tivoli®,
and WebSphere®.
Discuss
- Check out
developerWorks
blogs
and get involved in the
developerWorks community.

Will Jones is in his fourth year of study at Imperial College London, where he is working towards an MEng in Computing. A passionate software engineer, his most recent work includes extensions to IBM's Rational Software Architect to increase usability and promote productivity. He has submitted several patents on his contributions to the platform, covering new kinds of tools and features that contribute to an enriched user experience. Outside of IBM, he enjoys following and contributing to various pieces of open source software.

Jay Limburn, MBCS CITP, has worked for IBM since 2000. He is an IBM Senior Inventor, and is currently a senior software engineer in the software group Information Management division in Hursley UK. As the technical lead on the User Interface Generator, Jay guides the technical direction of the User Interface Generator and leads the team in fulfilling delivery commitments. Previously, Jay worked in a technical client-facing capacity in various software group services, predominantly within the Lotus brand, where he was a leading technical consultant on WebSphere Portal Server. His areas of expertise include model driven development, solution delivery and design, Eclipse, and J2EE technologys. Jay has produced a number of publications on these topics, and has filed six patents.
Comments (Undergoing maintenance)





