Skip to main content

Quickly adapt to changing business needs using business variables and Business Space in WebSphere Business Services Fabric V6.2

Vignesh Velusamyravindran photo
Vignesh Velusamyravindran is a Software Architect at the IBM India Software Lab. He works with IBM business partners to architect and develop SOA applications using the WebSphere portfolio. He is a co-author of the IBM Redbook WebSphere Business Process Management V6.1.2 Production Topologies. You can reach Vignesh at vvelusam@in.ibm.com.

Summary:  Leverage the new features of WebSphere® Business Services Fabric V6.2 and Business Space powered by WebSphere to build flexible business processes that enable users to easily change policy attributes without IT involvement.

Date:  21 Oct 2009
Level:  Introductory PDF:  A4 and Letter (622KB | 22 pages)Get Adobe® Reader®
Activity:  1044 views
Comments:  

Introduction

This article takes a simple pre-built loan processing scenario and introduces the use of business variables and the Business Space in the loan processing composite business service. You'll learn how to create business variables and a business space for the pre-built loan processing composite business service in WebSphere Business Services Fabric (hereafter called Fabric).

A business variable is a placeholder for a data value. It is created based on data such as Boolean, Integer, Text, or Enumeration of values. Business variables are assigned to a policy or policy assertion at design time. Business users can modify the value of the business variables at runtime using Business Space. The new value is immediately used by the policies at the runtime after going through the governance process.

Business Space powered by WebSphere is a Web 2.0 based mashup environment that provides a rich user interface, including many prebuilt templates that you can customize and use to manage business processes. In the Business Space, business users can easily modify policy attributes without assistance from IT. For more information about Business Space, refer to Empowering business users through Business Space powered by WebSphere.

Together, Business Space and business variables offer business users the flexibility to manage the processes at runtime.

Prerequisites

To complete the steps in this article, you must have the following software installed:

  • WebSphere Integration Developer V6.2 (hereafter called Integration Developer) with runtimes
  • WebSphere Business Services Fabric Toolkit 6.2 with runtimes
  • IFix JR31440
  • IFix JR31376

You should have a good understanding of how to build composite business services using WebSphere Business Services Fabric. To learn more about building composite business applications, refer the developerWorks series Creating flexible service-oriented business solutions with WebSphere Business Services Fabric.


The scenario: a loan provisioning system

This article uses a pre-built Fabric loan provisioning business process that has the following tasks:

  • Credit check verification
  • Loan provisioning

Figure 1 shows the flow of the business process.


Figure 1. Flow chart for the loan provisioning business process
Flow chart for the                     loan provisioning business process

Table 1. Assertions used in the sample scenario
Assertion name Data type Points of variability
LoanAmountAssertion integer 1) Loan amount > $50K for high risk credit check
2) Loan amount < $50K for low risk credit check
3) Loan amount < $25K for basic loan provisioning
4) Loan amount > $25K and < $50K for regular loan provisioning
5) Loan amount > $50K for premium loan provisioning
RiskRatingAssertion String Rating (High, Low)
LoanTypeAssertion Enumeration of Strings Loan Type (Basic,Regular,Premium)

As you can see in the Points of variability column, the credit check service has two variations. Depending upon the loan amount, the appropriate service is selected and invoked. For loan amounts greater than $50K, the high risk service is invoked; for anything less than $50K, the low risk service is invoked.

The loan provisioning service has three variations. Depending on the loan amount, the appropriate service is selected and invoked. For loan amounts less than $25K, the basic loan provisioning service is invoked; for loan amounts greater than $25K and less than $50K, the regular loan provisioning service is invoked. For loan amounts greater than $50K, the premium loan provisioning service is invoked.

Table 2 shows the policies used in the scenario.


Table 2. Policies used in the sample scenario
Policy name Policy expression Contract
LowRiskPolicy LoanAmount < $50K Risk Rating = Low
HighRiskPolicy LoanAmount > $50K Risk Rating = High
BasicLoanPolicy LoanAmount < $25K Loan Type = Basic
RegularLoanPolicy LoanAmount > $25K and <50K Loan Type = Regular
PremiumLoanPolicy LoanAmount > $50K Loan Type = Premium

In the pre-built solution, the policies use fixed values for the loan amount. The loan amount is a key criterion in the policy. The business may want to change the loan amount for various reasons, such as competition, regulatory compliance,and so on. If the loan amount changes, the policies will have to be updated. In this article, you'll learn how to use business variable and Business Space to avoid the hardcoding of values in the policies.


Set up the projects

Complete the steps in this section to use the pre-built Fabric solution.

Step 1: Install the loan application

  1. Download the project interchange zip and Fabric content archive zip from the Downloads section.
  2. Start Integration Developer with a new workspace. Import the loan project interchange file to the workspace.
  3. Start the Fabric server.
  4. Publish the LoanProvision and LoanRealization applications to the Fabric server.

Step 2: Import the Fabric content archive files

  1. Extract the Fabric content archive zip.
  2. Point your browser to: http://<hostname>:<webappport>/fabric/login.jsp and login using your administrator ID and password.
  3. Select Governance Manager => Import/Export.
  4. Import the FCA files in the following order from the \setup folder of Fabric content archive file.
    1. OrganizationsUsersandRoles-owl.zip
    2. FabricGovernance-owl.zip
    3. ITSFinanceOnt-owl.zip
    4. ITSFinanceCBA-owl.zip
  5. Select Governance Manager => Manage Teams > ITSFinanceTeam.
  6. Select the Admin user from the list of available users and move it to the list of selected users, then click Save.
  7. Create a new Fabric project called ITSLoan in Integration Developer.
  8. Synchronize the new Fabric project with the ITSFinanceCBA business service project in the repository.

Create the business variables

In order to achieve the enhanced flexibility in the loan provisioning business service, we'll create three business variables and associate those business variables with the policies.

The loan amount of $50K is a fixed value used in both LowRiskPolicy and HighRiskPolicy to determine which credit check service to invoke. We'll create a business variable called Credit risk limit to hold the $50K fixed value and replace the hardcoded loan amount value with the Credit Risk Limit business variable in both LowRiskPolicy and HighRiskPolicy.

The loan amount of $25K is a fixed value used in both the BasicLoanPolicy and RegularLoanPolicy to determine which loan provider service to invoke. We'll create a business variable called Basic Loan Provider Limit to hold the $25K fixed value and replace the hardcoded $25K loan amount with the Basic Loan Provider Limit business variable in BasicLoanPolicy and RegularLoanPolicy.

The loan amount of $50K is a fixed value used in the PremiumLoanPolicy to determine which loan provider service to invoke. We'll create a business variable called Premium Loan Provider Limit to hold the $50K fixed value and replace the hardcoded $50K loan amount with Premium Loan Provider Limit business variable in the PremiumLoanPolicy.

Table 3 shows the business variables we'll create and the policies we'll associate with them.


Table 3. Business variables and their associated policies
Business Variable Name Data Type Policies Associated
Credit Risk Limit Integer LowRiskPolicy, HighRiskPolicy
Basic Loan Provider Limit Integer BasicLoanPolicy,RegularLoanPolicy
Premium Loan Provider Limit Integer PremiumLoanPolicy

Create the Basic Loan Provider Limit business variable

  1. In the Integration Developer workspace, switch to the Business Service perspective.
  2. In the Business Services Explorer, right-click Business Variable, then select New => Business Variable.
  3. In the Business Variable dialog, shown in Figure 2, do the following:
    • Select ITSLoan as the project.
    • Specify Basic Loan Provider Limit as the name.
    • Select ITSFinanceINS as the namespace.
    • Select Loan Provider as the category.
    • Specify Basic Loan Provider Limit as the field name.
    • Select Integer as the field type.
    • Click Next.


    Figure 2. Create business variable - step 1
    Create                             business variable - step 1

  4. In the Create a Business Variable dialog, shown in Figure 3, do the following:
    • Specify 0 as the minimum value.
    • Specify 1000000 as the maximum value.
    • Specify 25000 as the current value.
    • Select User can edit this variable for Permissions.
    • Click Finish.


    Figure 3. Create business variable - step 2
    Create                             business variable - step 2

    Note: In this example, minumum and maximum values determine the value range of the business variable of datatype Integer.
  5. Create two more business variables with the following values:
    • Project: ITSLoan
    • Namespace: ITSFinanceINS
    • Field Type: Integer


    Name Field name Category Minimum value Maximum value Current value Permissions
    Credit Risk Limit Credit Risk Limit Credit Risk 0 1000000 50000 User can edit this variable
    Premium Loan Provider Base Limit Premium Loan Provider Base Limit Loan Provider 0 1000000 50000 User can edit this variable


  6. Save all the business variables.

Assign business variables to policies

Now you need to assign the business variables to the policies, so that the policies can use the business variable values at runtime. To do this, complete the following steps:

  1. Select Basic Loan Policy.
  2. Click the Policy Expression tab.
  3. Right-click LoanAmount <= 25000 in the Expression section and select Edit.
  4. The Property Condition dialog displays, as shown in Figure 4. Click Edit Content.

    Figure 4. Assign a business variable - step 1
    Assign a                              business variable - step 1

  5. Click the button beside the LoanAmount field and click OK, as shown in Figure 5.

    Figure 5. Assign a business variable - step 2
    Assign                             a business variable - step 2

  6. Select Basic Loan Provider Limit in the Business variable Selection dialog, and click OK, as shown in the Figure 6.

    Figure 6. Assign a business variable - step 3


  7. Click OK in the next two dialogs. The policy expression window should now look like Figure 7.

    Figure 7. Basic loan Policy editor after assigning business variable
    Basic                             loan                             policy editor after assigning business variable

  8. Save the policy.
  9. Assign the business variable Basic Loan Provider Limit and Premium Loan Provider Base Limit to the RegularLoanPolicy, as shown in Figure 8.

    Figure 8. Regular loan Policy editor after assigning business variable
    Regular loan                             policy editor after assigning business variable

  10. Assign the business variable Premium Loan Provider Base Limit to the PremiumLoanPolicy, as shown in Figure 9.

    Figure 9. Premium loan policy editor after assigning business variable
    Premium loan                             policy editor after assigning business variable

  11. Assign the business variable Credit Risk Limit to the LowRiskPolicy, as shown in Figure 10.

    Figure 10. Low risk policy editor after assigning business variable
    Low risk                             policy editor after assigning business variable

  12. Assign the business variable Credit Risk Limit to the HighRiskPolicy, as shown in Figure 11.

    Figure 11. High risk policy editor after assigning business variable
    High                             risk                             policy editor after assigning business variable

  13. After assigning the business variables, save all the policies and submit the changes from the ITSLoan project to the server from the Repository Changes explorer.
  14. Finally, it's a good idea to simulate the policies and test whether all the policies are working as expected.
  15. Update the project ITSLoan from the Repository Changes explorer.

Test the composite business service

We'll use the Fabric Unit Test Environment (UTE) server to test our application. To test the business service, complete the following steps:

  1. In Integration Developer, switch to the Business Integration perspective.
  2. Open the assembly diagram for the LoanProvision module.
  3. Right-click LoanProcessInjector.
  4. Specify the following values:
    • CustomerID : 100
    • CustomerAddress : Any String
    • LoanAmount : 50000
  5. Click Continue
  6. Select IBM WebSphere Business Services Fabric Server, and enter the administrator username and password (in our case, this is admin/admin).
  7. You'll see the sequence of the process flow. The business service should be successfully executed and return a loan response, as shown in Figure 13.

    Figure 13. Test results
    Test                             results

  8. We've provided a value of 50000 for LoanAmount. Based on this policy condition, the Dynamic Assembler invoked the Low risk credit check endpoint and the premium loan provider endpoint. You can also check the server logs and verify which endpoints are invoked by reviewing the log statements.

Adapt to new requirements

Business changes happen frequently in the competitive business environment. Changes are driven by various factors like expansion of business, mergers, competitive pressure, cost-cutting, policy changes, and more. In our example scenario, let's say that the organization has decided to change the criteria to determine the credit risk and the loan provider based on the loan amount. The new criteria are listed in Table 4.


Table 4. New Criteria
Policy Business variable value New criteria
LowRiskPolicy Credit Risk Limit = 45000 Loanamount <= 45000
HighRiskPolicy Credit Risk Limit = 45000 Loanamount > 45000
BasicLoanPolicy Basic Loan Provider Limit = 20000 Loanamount < 20000
RegularLoanPolicy Basic Loan Provider Limit = 20000
and
Premium Loan Provider Base Limit = 55000
Loanamount > 20000 and Loanamount < 55000
PremiumLoanPolicy Premium Loan Provider Base Limit = 55000 Loanamount > 55000

If the solution was implemented without business variables and Business Space, business users would need to use the Fabric composition studio to modify the loan amount values in the policies. This is more difficult and might require IT support.

However, the solution we built uses business variables and Business Space to simplify these changes. Business users can log in to the business space and easily change the values of the business variables without IT involvement. The Fabric engine uses the new values immediately to select and invoke an endpoint after going through an approval process.

Note: To keep it simple, we've used a single user to submit, approve and publish changes. In a production environment the users would likely be different.

In the next section, we'll walk through the steps necessary to apply the new criteria.


Configure Business Space

In this section, we'll configure Business Space to change the values of the business variables. You'll use this business space page later to edit the business variables.

Create a business space

  1. Point your browser to http://<hostname>:<webappport>/BusinessSpace/login.jsp.
  2. Log in with the administrator ID and password (in our case, this is admin/admin).
  3. Click the Create New Business Space icon.
  4. In the Create New Business Space dialog, specify My Business Space as the name, select From a template and select Business Process Agility , then click OK, as showin in Figure 12. Choosing Business Process Agility automatically lists all the business variables created in the Fabric composition studio.

    Figure 12. Create new business space
    Create new                             business space

Edit business variable

  1. Point your browser to http://<hostname>:<webappport>/BusinessSpace/login.jsp.
  2. Log in with the administrator ID and password (in our case, this is admin/admin).
  3. Select My Business Space.
  4. Click the Business Variable Configuration tab.
  5. Select Basic Loan Provider Limit and click Edit on the right.
  6. Specify the name and description for the new change set, as shown in Figure 14, and click OK.

    Figure 14. Basic loan provider change set creation


  7. Click the value of Basic Loan Provider Limit.
  8. Change the Basic Loan Provider Limit to 20000, as shown in Figure 15, and click Save.

    Figure 16. Basic loan provider edit page
    Basic loan                             provider edit page

  9. Click the Governance tab and select Basic loan Provider change set.
  10. Click Submit and provide a description and comments for the change, as shown in Figure 16.

    Figure 16. Basic loan provider change set


  11. Click Approve and provide comments.
  12. Click Publish and provide comments.
  13. Change the value of the Premium Loan Provider Base Limit business variable to 55000 by repeating steps 1-12.
  14. Change the value of the Credit Risk Limit business variable to 45000 by repeating steps 1-12.

Test the composite business application for the new requirement

  1. In Integration Developer, switch to the Business Integration perspective.
  2. Open the assembly diagram for the LoanProvision module.
  3. Right-click LoanProcessInjector.
  4. Specify the following values:
    • CustomerID : 100
    • CustomerAddress : Any String
    • LoanAmount : 50000
  5. Click Continue.
  6. Select IBM WebSphere Business Service Fabric Server, and enter the administrator username and password (in our case, this is admin/admin).
  7. You will see the sequence of process flow. The business service should be successfully executed and return a loan response, as shown in Figure 17.

    Figure 17. Test results
    Test                             results

  8. We've provided the same value of 50000 for the loan amount, but this time the Dynamic Assembler invoked the high risk credit check endpoint and the regular loan provider endpoint based on the new criteria. You can also check the server logs and verify which endpoints are invoked by reviewing into the log statements.

Summary

In this article, you learned how to use WebSphere Business Services Fabric business variables and Business Space powered by WebSphere in a composite business service to easily adapt to business changes. You learned how to create business variables and assign them in policies. You also learned how to create business space page to edit the business variables for business users.



Downloads

DescriptionNameSizeDownload method
Project containing the Business integration moduleITSFinance.zip110KBHTTP
Fabric content archiveFCA.zip28KBHTTP

Information about download methods


Resources

About the author

Vignesh Velusamyravindran photo

Vignesh Velusamyravindran is a Software Architect at the IBM India Software Lab. He works with IBM business partners to architect and develop SOA applications using the WebSphere portfolio. He is a co-author of the IBM Redbook WebSphere Business Process Management V6.1.2 Production Topologies. You can reach Vignesh at vvelusam@in.ibm.com.

Comments



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=436504
ArticleTitle=Quickly adapt to changing business needs using business variables and Business Space in WebSphere Business Services Fabric V6.2
publish-date=10212009
author1-email=vvelusam@in.ibm.com
author1-email-cc=crothemi@us.ibm.com

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