Overview
SoaML model elements are standard UML 2.x model elements to which stereotypes
applicable to the service modeling domain have been added. The stereotypes are defined in the SoaML specification document. Several of the most commonly used SoaML elements
also are described for your convenience within IBM Rational SOMA 2.9.
Users can add SoaML elements to a Rational Software Architect for WebSphere Software (henceforth, "RSA") service model
in several ways. We describe the following five approaches in this tool mentor:
The SoaML Service Model template that is provided with RSA Version 7.5.4 includes
numerous reusable model building blocks. A model building block can vary in scale from a single
model element, such as an <<ExistingAsset>> component that is used to represent an existing asset, to a
substantial assemblage of cohesive packages, model elements, and diagrams that are used collectively to describe a
significant concept in the service model. No matter the size of the building block, each one is provided to help
you create your models more quickly and consistently, with less error.
Each model building block is rooted under a model element with a name that is a replaceable text string, such as
${soSolution.sa}. An example is shown below. To use the building block, do the following:
-
In the Project Explorer, select the building block to be copied, right-click, and select "Copy". Move the
cursor to where the new element is to be created in the Project Explorer, right-click, and select "Paste".
-
Right-click over the building block's root element, then choose Find/Replace to change the placeholder text ${...}
to the desired name. Use the "Replace All" option to replace all instances of the placeholder text at once.
For some large building blocks with complex structures, you will need to perform the Find/Replace operation two or
more times. For example, the building block that we show here has a <<soSolutionPackage>> as its
root element and a sub-building block that is rooted in the contained ServicesArchitecture model
element. After Find/Replace is performed on the <<soSolutionPackage>>, repeat the second of the
above steps, using the ServicesArchitecture as the "root" element.
An SoaML Services Modeling palette drawer is added to the drawing palettes for Class, Component, and Freeform
diagrams of SoaML services models. This palette includes the most commonly-used SoaML modeling elements, such as
Capabilities, ServiceInterfaces, Participants, MessageTypes, ServiceContracts, and ServicesArchitectures.
Any model to which the SoaML profile is applied is a "services" model. Create a services model in one of the
following ways:
-
Use the New Project or the New Model wizards, in line with the instructions in
Tutorial: Introduction to the Modeling
perspective. Create a new model using the Services Design Model template, in the Services Modeling
category in the New Model wizard.
-
In the Project Explorer, select the root package for a model. Open the Properties View for that package,
then select the Profiles tab on the view. Select the Add Profile... button, select the "Services Modeling
(SoaML)" profile, then select the "OK" button.
To create a new SoaML model element using the palette drawer open a Class, Component, or Freeform diagram in a
services model and add the element in line with the instructions in Tutorial: Introduction to the Modeling perspective.
The new element is owned by the element -- such as a Package, Component, or Collaboration -- which owns the
diagram. If necessary due to model structure considerations (see Guideline: Service Model Structure), relocate the new element to a
different owning element (such as a Package), using drag-and-drop techniques from the Project Explorer.
An action bar with creatable model elements becomes available whenever the cursor is hovered over a diagram or
over a model element on a diagram. Context-appropriate SoaML modeling elements are available on the action
bars for Class, Component, or Freeform diagrams that are owned by services models, and for SoaML elements that are on
any diagram in a services model.
To create a SoaML element using an action bar, do one of the following:
-
Hover the cursor over a Class, Component, or Freeform diagram that is owned by a service model. Wait
until the action bar appears. Select the desired element using your pointing device.
-
Hover the cursor over a SoaML element that appears on a diagram that is owned by a service model. Wait until
the action bar appears. Select the desired element using your pointing device.
If the new model element was created using a diagram's action bar, the new element is owned by the element which owns
the diagram. If necessary due to model structure considerations, relocate the new element to a different owning
element (such as a Package), using drag-and-drop techniques from the Project Explorer.
A context-sensitive "Add Services Modeling..." menu item is available upon selecting and right-clicking many elements
in a services model. To create an element using context menus, do the following:
-
Select a SoaML or UML element in either the Project Explorer or on a diagram.
-
Right-click, select the "Add Services Modeling..." menu item (if available), and select the element type to be
created.
The new element generally is created as a child of the originally-selected element. If necessary due to model
structure considerations, relocate the new element to a different owning element, using drag-and-drop techniques from
the Project Explorer.
In a service model, do the following to stereotype a UML element as a SoaML type:
-
Select a UML element, either from the Project Explorer or in a diagram.
-
Open the Property View for the element.
-
Select the Stereotypes tab for the view.
-
Select the "Apply Stereotypes" button.
-
Add the desired SoaML stereotype to the UML element.
|