Customising WebSphere Service Registry and Repository with Studio and Business Space, Part 1: Creating business models, life cycles, and classifications

This article series describes WebSphere Service Registry and Repository and WebSphere Service Registry and Repository Studio. Part 1 shows you how to create custom business models, a custom life cycle, and a classification system. Parts 2 and 3 will show you how to set up security and governance policies and configure a customised business space.


Stephen Willoughby (, Solution Test Specialist, WebSphere Service Registry and Repository Development team, IBM

Author1 photoStephen Willoughby is a Solution Test Specialist on the WebSphere Service Registry and Repository Development team. He joined IBM in 2000 as a student and then again as a graduate in 2002. In 2006, he joined the WebSphere Service Registry and Repository Development team and has been a tester there ever since, specializing in re-creating customer scenarios. You can contact Stephen at

24 August 2011

Also available in Chinese

Introduction to WebSphere Service Registry and Repository

IBM® WebSphere® Service Registry and Repository (hereafter called WSRR) is a system for storing, accessing and managing information, commonly referred to as service metadata, used in the selection, invocation, management, governance and reuse of services in an SOA. In other words, it is where you store information about services in your systems or other organizations' systems, that you use, plan to use, or want to be aware of. For example, an application can check WSRR just before invoking a service to locate the service instance best satisfying its functional and performance requirements. WSRR also plays a role in other stages of the SOA life cycle.  It encompasses a registry that contains information about services, such as their interfaces, operations, and parameters, and a metadata repository that provides a robust, extensible framework for the diverse nature of service usage. WSRR also provides management and governance capabilities that enable you to get the most business value from your SOA. In short, WSRR is an essential component of your SOA.

This article, Part 1, shows you how to use WSRR Studio to create business models, life cycles and classification systems. Part 2 will show you how to create governance policies and translatable messages, and how to configure access controls. WSRR V7.5 provides two Web-based user interfaces (UIs): the original UI that has always been part of WSRR, and a new Business Space UI, which is easier to use and is the strategic direction for future versions. Part 3 will show you how to configure the new Business Space UI for the artifacts created in Part 1.

For information on how to customise the original WSRR UI, see the 2009 article on developerWorks Customising the WebSphere Service Registry and Repository user interface.

Scenario for this article


To follow the instructions in this article, you will need:

  • WSRR V7.5 installed
  • WSRR Studio V7.5 installed
  • WSRR configured with security enabled and with two groups: Cafes and Bakers. Each group must have at least one user, such as Cafe1 and Baker1.

This article uses a simple scenario that will enable you to understand how to customize of WSRR, but will not bog you down with unnecessary complexity and SOA jargon.

The scenario involves bakers and cafes, where cafes create orders that bakers elect to fulfill.  The cafes and bakers are users in a user registry (such as . LDAP), and all of the orders are represented by instances of business models.  The orders are then transitioned through a custom life cycle from creation to completion.  A more detailed description of each aspect of the scenario is given in each section of the article.

Introduction to and creation of business models

Business models enable you to represent, inside WSRR, objects that are relevant to your organization. They define a template for instances of business objects and enable you to specify properties and relationships, as well as define custom cardinality.  Business models are defined using the Web Ontology Language (OWL).  For example, you might wish to represent physical pieces of hardware in WSRR, so you would create an OWL file with properties representing information pertinent to the hardware, such as hostname, IP address, operating system, and processor type.  OWL lets you specify the type of these properties, so hostname would be string, whilst operating system might be an enumeration with specific options specified.  You can also specify that there must be a relationship to an instance of another business model, perhaps the owning organization in charge of the hardware.  WSRR would enforce all of these rules and prevent the creation of an instance that does not conform to the model.

From the point of view of the scenario, see Figure 1 below, which shows the hierarchy of the business models.  The top level object is the Order, an abstract class that is inherited by FoodOrder and BoxOrder.  The box order is used by the bakers to order packaging for their products.  Food Order is another abstract class inherited by the three food types actual order classes: Doughnut, Pasty, and IcedBun.  At each object level are the properties and relationships relevant to each object.

Prior to WSRR V6.3, you had to create OWL by hand or by using third-party tools, but now WSRR includes Studio, an Eclipse-based application that enables you to create your own models in UML and generate WSRR configuration artifacts.  To use Studio to create the model shown in Figure 1:

  1. Assuming Studio has been installed, start Studio and create a new WSRR Configuration Project. Create a Governance Enablement Profile (GEP) because, even though you won't take advantage of any of its models, it is the recommended profile:
  2. Once Studio is loaded, click File => New => WSRR Configuration Project., enter a name such as . CafeAndBakerScenario, and select the template to use.
  3. Select Governance Enablement Profile -- WSRR V7.5, and click Finish. You now have a configuration profile in which to create our model.
  4. Create the model: Right-click CafeAndBakerScenario and select New => WSRR Business Model.  In the resulting wizard, enter the following information:
Input data for and description of Business Model Creation Wizard
UML package nameFile name of the model -- must be unique in the project.OrderModel
Base URIURI to uniquely identify this model. It should start with a URI scheme, such as . http://
LabelUsed by Studio in place of the nameorder
CommentPurely a comment.Optional
PrefixUsed to prefix all generated configuration files in order to separate them from other configuration items. Also used when querying for properties or relationships.order
Target configuration projectProject where the model will be created.CafeAndBakerScenario
Figure 1. Business models and their relationships
Business models and their relationships
  1. Begin drawing the model on the canvas: Drag the Class icon from the palette on the right (or click once on the icon and then on the canvas), and then type the class name to create the six classes shown in Figure 1 above. You can see this action being done in Figure 2:
Figure 2. Creating a new class
Creating a new class.
  1. Connect the classes: Click on Generalization on the palette, and then drag from the child class to the parent class. Perform this action for all of the child classes, as shown in Figure 1 above by the arrows with triangular arrowheads. Ignore the arrow from FoodOrder to BoxOrder.
  2. Specify the attributes for the classes: Hover the mouse over a class to open up another palette. The leftmost option is Add Attribute. Click it and type the name of the attribute you want to add.  Follow this procedure for all attributes shown in the diagram.  Don't worry about attribute types for now.
  3. Create enumeration types:
    1. Before you can specify the types of the attributes in the previous step, you must define enumerations: Expand CafeAndBakerScenario and Models, right-click <<BusinessModelPackage>> OrderModel, and click Add UML => Enumeration.  Then type the name of the enumeration, in this case Size, and press Enter.
    2. Right-click the Enumeration and click Add UML => Enumeration Literal.  Type the name of the literal, in this case Small.  Repeat for Medium and Large.  Then create the other enumerations shown below. The results are shown in Figure 3 below.
Enumerations and enumeration literals to define.
EnumerationEnumeration Literals
Figure 3. Enumerations and enumeration literals in the WSRR Configuration Project Explorer view.
Enumerations and enumeration literals in the WSRR Configuration Project Explorer view.
  1. Specify attribute types and cardinality: Specify several properties of one attribute, and then repeat that step for all attributes. Click on <<BusinessModelProperty>> DateRequired on the Order class (if the digram is not in focus, click to bring it into focus and then click again). The General tab of the Properties view will open at the bottom of the screen, as shown in Figure 4 below.
  2. Specify the type and multiplicity (cardinality) of the attribute: Click on Select type and type date into the search box, and then select date (not dateTime) from the available options and click OK.
  3. Next, as this is to be a required field, ensure that Multiplicity is set to 1. Then repeat for the properties listed below (DateRequired is included again as an example).
Attribute types and cardinality.
ClassProperty nameTypeMultiplicity
Quantityinteger (XSDDataTypes)1
FoodOrderUnitPricefloat (XSDDataTypes)1
BoxOrderSizeSize (OrderModel)1
DoughnutTypeType (OrderModel)1
FlavorFlavor (OrderModel)1
IcingIcing (OrderModel)1
PastyFillingstring (XSDDataTypes)1
Iced BunIcingIcing (OrderModel)1
Figure 4. General tab of the Properties view
General tab of the Properties view

Stereotype properties

Only three of the stereotype properties are relevant now that you are going to use Business Space: label, ID, and defaultValue, and they are explained below. As before, the instructions show you how to specify the properties for one attribute as an example and then you can specify the others:

  1. With the Class diagram still open, click <<BusinessModelProperty>> DateRequired: date.
  2. In the Properties view, open the Stereotypes tab as shown in Figure 5 below, and at the bottom observe the Stereotypes Properties table.
Stereotyped properties for Business Model attributes.
Stereotyped PropertyDescription
defaultValueas the name suggests, a default value for the attribute.
IDThe id is used to link two or more attributes (across classes) so that they are the same in the generated OWL. Normally leave this blank, but specify the same value for all attributes that you wish to link.  For example the two classes, IcedBun and Doughnut both have an attribute Icing, as this is the same type in both classes then we can set the ID as Icing, for both attributes, also setting the type the same for both attributes. This allows both attributes to have the same name and leads to only one shared data type in the OWL.
labelthis is a label for the attribute. Attribute names are restricted, in terms of use of spaces, etc, so if you need to specify a less restrictive name then use this property. Using the Translatable Message editor allows labels to be set for other languages, more on that later.
commentI know I said only three matter, but this fourth might interest you too. This is a comment which is included in the generated OWL file but never used in WSRR.
  1. For <<BusinessModelProperty>> DateRequired: date, specify the label as Date Required.  Repeat for the following properties:
Stereotype property settings for our Business Model properties.
ClassProperty namelabelID
OrderDateRequiredDate Required
FoodOrderUnitPriceUnit Price
Figure 5. Stereotypes tab of the Properties view
Stereotypes tab of the Properties view
  1. Specify the relationship between FoodOrder and BoxOrder: Every food order must have a box order before it can be shipped, which is modeled by connecting FoodOrders to BoxOrders with a directed association, resulting in a relationship in WSRR: Click Directed Association then click FoodOrder and drag to BoxOrder.
  2. Type the name of the relationship, for example Box, to specify a relationship from FoodOrder to an object of type BoxOrder.
  3. From the Properties view, as you did for attributes, specify the multiplicity (for the BoxOrder side) as 0..1, and on the Stereotypes tab set the label as Box Order.
  4. Ensure that your diagram is the same as in Figure 1 and then save the model: Click File => Save. The business model is now fully modeled and ready to generate a WSRR configuration.
  5. Right-click CafeAndBakerScenario and click Generate All WSRR Artifacts.  After a short wait you should see a success message.

Creating life cycles and classification systems

Life cycles are a means of controlling the governance of objects in WSRR.  Specified in State Adaptive Choreography Language (SACL), life cycles are a set of states and transitions between those states.  Transitions can be either manual or automatic, which means that when a state is reached, the transition occurs immediately and the object moves into the next state.  Life cycles are analogous to the concept of state machines and when using Studio are defined in UML.

In WSRR, you can load only one life cycle configuration at any one time.  When you create a new life cycle in Studio, what actually happens is that you create a new composite life cycle, and when you initially govern an object, you select the desired composite life cycle.

Classification systems are used to organize and find artifacts in WSRR. Hierarchical classification systems provide a granular method of categorizing objects according to business need. You can classify an object more than once, in which case the object is returned in searches performed on any of those classifications. Services can therefore be retrieved depending on the business context. You can use classification systems to simplify the task of finding objects such as services, making it easier to reuse and compose them. Classifications, like business models are specified in Web Ontology Language (OWL). Classifications are linked with life cycles, because when an object is in a governance state, it is classified as that state, which makes searching based on governance state easy to perform.

  1. Create a new life cycle model: Right-click CafeAndBakerScenario and select New=> WSRR Life Cycle. In the resulting wizard enter the following information:
Life cycle creation dialog inputs
NameA name representing the life cycle, used in Studio and in WSRR when initiating the life cycle.OrderLifeCycle
LabelThis is used by WSRR only when referring to the life cycles classification system from the Configuration perspective.Order Life Cycle
Web UI display nameThe name used in the generated WSRR UIs Menu Bar to refer to the life cycle.Order Life Cycle
CommentThis is purely a commentOptional
Web UI descriptionThis is just another commentOptional
Target configuration projectThe project where the model will be created.CafeAndBakerScenario
  1. Create four new states on the canvas: Drag State from the Palette on the right side on to the canvas four times.
  2. Rename all the states, including the Initial and Final states: Click on the automatically assigned name until it is highlighted (it may take several clicks), and then type over the old name to rename each state.
  3. With a state selected, open the Properties view at the bottom of the screen and navigate to the Stereotypes tab to set the label.  From InitialState to FinalState, rename all states and apply their labels as shown below:
Old and new names for states in the life cycle
Original NameNew NameLabel
InitialStateCandidateOrderCandidate Order
State1SubmittedOrderSubmitted Order
State2SubscribedOrderSubscribed Order
State3OrderReadyOrder ready
State4OrderDispatchedOrder Dispatched
FinalStateOrderCompletedOrder Completed
  1. Link the states with transitions: To define a transition, click Transition on the Palette and then drag from the source state to the target state.  Perform this for five transitions between the states in the order shown in the above table. Don't worry about naming the transitions yet.
  2. Arrange the diagram: Starting with CandidateOrder, move the states into a logical order, as shown in Figure 6 below.

    Whilst the life cycle is now defined, what triggers the transitions is not defined, and the default is for them to be automatic.  In this case, automatic is not the desired behavior, so you need to define the trigger for the transitions.

  3. Define the triggers: Right-click a transition and select Add UML => Trigger => Signal Event.
  4. A new menu should open. Select Create Signal Event. 
  5. Another new menu should open. Select Create Signal and repeat this action for all the transitions, starting from the top and working down towards the Order Completed state.
  6. Rename the signals and apply labels to them.  If there is no label present, then Studio will use the name when generating the configuration files, but labels are more flexible because they allow spaces.
  7. Define labels for and rename the signals: To define the signals label, expand CafeAndBrokerScenario => Models => <<LifecycleModel>> LifecycleDefinition, and click on <<LifecycleSignal >> Signal1. Then open the Properties view at the bottom of the screen.
  8. From the General tab, you can rename the signal, and from Stereotypes you can edit the label. Set the following labels and names for all the signals:
Names and labels for signals
Signal nameLabelNew name
Signal1Submit OrderSubmit
Signal2Subscribe to OrderSubscribe
Signal3Fulfill OrderFulfill
Signal4Dispatch OrderDispatch
Signal5Pay for OrderPay
  1. This finished life cycle should look like Figure 6 below. Save the life cycle: Click File => Save. The life cycle is now finished and you can now assign the previously defined, business-modelled types to it, which will mean that they will be automatically governed into the life cycle when created.
Figure 6. Completed life cycle diagram
Completed life cycle digram
  1. Click on the OrderModel Business Model Diagram tab, then right-click on Doughnut ,and click Edit Life Cycle Assignment. In the dropdown, select Order Life Cycle and click OK.
  2. Repeat for Pasty and IcedBun. A small icon appears below each class to indicate that it has been assigned to a life cycle, as shown in Figure 7:
Figure 7. Icon denoting life cycle assignment
Icon denoting life cycle assignment
  1. You are ready to create the classification system: Right-click CafeAndBakerScenario and select New=> WSRR Classification System. In the resulting wizard, fill in the following values:
Classification system creation dialog inputs
UML Package nameFile name of the classification system model -- must be unique in the project.OrderClassification
Base URIURI to uniquely identify this model. It should start with a URI scheme, such as . http://
LabelUsed by in the Web UI only when referring to the classification system in the Configuration perspective and in Business Space when displaying the classification as a property.Priority
CommentPurely a commentOptional
Target configuration projectProject where the model will be created.CafeAndBakerScenario
  1. Create four new classes on the canvas: Drag Class from the palette on the right side onto the canvas four times. Alternatively, you can click Class and then click on the canvas instead of dragging.
  2. Rename these classes: Click on the automatically assigned name until it is highlighted (it may take several clicks), and then type over the old name to rename each class.
  3. With a class selected, open the Properties view at the bottom of the screen and navigate to the Stereotypes tab, where you can set the label.  Rename each class and apply their labels as shown below:
Old and new names for classes in the classification system.
Original NameNew NameLabel
Class2HighHigh Priority
Class3MediumMedium Priority
Class4LowLow Priority
  1. The classification Priority must be specified as the super class to in order to establish the hierarchy, which you can do by using the Generalization relationship: Click Generalization on the palette and drag from Low Priority to Priority, thus making Priority the superclass. Repeat for Medium and Low Priority.
  2. Save the classification system: Click File => Save.
Figure 8. Priority classification system diagram
Priority classification system diagram.
  1. The classification system is now complete and should look like Figure 8 above. Once again, you can generate the configuration to ensure that there are no errors: Right-click CafeAndBakerScenario and select Generate All WSRR Artifacts. If there were any errors during profile generation, the dialog box will open and the errors will be detailed in the Problems view at the bottom of the screen.

Exporting the WSRR configuration profile

At this stage, you are almost ready to export the profile from Studio to the WSRR server. But first you must define the WSRR Server in Studio:

  1. Switch to the WSRR Locations view at the bottom of the screen, then right-click and select Add WSRR Location. In the resulting wizard, fill in the values shown below (inputs in italics will be specific to your environment and are given here as a guide):
Add WSRR location wizard inputs
Alias nameA local name, used only in Studio to refer to the serversuch as . My cafe and baker scenario server
DescriptionSomewhere extra details about the server can be written, perhaps which environment it is in.Optional
ProtocolA choice of HTTP or HTTPS, depending on if your server is secure. In our case, you should be using a secure server as we're going to be using different users for different roles, such as . cafe users and baker users.HTTPS
hostnameHostname of the machine running your WSRR server, including (if required), the domain.localhost
PortHTTP(S) port of the WSRR Server. The default for HTTP is 9080 and for HTTPS is 9443. When you selected HTTPS it will have changed the value to the default HTTPS port.9443
User IDUsername of the administrative user of WSRR. The user must have J2EE Administrator permissions for the WSRR Application.wasadmin
PasswordAdmin user's password.
Key Store and Trust Store parametersThese settings refer to the certificate stores for SSL communication with WSRR server. In normal circumstances these can be left as default. See your security specialist if you are concerned about these settings.
Context Root PrefixIf multiple WSRR instances are deployed within a cell, they can all be served by the same HTTP server, and a prefix can be used to uniquely identify them. If this means nothing to you, leave it blank.
Update intervalTime interval in seconds when Studio refreshes its information on which profiles are deployed and which one is active on the server.300
Connection timeoutTime in seconds that Studio will wait after attempting an operation in WSRR before giving up waiting. The operation itself will still continue. Loading and activating a profile can be a slow process, and if the hardware running the WSRR server is not very fast, then the operation is liable to time out. Therefore it is good idea to increase this value from the default of 300.600
Figure 9. Completed Add WSRR Location wizard
A completed Add WSRR location wizard
  1. Click Test Connection.
  2. Assuming that you're working with a secured WSRR, you will be prompted to accept the certificate of the WSRR server. Review the certificate and accept it by clicking Accept.
  3. If the connection was successful, click OK to dismiss the success message and click Finish to save the location. If the test connection failed, correct the problem and try again.
  4. You are now ready to export the profile: Right-click on the newly defined location in the WSRR Locations view and select Export WSRR Configuration Profile.
  5. Assuming you had the CafeAndBakerScenario configuration project selected in the WSRR Configuration Project Explorer, it should already be selected in the Configuration Project dropdown. If it is not, then select it. You should have a wizard that looks like Figure 10. When exporting, you also need to activate it.
Figure 10. Completed Export WSRR Configuration wizard.
Completed Export WSRR Configuration wizard.
  1. Check the checkbox by Activate profile and then click Finish.
  2. When you export the profile, Studio first regenerates and validates the profile, then exports the profile to the server and optionally makes it the active profile.


In this article you have been introduced to some of the key features of WSRR Studio. You have created business models and specified details such as labels and multiplicity. You have defined a custom life cycle and assigned your business models to be automatically entered into it. You also created a classification system and finally exported the WSRR configuration profile directly into a WSRR server and activated it. In Part 2 of this article series, you will learn how to create governance policies and translatable messages, and how to configure access controls.


Completed WSRR configuration profileCafeAndBakerScenario.zip2.1 MB
Completed WSRR Studio project archive.1CafeAndBakerProject.zip10.0 MB


  1. Import as a existing project from an archive.



developerWorks: Sign in

Required fields are indicated with an asterisk (*).

Need an IBM ID?
Forgot your IBM ID?

Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.


All information submitted is secure.

Dig deeper into WebSphere on developerWorks

ArticleTitle=Customising WebSphere Service Registry and Repository with Studio and Business Space, Part 1: Creating business models, life cycles, and classifications