Professional Documents
Culture Documents
Bertrand Portier
IT Architect
IBM
27 May 2008
This tutorial series gives you a detailed look at modeling service-oriented architecture
(SOA) by using IBM Rational Software Architect. This fifth tutorial in this series will
step through how you would identify services and create the initial service model in
Rational Software Architect. It continues using the online DVD rental case study
introduced in the previous four parts, and you will use Rational Software Architect to
create the initial service model based on that case study.
including those who provide input into software architecture, such as business
analysts, and those who use the software architecture as input to perform their own
activities, such as software designers and developers (architecture realization,
design, and implementation). This series also covers several core SOA concepts
that are useful to a wide audience.
Architecture: Describe what SOA comprises and where it fits into the
overall software development process.
Services: Design the services architecture for an SOA solution.
Models: Demonstrate how Rational Software Architect supports a
model-driven development (MDD) approach to thespecification of
service-oriented architectures.
After describing software architecture and positioning services within it, this series
then introduces Rational Software Architect and its SOA- and architecture-related
features. By using a fictitious online DVD rental case study throughout, these
articles:
In Part 2, we took a detailed look at what a domain model is and how it can be
represented in Rational Software Architect. You started to get hands-on experience
with the tool and created the domain model used in this series.
In Part 3, we explained how to model the external systems that we want to integrate
into our service oriented architecture. We described bottom-up analysis and the
modeling of these external systems in terms of interfaces and components.
In Part 4, we took a detailed look at the use case model. We explained the value of
this model in requirements specification activities. We then used Rational Software
Architect to specify the use case model for the DVD2U Return Video case study.
In this part, we will step through how you would identify services and create the
initial service model in Rational Software Architect.
Objectives
At the end of this part of the tutorial series, you should be able to:
Describe how services can be identified from the different input models
Create a service model in Rational Software Architect
Model and classify the identified services and consumers in Rational
Software Architect
Prerequisites
To get the most value from this tutorial, it is recommended (but not necessary) that
you be familiar with:
System requirements
In Part 3, we talked about the external systems model being a subset of the design
model, and we explained the difference between the service model and the design
model. To recap:
This tutorial will show how we design both the services and the service-oriented
solution that contains them for the DVD2U case study. We will also further specify
and use elements in other functional layers, above and under the services layer.
Version 7.0 and later of Rational Software Architect includes UPSS, as well as a
model template that goes with it: the Service Design Model template (Figure 2).
The Rational Software Architect Service Design Model template provides structuring
guidelines and building blocks for the service model. Using the template, the service
model is structured according to these three views (see Figure 3):
In this series, we do not use this Service Design Model template for two reasons:
In previous parts of this series, weve covered some tried-and-tested best practices
that are not new with SOA. For example, in Part 1, we performed business process
modeling, and in Part 4, we performed use case analysis.
In this and the following parts, we will focus on the core elements and parts of the
service architecture, and, in doing so, we will cover some ideas that are more novel
to SOA. However, this does not mean that these are totally new ideas. Rather than
reinventing the wheel and forgetting all of the good things that weve learned about
software system design over the years, we will build on these. For example, we will
model service specifications by using classes and interfaces similar to what is done
in Object-Oriented Analysis and Design (OOAD). Also, we will model service
providers as components, as in Component-Based Development (CBD). That
means we still leverage these accumulated best practices that are fundamental to
successful SOA.
The key difference to these established best practices is that services, not classes or
components, are at the core of our design. This can be seen in the SOA Solution
Stack shown in Figure 1. So although these services (providers, consumers,
specifications) may be specified by using "traditional" modeling elements, such as
classes or components, it is the services that are the key parts of the architecture.
As an example, one of the things that we model are service interactions. We use
traditional UML interactions diagrams to do this, but the lifelines are not objects
based on plain classes or interfaces. Instead, they are service instances based on
service specifications.
Note:
If you still have the workspace available from Part 4, skip these steps and proceed to
Step 7.
4. In the Import wizard, type project in the Select an import source filter
field, and then select Project Interchange and click Next (Figure 4).
5. Click Browse and point to the location where you saved the
DVD_Rental-Part4.zip file.
8. After doing this, if you expand the SOA Tutorial project, you should see
something like Figure 6 in your Project Explorer view.
9. To start with, you need to create a new UML model for the service model.
1. Select the SOA Tutorial project, right-click, and then select New >
UML Model.
2. From the New UML Model dialog, select Standard Template and
choose Blank Model as the template. Then deselect Create a
default diagram in the model.
Identifying subsystems
After analyzing the business process model, use case model, and domain model, we
decide to identify two sub-systems for the SOA solution:
For this part of the tutorial, we do not want Rational Software Architect to
automatically create diagrams under new packages. You will now set this
preference.
2. Under Preferences, type diag in the Filter field, and select Default
Diagrams under Modeling (Figure 7).
You will now create the package structure in your service model for the two identified
subsystems.
5. Select Service Model, right-click, and then select Add UML > Package.
Name the package Service-Oriented Sub-systems.
Note:
The system analyst identified two subsystems of use cases in the Use Case model,
which is where we got our two service-oriented subsystems. In this tutorial, we will
go only as far as identifying these service-oriented subsystems and creating a
representation of them. In the next tutorial, we will take the services that we identify
in the remainder of this tutorial, place them on service providers, and then take both
the service provider and service consumer parts and assemble them to build the
internal structure of our service-oriented subsystems.
Identifying services
In Part 1, we created the DVD2U Component Business Model (CBM), and the
Online Rental business process with its business tasks, business items, and
resources.
In Part 2, we modeled the Online Rental Domain model in terms of its domain
types.
We will now use these models to identify services (which we initially represent with
service specifications) and service consumers. More specifically, we will:
Composite services
From the Online Rental Business Process model, you look at the Return Video
sub-process in WebSphere Business Modeler and change to swim-lane layout by
classifier: automation. Business tasks that are candidates for automation are the one
classified as either Human System (blue) or System-only (gray) in Figure 8.
Notify of return (when the DVD2U member notifies DVD2U that they have
returned one or more videos)
Add copy back to stock (when the DVD copy received at the DVD2U
warehouse is added back to the list of available copies)
These two tasks support the return of a video. One is in the area of Member, the
other one is in Stock.
like, for example, merely accessing the video rentals list. As such, these two
services will probably require other services in order to provide their functionality.
We call this type of service Composite.
From the Project Explorer, your Service model should now look something like
Figure 9.
8. From the Project Explorer, select the two interfaces (CTRL + click), and
then select the Stereotypes tab under the Properties view.
From the Project Explorer, your Service model should now look something like
Figure 10.
Tip:
A successful alternative technique to deriving your composite services directly from
the business processes is to derive them from the use cases in the Use Case model.
In this case, you would create a composite service for each use case to support the
behavior required of that use case.
Service Consumers
You know that the Return Video business process is a consumer of the two
identified composite services. You will now capture this in the Service model.
From the Project Explorer, your Service model should now look something like
Figure 11.
You will specify later which service operations are used by this consumer. You need
to specify these operations first.
You know that the service providers offering the service specifications that you've
identified will, themselves, consume (use) services, because they are composite
services. You will model these service providers later.
Atomic services
Now, you analyze the Domain model to see what services you can identify from it.
Figure 12 shows the Rental part of the DVD2U Domain model.
The services identified from the Domain model are typically fine-grained, because
they deal with specific business entities, such as a Member or an Account. These
data services, which provide Create-Read-Update-Delete (CRUD) access to data,
are considered atomic services. However, it is important to note that not all of the
operations assigned to these domain entity-oriented services will be CRUD-style
operations. Any atomic business logic that can be aligned with a single domain type
should appear at this level. Some of these may be more computational, meaning
that given a set of inputs, they compute outputs.
Note:
Although we won't cover it in detail here, typically, you would also analyze the
External Systems model from Part 3 of this series (this is called bottom-up existing
asset analysis) to see if the functionality that they provide could help fulfill the Video
Return requirements.
For DVD2U Return Video, these are the identified atomic services:
From the Project Explorer, your Service model should now look something like
Figure 13.
Figure 13. The Service model with the atomic service specifications
Based on the list of identified atomic services, assume that you decide to create
these three sub-packages for them:
From the Project Explorer, your Service model should now look something like
Figure 14.
7. In addition, start to think about the following for each service specification:
Consumers: Who would use a service that would implement this
service specification? What drove you to identify this service
specification? It should be obvious at this stage who would use the
service (a business process or another service, for example). If you
cannot find a consumer for the service, then maybe you should not
have it in your model.
Inputs and Outputs: What would be the inputs and outputs for the
operations under that service specification? If the service was
As a final word: Because it is beyond the scope of this tutorial to fully describe the
techniques used to identify services, we recommend the following resources (listed
under Resources) for more detailed materials:
Section 4. Wrap-up
In this part of this tutorial series, you learned about the creation of the initial Service
model -- the model that is at the core of service modeling.
1. You identified services from the Business Process model and the Domain
model.
2. You used Rational Software Architect and the UML Profile for Software
Services to represent each identified service with a service specification.
3. You used UML packages to classify the identified services, and you also
identified service consumers.
As you now know, the output of the service identification work is more or less an
initial list of service specifications. These service specifications describe, at a high
level of abstraction, what the services are.
In the parts of this series that follow, you will fully detail these service specifications
(operations, and so forth) and also model service interactions and service providers.
Downloads
Description Name Size Download
method
Initial Project Interchange (RSA DVD_Rental-Part4.zip 10KB HTTP
required)
Final Project Interchange (RSA DVD_Rental-Part5.zip 10KB HTTP
required)
Resources
Learn
Read Part 1 of this series, Model Service-Oriented Architectures with Rational
Software Architect: Part 1. Case study, tools, and the business view .
Read Part 2 of this series, Model Service-Oriented Architectures with Rational
Software Architect: Part 2. Modeling the business domain .
Read Part 3 of this series, Model Service-Oriented Architectures with Rational
Software Architect: Part 3. External system modeling .
Read Part 4 of this series, Model Service-Oriented Architectures with Rational
Software Architect: Part 4. Use Case models .
Take the course called Architecting Services with IBM Rational Software
Architect V7.
Read Exploring the fundamentals of architecture and services in an SOA: Part
3. Service-oriented solutions and enterprise architecture by Gregory
Hodgkinson and Bertrand Portier (IBM developerWorks, January 2008).
Read the developerWorks introductory article titled The Rational UML profile for
business modeling by Simon Johnston (developerWorks, April 2004). The
Rational UML profile for Business Modeling is a component of the Rational
Unified Process (RUP). It presents a UML language for capturing business
models and is supported by the Business Modeling Discipline in the RUP.
Read the developerWorks intermediate-level article, Business services
modeling, Integrating WebSphere Business Modeler and Rational Software
Modeler, by Jim Amsden (developerWorks, December 2005). Business
Services Modeling forms the foundation for the integration between IBM
WebSphere Business Modeler, Rational Software Architect (and UML), and the
Rational Unified Process business modeling guidelines to better support
model-driven development (MDD).
Visit the Rational software area on developerWorks for technical resources and
best practices for Rational Software Delivery Platform products.
Subscribe to the developerWorks Rational zone newsletter. Keep up with
developerWorks Rational content. Every other week, you'll receive updates on
the latest technical resources and best practices for the Rational Software
Delivery Platform.
Browse the technology bookstore for books on these and other technical topics.
Get products and technologies
Download trial versions of IBM Rational software.
Download IBM product evaluation versions 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.
Gregory Hodgkinson
Gregory Hodgkinson is a lead consultant at Prolifics
(www.prolifics.com). Previous to that he was a founder, director, and
the SOA lead at the company 7irene. He has 10 years of experience in
software architecture, initially specializing in the field of
component-based development (CBD), then moving seamlessly into
service-oriented architecture (SOA). His extended area of expertise is
the software development process, and he assists Prolifics and IBM
customers in adopting RUP framework-based agile development
processes and SOA methods. He is still very much a practitioner, and
has been responsible for service architectures for a number of FTSE
100 companies. He presents on agile SOA process and methods at
both IBM (Rational and WebSphere) and other events and has also
co-authored a Redbook on SOA solutions.