Skip to main content

Composite Business Applications in WebSphere Business Services Fabric, Part 1: Authoring a CBA in Business Space

Diana Lau (dhmlau@ca.ibm.com), Software Developer, IBM
Diana Lau photo
Diana Lau is a software engineer for the IBM WebSphere Integration Developer development team based in the Toronto Software Lab. Diana is currently on the WebSphere Integration Developer SWAT team, working with customers resolving technical issues and providing best practices for implementing BPM solutions.
Nita Maheswaren photo
Nita Maheswaren is the team lead for the IBM WebSphere Integration Developer SVT team based in the Toronto Software Lab. He has contributed to the design and implementation of a number of Service-Oriented Architecture scenarios.
Rebecca Gong (rjgong@us.ibm.com), Software Developer, IBM
Rebecca Gong photo
Rebecca Gong is a member of the IBM WebSphere Business Modeler test team based in the Toronto Software Lab. She has contributed to the design and implementation of a number of Service-Oriented Architecture scenarios.

Summary:  This article series shows you how to create a CBA in Business Space powered by WebSphere®, and then make governed changes to the application logic using Business Process Agility widgets.

View more content in this series

Date:  06 May 2009
Level:  Intermediate PDF:  A4 and Letter (521KB | 20 pages)Get Adobe® Reader®
Activity:  530 views

Introduction

By combining the user-friendliness of Business Space with the dynamicity of IBM® WebSphere Business Services Fabric V6.2 (hereafter referred to as Business Services Fabric), business users and software developers can collaborate to develop Composite Business Application (CBAs). In Business Services Fabric, business users can use Business Space to create CBAs that are composed of multiple business services at the business level. These applications can then be imported into WebSphere Business Modeler V6.2 (hereafter referred to as Business Modeler) to define the details of service variations for the business services that the application uses. Finally, an integration developer using WebSphere Integration Developer (hereafter referred to as Integration Developer) and WebSphere Business Composition Studio V6.2 (hereafter referred to as Composition Studio) can implement the Business Services Fabric application. After an application is implemented and deployed in a production environment, business users still have the power to make governed changes to parts of the application logic using the Business Process Agility widgets in Business Space.

Using a customer relationship management (CRM) example, this article series shows you how to create a CBA in Business Space, enhance it in Business Modeler, and eventually implement it in Integration Developer and Composition Studio. It demonstrates how you can make governed changes to application logic through the Point of Agility functionality even after the application has been deployed to a production environment. Part 1 discusses creating and governing a CBA in Business Space. Part 2 covers the modeling and implementation aspects of the CBA development cycle using supplied sample code. To build and run the scenario in this series, the following software must be installed. Part 1 can be completed with just Business Services Fabric installed.

  • Business Services Fabric V6.2
  • WebSphere Business Modeler Advanced V6.2
  • WebSphere Integration Developer V6.2
  • WebSphere Business Composition Studio V6.2

Scenario overview

In this article you build the CBA CreateProfileApplication. CreateProfileApplication is called when a customer initiates a Create Customer Profile request by e-mail or fax. CreateProfileApplication is composed of two business services: Create Profile service and Inform Customer service. Create Profile service determines whether the customer is a preferred customer or regular customer based on the annual fee the customer pays. It then calls the appropriate services to create the profile in the company’s CRM system. When the profile has been created, the Inform Customer service calls the appropriate mechanisms to inform the customer of the decision based on whether the customer’s status is preferred or regular. Figure 1 depicts the control flow.


Figure 1. Control flow for CreateProfileApplication

Authoring in Business Space

To get started, you use Business Space to create the required Business Services Fabric vocabularies and the business services that form the CreateProfileApplication. Vocabularies provide a single place to store, agree upon, and reference the terms that are used within an organization. These terms can then be used confidently when describing the details of business services and policies. Vocabularies are the building blocks for all other artifacts. A business service represents a reusable business function, whereas a business application is composed of one ore more business services to build a business solution.

Create a vocabulary

In this scenario, you need only one vocabulary, which you will call CRMVocab. To create CRMVocab, complete the following the steps:

  1. Create a business space called CRMAuthorSpace using the Business Services Fabric Authoring template.

    Figure 2. Creating a Business Space with the Fabric Authoring template


  2. From the Getting Started page of this business space, click Start working with vocabularies. The Vocabulary Browser page opens.
  3. Click Actions and select New Vocabulary.
  4. For the name of the vocabulary, type CRMVocab.
  5. Under “Select a change set,” click Create new and name the change set Create Profile Change Set. A change set is needed for making any changes in this space. See Governance for details on change sets.

    Figure 3. Adding change sets


Add channels and business concepts to the CRMVocab vocabulary

As mentioned in the previous section, there are two ways to initiate CreateProfileApplication: e-mail and fax. They are represented in Business Services Fabric as channels.

To create e-mail and fax channels, complete the following the steps:

  1. Click the CRMVocab vocabulary from the Vocabulary Browser page. The Vocabulary Details page opens.
  2. Next to Channels, click Add and add the two channels: E-mail and Fax.

Figure 4. Creating channels

Now that you have defined the channels, you need to define the information that will be used as inputs and outputs in business services and CBAs. These are called business concepts in Business Services Fabric. Business concepts can be of two types: simple and complex. Simple business concepts are numbers, decimals, text, dates or Boolean. Complex business concepts contain one or more simple business concepts.

To create the business concepts, complete the following steps:

  1. In Vocabulary Details view, next to the Business Concepts section, click Add and add the business concepts in this table:

    Business concept name Type
    Customer Name Text
    Customer ID Text
    Phone Number Text
    Annual Fee Decimal
    Date Date
    isPreferredCustomer Boolean
    Create Profile Input Complex Object
    CustomerRecord Complex Object


  2. Create Profile Input and CustomerRecord are complex business concepts because they have "has" relationships with the other business concepts.

    Source Concept Relationship Type Relationship Name Cardinality Target Concept
    Create Profile Input has Phone number at least one Phone Number
    Create Profile Input has customer name exactly one Customer Name
    Create Profile Input has annual fee exactly one Annual Fee
    Create Profile Input has Date exactly one Date




    Source Concept Relationship Type Relationship Name Cardinality Target Concept
    CreateRecord has isPreferredCustomer exactly one isPreferredCustomer
    CreateRecord has customerID exactly one customerID


Create business services

A business service represents a business function — in our example, "create a customer profile" and "inform the customer" are business functions. Business services use business concepts that are defined in the vocabularies as inputs and outputs. A business service might contain multiple service variations. These variations are different implementations (producing different results) of a business service that share the same interface as that business service. A business service determines which service variation to call based on its policies. Policies (the logic) are used to make decisions.

In this section, you are going to create the business service, variations, and policies for each of the two business services in this example.

  1. Click the Getting Started tab in the business space.
  2. Click Start working with business services. The Business Service Browser page opens.
  3. Click Actions > New Business Service. Name the business service Create Customer Profile, and use the same change set that you used when you created the vocabulary.
  4. Repeat step 2 to create the Inform Customer business service. The Business Service Browser lists the Create Customer Profile and Inform Customer business services, as depicted in Figure 5.

    Figure 5. The Business Service Browser


  5. Click Create Customer Profile to see the details of the business service.
  6. In the Business Service Details page, click Edit.
  7. Under the Business Service Inputs and Outputs section, add an input and output as recorded in the following table.

    Business Service Description Input Output
    Create Customer Profile Determine whether the customer is a preferred customer and then create the profile Create Profile Input CustomerRecord


  8. Click Save. The Business Service Inputs and Outputs section is shown in Figure 6.

    Figure 6. Inputs and Outputs section


  9. Go back to the Business Service Browser page and repeat step 5 through 7 for the Inform Customer business service using the details recorded in the following table. Click Save.

    Business Service Description Input Output
    Inform Customer Inform the customer that his or her profile has been created CustomerRecord <none>


Now that you have created your business services, each service will need different service variations to call based on its inputs. For example, the Create Customer Profile service will select the PreferredCustomer_forCreate service variation if the Annual Fee is less than $100.

To create a service variation for the Create Customer Profile Business Service, complete the following steps:

  1. Click Add in the Business Service Variations section on the left side of the screen. You can use the existing Create Profile Change Set as your change set for tracking changes.
  2. Create the service variations specified in the following table.

    Business Service Business Service Variations
    Create Customer Profile RegularCustomer_forCreate
    PreferredCustomer_forCreate
    Inform Customer RegularCustomer_forInform
    PreferredCustomer_forInform


Next, you are going to define a business service policy for the Create Customer Profile service. The policy states when a customer is considered a preferred customer, such as when his or her annual fee is greater or equal to $100.

To define a business service policy, complete the following steps:

  1. In the Business Service Details page of Create Customer Profile, click Add under the Business Service Policies section.
  2. Specify PreferredCustomerPolicy as the name of the policy in the resulting dialog.


    Figure 7. Specifying a policy


  3. Once the policy has been created, click the Edit button to modify the policy details.
  4. Specify appropriate effective and expiration dates for the policy by clicking on the corresponding fields.
  5. Next, add a condition and a result for the policy. When the Create Customer Profile Business Service is called, the condition specified in the When section of the PreferredCustomerPolicy is evaluated and if it is true, the result specified in the Then section is used.
  6. To add a condition, click the ‘(No conditions, click to add)’ link under the When section. Create the condition as in Figure 8.

    Figure 8. Creating a condition


  7. To add a result, click the ‘(No results, click to add)’ link under the Then section. Create the result as specified in Figure 9.

    Figure 9. Creating a result


  8. The resulting policy is shown in Figure 10.


    Figure 10. PreferredCustomerPolicy business service policy (Create Customer Profile service)


  9. Similarly, create the policies in Figures 11 to 13. Note that the policies in Figures 12 and 13 belong to the Inform Customer business service.

    Figure 11. NormalCustomerPolicy business service policy (Create Customer Profile service)




    Figure 12. PreferredCustomerPolicy business service policy (Inform Customer service)




    Figure 13. NormalCustomerPolicy business service policy (Inform Customer service)


Create a business application

Now that you have created the business services, you are ready to create the CBA CreateProfileApplication, which is composed of these services.

To create the CBA, complete the following steps:

  1. In the Getting Started page, select Start working with business applications and then click Actions > New Application in the application browser.
  2. To add business services to the application, click Application Flow in the Application Details page of CreateProfileApplication.
  3. Click Edit and add the two channels (Fax and E-mail) that were defined in CRMVocab vocabulary to the application flow (click Action > Add Channel to Application).
  4. Add Create Customer Profile and Inform Customer services to the application flow by clicking Action > Add Business Service to Application. Figure 14 shows the resulting application flow.

    Figure 14. Application flow for CreateProfileApplication


As part of a promotion, the company wants to institute a policy that recognizes everyone who registers in January 2009 as a preferred customer. Currently, the Create Customer Profile service recognizes only those customers who pay more than $100 in fees as preferred customers. If we add the new promotion condition to the policy of the Create Customer Profile service, then all other applications using this business service will be affected as well, and the promotion may not apply to those applications. A better solution is to define an application-service policy that overrides business service polices, but only in the current application.

Business service policies are more generic because business services can be reused in multiple applications. Each application can create application and application-service policies that are more specific and can override the policies in the business services it contains.

To create the PreferredCustomerAppPolicy application-service policy, click Add next to the Application Policies section. The Create New Application Policy window opens (Figure 15).


Figure 15. Creating a new application-service policy

The conditions and results of PreferredCustomerAppPolicy are shown in Figure 15.


Figure 16. The PreferredCustomerAppPolicy

Governance in Business Space

Almost every change you have performed so far has been added to a change set called Create Profile Change Set. A change set is used to manage the changes to a business process and track decision points. For a change to take effect at run time, the change set that contains that change must be submitted, approved, and published. This way, all changes to Business Services Fabric artifacts are tracked and go through the necessary governance before being deployed.

Any user of a business space can create a change set. However, only the person who created the change set, the business space owner, or a Business Services Fabric administrator can submit the change set for review or cancel it. Only the business space owner or a WebSphere Business Services Fabric administrator can reject, publish, or defer a submitted change set.

You now have created everything you need for CreateProfileApplication. You are ready to go through the governance process to publish Create Profile Change Set, the change set that contains all of the actions taken to create CreateProfileApplication. Create Profile Change Set is initially in the draft state. When it is submitted for approval, its state changes to Pending. When it has been approved, it will be in the approved state and can either be published or deferred.

Let’s now take the Create Profile Change Set through the governance process. As the owner of the Business Space that Create Profile Change Set belongs to, you have the right to submit, approve and publish it.

  1. Click the Governance tab.
  2. Select Create Profile Change Set. Note that it is in the draft state.
  3. Click Submit Change Set. This submits the change set for review by either the owner of the Business Space or a WebSphere Business Services Fabric administrator. To reflect this, the state of Create Profile Change Set changes to Pending.
  4. After reviewing the changes in the change set, you as the Business Space owner may decide to approve the changes by clicking Approve Change Set. The state of Create Profile Change Set changes to Approved.
  5. The final step required for the changes to take effect is to click Publish Change Set. The state of Create Profile Change Set changes to Published and CreateProfileApplication has been created and published.

Figure 17. The published change set

Summary

This article discusses essential Business Services Fabric artifacts, such as vocabularies, business services, and change sets. It provides step-by-step instructions for authoring a CBA in Business Space. At this point, the business flow of the CBA has been defined and is ready to be implemented at a technical level.

Part 2 of this series discusses how business users and integration developers can collaborate and implement this CBA using WebSphere Business Modeler, WebSphere Integration Developer, and WebSphere Business Services Fabric Composition Studio. The result is a completed CBA that you can deploy and run on a production system.

Acknowledgement

We would like to thank Curtis Miles and Laura Gardash for their technical and editorial review, respectively.


Resources

About the authors

Diana Lau photo

Diana Lau is a software engineer for the IBM WebSphere Integration Developer development team based in the Toronto Software Lab. Diana is currently on the WebSphere Integration Developer SWAT team, working with customers resolving technical issues and providing best practices for implementing BPM solutions.

Nita Maheswaren photo

Nita Maheswaren is the team lead for the IBM WebSphere Integration Developer SVT team based in the Toronto Software Lab. He has contributed to the design and implementation of a number of Service-Oriented Architecture scenarios.

Rebecca Gong photo

Rebecca Gong is a member of the IBM WebSphere Business Modeler test team based in the Toronto Software Lab. She has contributed to the design and implementation of a number of Service-Oriented Architecture scenarios.

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=WebSphere
ArticleID=387173
ArticleTitle=Composite Business Applications in WebSphere Business Services Fabric, Part 1: Authoring a CBA in Business Space
publish-date=05062009
author1-email=dhmlau@ca.ibm.com
author1-email-cc=
author2-email=nitam@ca.ibm.com
author2-email-cc=
author3-email=rjgong@us.ibm.com
author3-email-cc=

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