Skip to main content

Build a user model with Rational Software Architect and the User Interface Generator

Will Jones (william.jones05@imperial.ac.uk), Software Engineer, IBM
Will Jones photo
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 (jay@uk.ibm.com), Senior Software Engineer, IBM
Jay Limburn photo
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.

Summary:  In this article, learn how to use the tooling provided by the User Interface Generator to create a user model. The model follows the principles outlined in User modeling demystified, and describes how users of a system will interact with the model. The tooling provides extensions to Rational® Software Architect's existing UML modeling capabilities that simplify the user modeling process for both new and experienced UML modelers. Learn how you can use the User Interface Generator to minimize the learning curve and dramatically reduce the time required to create a user model.

Date:  07 Aug 2009
Level:  Intermediate
Activity:  2799 views

Introduction

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.


Creating a new user model

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:

  1. From the menu select File > New > UML Model.

    The New UML Wizard appears.

  2. Select to create a model from a Standard Template.
  3. Click Next.
  4. From the list of templates, select the User Model item.
  5. Choose a name for your model if you wish. The model used in this article is called Sample.
  6. Click Finish.

    The new model is created. It will have the User Modeling Profile preapplied and the necessary user modeling data type libraries imported.


Populating the user model

In this section you:

Defining teams and roles

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:

  1. Right click on the User Roles package in the model.
  2. From the Add Diagram submenu, select either Class Diagram or Freeform Diagram.

    The new diagram is created and opened in the diagram editor.

  3. 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
Diagram showing the user role

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
The RSA modelling                     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:
    1. Click the User Role tool.
    2. Move the mouse to the location where you want the object on the diagram.
    3. Click the diagram.
    4. The new «user_role» is created.
  • Or:
    1. Click the User Role tool and drag it to where you want the role placed on the canvas.
    2. Release the mouse button.
    3. 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>
The 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:

  1. Right click on the Author «user_role» in the diagram.
  2. 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>
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:

  1. Select the Dynamic Connection tool from the User Model drawer of the palette.
  2. Click the Content Management «user_team» and drag the connection to the role you want to connect it to.
  3. 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
The user_team mapped to the user_role objects

Goals and tasks

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 Goals within the User Goals package.
  • A diagram named User Tasks within the User Tasks package.

Your model should now look similar to Figure 6.


Figure 6. User Goal and User Task diagrams
The 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:

  1. Open the newly created User Roles diagram.
  2. Click the Author «user_role» in the Project Explorer and drag it to where you would like it to appear on the diagram.
  3. 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:

  1. Right click on the Author «user_role» in the User Goals diagram.
  2. 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>>
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
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.

Building a glossary

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 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>>
The 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:

  1. Right click on Article «user_object».
  2. From the context menu, select Add UML -> User Model -> User Attribute.

    A new «user_attribute» is added to the selected class.

  3. 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
The 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»:

  1. Right click on the Article «user_object».
  2. 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
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:

  1. Select the element you wish to move in the Project Explorer.
  2. Drag the element to its new location.
  3. 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 Model                     Structure

Tieing it all together

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
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.


Summary

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.


Resources

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

Discuss

About the authors

Will Jones photo

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 photo

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)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=419278
ArticleTitle=Build a user model with Rational Software Architect and the User Interface Generator
publish-date=08072009
author1-email=william.jones05@imperial.ac.uk
author1-email-cc=bwetmore@us.ibm.com
author2-email=jay@uk.ibm.com
author2-email-cc=bwetmore@us.ibm.com

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers