Customising WebSphere Service Registry and Repository with Studio and Business Space: Part 3: Configuring WSRR Business Space widgets

This article series describes WebSphere Service Registry and Repository and WSRR Studio. Parts 1 and 2 showed you how to create custom business objects in WSRR Studio and create policies to control their behaviour. This article shows you how to customize business space and the WSRR widgets to display the objects created in Part 1.

Stephen Willoughby (stephen.willoughby@uk.ibm.com), Solution Test Specialist, WebSphere Service Registry and Repository Development team, IBM

Author1 photoStephen Willoughby is on the IBM Software Horizontal Integration Analysis Lab team. He was with IBM in 2000 for 15 months as part of his studies and returned to IBM as a full-time employee following graduation from the University of York in 2002. He has developed servlets, EJBs, Web services, WebSphere Business Integration Message Broker flows and more, and deployed them to the lab's pseudo-production environment. Stephen has also had software published on IBM's alphaWorks site.



30 November 2011

Introduction

This article shows you how to configure Business Space and the IBM® WebSphere® Service Registry and Repository (WSRR) widgets. Part 1 showed you how to use WSRR Studio to create business models, life cycles, and classification systems, while Part 2 described 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, more user-friendly Business Space UI. This article shows you how to configure the new Business Space UI for the artifacts created in Part 1. For information on using the original Web UI, see Customising the WebSphere Service Registry and Repository user interface.

Introduction to Business Space

Business Space is made up of widgets and spaces. Widgets perform specific tasks, and a space is an arrangement of widgets. WSRR provides both widgets and spaces, and both can be customised to meet your requirements. Widgets provided by WSRR are divided into two categories: eight Service Registry widgets, which are described below, and five Service Registry Policy Analytics widgets, which are not covered in this article.

Service Registry Search widget

You use this widget to search for content in WSRR. Search results appear in the Service Registry Collection widget. The widget has a drop-down list of types, and you can choose which types appear in the list and the order in which they appear.

Service Registry Collection widget

This widget shows the results of the most recent search in a table. You can customize the formatting of the table per type or for multi-type search results. Click on an object in the Collection widget to display the details of the object in the Service Registry Detail widget.

Service Registry Detail widget

Displays the details of a selected object in WSRR. For each type, you can customise which details appear and how they are displayed.

Service Registry Actions widget

Along with the Search widget, this widget is a main starting point for anything you want to do. It simply presents a list of clickable actions that you can configure, and could include such things as Create New Doughnut Order, or Show All Fulfilled Iced Bun orders. Click an action and the other widgets will do as prescribed.

Other widgets

  • Service Registry Activity widget -- Displays recent changes made to an object.
  • Service Registry Chart widget -- Displays service reuse.
  • Service Registry Graphical Explorer widget and Service Registry Navigator widget -- Show registry content graphically.

For more information on any of the widgets, see Widgets in the Business Space user interface in the WSRR information centre.

Customizing the Business Space UI in the scenario

The scenario will have two spaces: one for Café users and one for Bakers, and this article will show you how to create both. Start with the Café space. In a browser, log in to the Business Space UI:

  1. Navigate to https://yourhost:9443/BusinessSpace/, where you should see something like Figure 1 below, and log in as an administrator:
    Figure 1. Business Space login screen
    Business Space login screen
  2. Create a new space: Click Actions => Create Space.
  3. Enter a name such as Café Space
  4. Click the radio button next to Create a blank space. Optionally enter a description, choose a style or space icon, and then click Save.

    Each space can have multiple pages (which look like tabs), but you are just going to use one. It must be given a name:

  5. Name the page something like Café Page, select Create an empty page, and click OK. You should now see a blank space with a blank page, as shown in Figure 2. Start to build up your space by placing widgets on it:
    Figure 2. Blank Business Space page in a blank space
    Blank Business Space page in a blank space
  6. Click Edit Page at the top right.

    The Widget Palette opens and lets you edit the settings of any previously placed widget. As there are so many widgets available, you can choose to filter out all but the WSRR widgets:

  7. Select Service Registry from the drop-down immediately below the Café Page title.

    The eight WSRR widgets described earlier are shown. Start laying out the required widgets:

  8. Drag an Actions widget to the top right and a Detail widget below it. Then drag three Collection widgets onto the left side:
    Figure 3. Initial layout of widgets
    Initial layout of widgets
  9. Go through each of these five widgets' settings one at a time, starting with the Actions Widget: Click on the small downward arrow, the first of the three, at the top right of the Actions widget. The menu for the widget opens. Select Edit Settings.

At this point you need to create a new configuration for your space. A good rule of thumb is to have one configuration per space:

  1. Click Create a new WSRR Business Space configuration and enter a name, such as Café Configuration. Click Create.
  2. Click Save and Close.

    Continue editing the Actions widget. The widget comes with two GEP actions preconfigured. Since you don't want to use them, disable them:

  3. Uncheck the Visible checkbox for the two existing actions.

    Add three new actions to create each of the different food orders in the business model:

  4. Click Create a new action.
  5. Enter Create a New Doughnut Order in the Action Label field, and select Create a Business Object in the Action Type drop-down.
  6. Now select Doughnut in the Business Object Type drop-down.
  7. Optionally enter a description to appear as hover help in the Actions widget and also as a subheading in the resulting new object wizard.
  8. Click OK.
  9. Repeat these steps for Iced Bun and Pasty, and when you are done, click Save and Close. The Actions widget for the Café space is now complete:
    Figure 4. Completed actions widget
    Completed actions widget.

Try creating a new order:

  1. Click Create a New Doughnut Order:
    Figure 5. Unedited Create a New Doughnut wizard
    Unedited Create a New Doughnut wizard

    The results should look like Figure 5. There are lots of things that you might not want displayed, such as Description and of course Box Order, which doesn't concern Café users. What appears when creating a new instance of a business model is determined by the Detail widget, which also lets you determine what is seen when viewing an existing instance. On the Detail widget:

  2. Click Cancel to dismiss the create Doughnut dialog and then click Edit settings, using the small downward arrow as before but this time for the Detail widget.

    You are now presented with a list of all the Business Model types, grouped by the Business Model's label, which in your case is Order:

  3. Find Order in the list and expand it and FoodOrder.

    Your Business Model is hierarchical and you can take advantage of that to simplify specifying how they should be displayed. Since Café users are not concerned with Box Orders, start from FoodOrder and work your way down:

  4. Click FoodOrder in the tree on the left.
  5. You can now see the detail settings for the properties of Food Orders. Make Description and Additional Properties invisible by unchecking the Visible checkbox.

    Not displaying Additional Properties causes Namespace and Version to also not be displayed, because Additional Properties is a section and they were designated as being within that section:

  6. Whilst you do care about the governance state (where the FoodOrder is in the life cycle) you don't want it to be displayed in its own section. Click the gray cross next to Governance state (the higher of the two displayed in blue).

    This action removes the section and leaves the actual Governance State to be displayed at the top level. The order of the properties can be changed, either by clicking the up and down arrows to the left of the property names, or by simply dragging a property to its desired location within the list:

  7. Move Quantity above Unit price by either means.

    You don't want to allow the creation of new custom properties, the deletion of Food Orders, or the use of the Graphical Explorer for Food Orders:

  8. Uncheck Enable addition of custom and optional properties, uncheck Enable delete in the Actions menu, and finally uncheck Enable view in Graphical Explorer in the Actions menu.

    The last thing to do on the Properties tab is to display the priority of the order, which is represented by a classification:

  9. Scroll down the right side and click Add classification taxonomy.
  10. Check Priority -- no need to expand it first.

    You must now move the Priority to above Additional Properties; otherwise it won't be displayed as it is added under the invisible Additional Properties subsection by default:

  11. Drag Priority to above Additional properties and below Governance state.

    You are now finished with the Properties tab of the Detail widget settings. Change to the Classifications tab -- since you're displaying classifications in the Properties tab, no need to display them here:

  12. Scroll back up on the right side and click Classifications to change the tab.
  13. Uncheck Display classifications.

    Next is the Relationships tab; the only relationships in the model are between FoodOrders and BoxOrders. These are of no interest to Café users, so they should not be displayed here:

  14. Click Relationships to change to the Relationships tab and uncheck Display relationships.
  15. It's a good idea to save your changes now, so click Save changes.

    So far the display settings for only Food Orders have been configured. Food Orders can't even be created because they're abstract, but you can now use this as a template for the three subtypes of Food Order. Start with Doughnut:

  16. Click Doughnut on the left side to open the settings specific to Doughnuts.
  17. Click on Copy settings from FoodOrder.

    This action copies all settings from the parent type, but leaves the extra child-specific properties at the bottom in the invisible Additional Properties section. So they must all be moved up. Note that you copied the settings rather than opting to inherit them from FoodOrder, because using inheritance would not allow you to make any changes to each FoodOrder subtype:

  18. Drag Icing, Type, and Flavour to above Priority.

    There is no need to amend the classification or relationship settings. You can now repeat the changes made to Doughnut, for Iced Bun and Pasty:

  19. Click Iced Bun, click Copy settings from FoodOrder, and move Icing up to above Priority. Click Pasty, click Copy settings from FoodOrder, and move Filling up to above Priority.
  20. You are now finished editing the details widget settings. Click Save and Close.
  21. Try out creating new Orders and see the changes you've made: Click Create a new Doughnut Order.

    Figure 6 shows the finished Create a New Doughnut Order, and you can see how much cleaner it is now that only the relevant properties are displayed. If you set up role mappings as described in Part 2, then you won't have permission to actually create the order as an administrator:

    Figure 6. Modified Create a New Doughnut Order wizard
    Modified Create a New Doughnut Order wizard

Finally, for the Café space, you need to configure the three Collection widgets. Each one is to be locked to display a set of data that will help the average Café user monitor the status of their orders. The first Collection is set to display that user's draft orders; the second will show their orders that have been dispatched so the user knows what is due to arrive, and the third will show all their remaining orders, although you could choose any combination.

The Collection widget is the first widget that appears more than once on the space at the same time, which introduces a new concept for widget settings. Most settings apply across the space, so if you have two Details widgets, they both display Doughnut Orders in the same way. But Collection widgets have some settings that are instance-specific. Therefore, you should use a one-space, one-configuration policy, so that Baker and Café users do not have to share settings for each of the widgets. If Baker and Café users had to view FoodOrders in the same way, that would not meet the requirements.

Bearing this in mind, start with the first Collection widget, which you are to set to display all Draft FoodOrders belonging to the current user:

  1. Click the downward arrow on the top Collection view and select Edit settings.

    You are now presented with the Instance settings page for the Collection widget. Select the view required and whether the user can change that view, but first you must create the view you need:

  2. Click on View menu on the left, then click Add menu item, and finally click Add query.

    You are now going to define the query that is used to determine the set of results shown in the Collection widget:

  3. Enter My Draft Orders as the Display Label, select Type query in the Query Type drop-down and FoodOrder in the Type drop-down. Click Add.
  4. Click the cross by All states. Expand Order life cycle and check the checkbox for Candidate order and click Close.
  5. Click the cross under Properties, select Owner in the Property drop-down, leave equals as the Condition, and enter ${currentUser} as the Value. Click Add.
  6. Click OK.

    The substitution parameter ${currentUser} lets you easily search for objects belonging to the currently logged-in user. Although you have now defined this view menu item, you have not yet set the top instance of the Collection widget to show this view by default:

  7. Click Instance settings on the left to return to the Instance Settings page.
  8. In the Default view drop-down, select My draft orders and check Lock to default view setting for this instance.
  9. Click Save and Close.

    As you don't yet have any Food Orders the search will return no results. Complete the next two Collection widgets:

  10. Using the same method, give the second widget the following Display Name: My Dispatched Orders, and do the same as before, except select Order dispatched as the state. Remember to set the property as before.
  11. For the third widget, name it My Other Orders and do the same as the first two, except specify the following states: Order Completed, Order Ready, Submitted Order, and Subscribed Order. Remember to set the property as before.

    You are now done editing the Café Space, so you can finish editing and share the space with Café users:

  12. Click Finish editing.
  13. Click Manage Spaces and then Actions next to Café Space, selecting Share. Assuming that your Café users are called cafe1 and cafe2, enter cafe in the search box and click the Search icon. Next check both users and click Add to view before clicking Save. Alternatively, if you have a group called Cafés, you could have used the group instead. Both users are now enabled to use the Café Space.
  14. View the space as a Café user.
  15. Click Done and Log out, and then log in as cafe1. Initially, a new user is taken to the Welcome Space.
  16. Click Go to Spaces and then Café Space.
  17. Create some orders, ensuring you specify a priority. You should see all the orders you create appear in the top Collection widget. If you want, switch to cafe2 and verify that cafe1's Food Orders don't appear in the list. You can also submit orders if you wish (under the Action menu) and see them disappear from the My Draft Orders collection and appear in the My Others Orders collection:
    Figure 7. Café space after creating a new doughnut order.
    Café space after creating a new doughnut order.

Café users can't subscribe to orders, so that you can see them in the other Collection widgets. Only Baker users can do that, so now work on the Baker Space:

  1. Log out and log back in as your administrative user.
  2. Click Actions => Create Space. Follow the same procedure as before to create a space called Baker Space with one blank page called Baker Page.
  3. Click Edit page.
  4. Lay out the widgets as before for the Café space with three Collection widgets, an Actions widget, and a Detail widget.

    Once more, go through each of the widgets in turn configuring it as required:

  5. Click the downward arrow and Edit settings for the Actions widget.
  6. When asked for the configuration, create a new configuration for this space. Click Create a new WSRR Business Space Configuration and enter the name as Baker Configuration.
  7. Leave Copy from existing configuration checked and ensure Café Configuration is selected in the adjacent drop-down.
  8. Click Create, followed by Save and Close.

    You left the option to copy from the Café configuration, so that you can start from the Café space for your settings, instead of starting from scratch for the Detail widgets settings. Not all of these copied settings will be required of course, as you can immediately see:

  9. Delete the three actions: Click the cross by each of the actions created in the Café space.
  10. The only action you need for Baker users is Create New Box Order. Click Create a new action and, as you did for the Café space, create a new action to create a new Box Order.
  11. Click Save and Close to return to the space.

The Detail widget also carries over all settings from the Café Space. The Baker user will need settings for Box Orders and also to make the relationship to Box Orders visible from Food Orders. This final piece will need repeating for each of the three Food Orders, since you copied their settings from Food Order rather than having them inherit their settings:

  1. Click the downward arrow on the Detail widget and click Edit settings, then navigate to BoxOrder (under Order) on the left side.
  2. Uncheck Enable life cycle transitions in the Actions menu, then click Enable delete and Enable view in the Graphical Explorer.
  3. Make the following properties invisible by unchecking the checkbox under Visible: Description, Governance state (the section in blue), and Additional properties (also a section).

    Similar to the FoodOrders for Café users, now clean up the Classifications and Relationships displayed for Box Orders. As Box Orders don't have any classifications associated with them, you can simply hide them, but for Relationships you need to perform a search to show all the Food Orders that relate to the Box Order:

  4. Click on the Classifications tab and uncheck Display classifications.
  5. Click on the Relationships tab and uncheck Relationships are editable.
  6. Then click Create custom query, enter Food Orders relating to this Box Order as the display label, and paste in the following XPATH: /WSRR/GenericObject[order_Box(.)/@bsrURI='${currentObject.bsrURI}']
  7. Click Create. Scroll right and select Type in the drop-down for Column 2.
  8. Click the + on the far right and select Owner in the newly created drop-down for Column 3.

Move on to the Doughnut order and add the relationship to Box Orders:

  1. Expand FoodOrder on the left and click Doughnut, then click Relationships to open the relationship tab (if required).
  2. Check Display Relationships, then uncheck Enable addition of custom and optional relationships.

    The relationship Box order should already be checked as visible. Scroll right to see the columns that will be displayed for the related Box Order. Since Box Orders don't have a life cycle, there's little point in displaying the Governance State, and similarly the FoodOrder model means only Box Orders can fulfill this relationship, so Type is not needed. Change these two columns to something more useful:

  3. Change Column 2 to Quantity by selecting it in the drop-down, and Column 3 to Date Required by the same means.
  4. Do the same for Iced Bun and Pasty.
  5. Click Save and Close.

As with the Café space, it is now time to define the views displayed in the three Collection widgets:

  1. Click the downward arrow on the top Collection widget and click Edit settings.
  2. Click View menu on the left side.

    Since you copied these settings from the Café space, the views defined there are also here. Delete them:

  3. Click the cross by each of them.
  4. Click Add menu item, and enter Available Food Orders for the Display Label.
  5. Click Add query, specify Type Query and FoodOrder for the type.
  6. Click Add.

    Unlike in the Café space, you aren't interested in which users created the orders, so all you need to specify is that they are in the correct state:

  7. Click the + by All states and choose Submitted order.
  8. Click Close and then OK.

    As with the Café space, return to the Instance Settings to lock this instance down to only the view you just defined:

  9. Click Instance settings on the left, select Available Food orders in the Default View drop-down, check Lock to default view setting for this instance, and then click Save and Close.
  10. Repeat these steps for the middle Collection widget, but specify the Display Label as My Orders in Progress and specify the following states: Subscribed Order, Order Ready, and Order Dispatched.

    Before finishing editing the query for My Orders in Progress, you need to specify that the property Baker is equal to the currently logged in user:

  11. Similar to before with the owner property, click the + under Properties.
  12. Select Custom Property from the Property drop-down, and type Baker into the Property Name field.
  13. Leave equals as the condition and type ${currentUser} into the Value field.
  14. Click Add and OK.
  15. As with the previous Collection widget, set this newly defined menu item to be the default and locked-down view. Then save and close the Edit Settings dialogue.

The Baker property must be set manually by the Baker user when subscribing. Ideally this setting would be done automatically by using a modifier plug-in that would listen for the Subscribe to Order transition and then save the name of the user on the Food Order object, but that is beyond the scope of this article. In Part 2, you created a property assertion to enforce the Baker property, preventing anyone from subscribing to a FoodOrder without the presence of the Baker property. For the third and final Collection widget, display all Box Orders belonging to the current user:

  1. Click the downward facing arrow on the third Collection widget and select Edit settings.
  2. Click View Menu on the left side and click Add menu item.
  3. Type My Box Orders as the Display Label and click Add query.
  4. Select Type query in the Query Type drop-down and BoxOrder in the Type drop-down.
  5. Click Add.

    There is no life cycle for BoxOrders, so all you need to do is restrict the results to be BoxOrders that the current user created:

  6. Click the + under Properties, select Owner in the Property drop-down, leave equals as the Condition, and enter the substitution parameter ${currentUser} as the value.
  7. Click Add, then OK, and then as with the previous two Collection widgets, lock this instance down to just the My box orders view.
  8. Click Save and Close, followed by Finish editing.

The final task is to share this space with all Baker users:

  1. As with the Café space, click Manage Spaces, followed by Actions next to Baker Space, then Share.
  2. Click the small downward facing arrow to the left of the Search box and select Group Search, then type bakers in the search box and press Enter or click the magnifying glass.
  3. After the results are returned, click Bakers and finally Add to view, followed by Save then Done.

You can now switch to a Baker user and subscribe to the orders that you created after completing the Café space. If you have two browsers or two computers, try logging in as a Café and as a Baker and take some orders through the life cycle.

Conclusion

This article showed you how to create two new Business Spaces. On each space, you laid out the required widgets, including an Actions widget, Collection widgets, and Detail widget, and then configured each of them in turn to display the required properties of each type of business model. You also set up the Collection widgets to be locked to showing some defined queries, and configured the Actions widget to provide all the actions required for each group of users.


Downloads

DescriptionNameSize
Code sampleBakerAndSpace.zip5 KB
Code sampleCafeAndSpace.zip5 KB
Code sampleCafeAndBakerScenario.zip2110 KB

Resources

Comments

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


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=775425
ArticleTitle=Customising WebSphere Service Registry and Repository with Studio and Business Space: Part 3: Configuring WSRR Business Space widgets
publish-date=11302011