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.
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
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.
Complete the steps in this section to use the pre-built Fabric solution.
Step 1: Install the loan application
- Download the project interchange zip and Fabric content archive zip from the Downloads section.
- Start Integration Developer with a new workspace. Import the loan project interchange file to the workspace.
- Start the Fabric server.
- Publish the LoanProvision and LoanRealization applications to the Fabric server.
Step 2: Import the Fabric content archive files
- Extract the Fabric content archive zip.
- Point your browser to:
http://<hostname>:<webappport>/fabric/login.jspand login using your administrator ID and password. - Select Governance Manager => Import/Export.
- Import the FCA files in the following order from the \setup folder of
Fabric content archive file.
- OrganizationsUsersandRoles-owl.zip
- FabricGovernance-owl.zip
- ITSFinanceOnt-owl.zip
- ITSFinanceCBA-owl.zip
- Select Governance Manager => Manage Teams > ITSFinanceTeam.
- Select the Admin user from the list of available users and move it to the list of selected users, then click Save.
- Create a new Fabric project called
ITSLoanin Integration Developer. - Synchronize the new Fabric project with the ITSFinanceCBA business service project in the repository.
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
- In the Integration Developer workspace, switch to the Business Service perspective.
- In the Business Services Explorer, right-click Business Variable, then select New => Business Variable.
- In the Business Variable dialog, shown in Figure 2, do the
following:
- Select ITSLoan as the project.
- Specify
Basic Loan Provider Limitas the name. - Select ITSFinanceINS as the namespace.
- Select Loan Provider as the category.
- Specify
Basic Loan Provider Limitas the field name. - Select Integer as the field type.
- Click Next.
Figure 2. Create business variable - step 1
- In the Create a Business Variable dialog, shown in Figure 3,
do the following:
- Specify
0as the minimum value. - Specify
1000000as the maximum value. - Specify
25000as the current value. - Select User can edit this variable for Permissions.
- Click Finish.
Figure 3. Create business variable - step 2
Note: In this example, minumum and maximum values determine the value range of the business variable of datatypeInteger. - Specify
- 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
- 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:
- Select Basic Loan Policy.
- Click the Policy Expression tab.
- Right-click LoanAmount <= 25000 in the Expression section and select Edit.
- The Property Condition dialog displays, as shown in Figure 4. Click
Edit Content.
Figure 4. Assign a business variable - step 1
- Click the button beside the LoanAmount field and click OK, as
shown in Figure 5.
Figure 5. Assign a business variable - step 2
- 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
- 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
- Save the policy.
- Assign the business variable
Basic Loan Provider LimitandPremium Loan Provider Base Limitto the RegularLoanPolicy, as shown in Figure 8.
Figure 8. Regular loan Policy editor after assigning business variable
- Assign the business variable
Premium Loan Provider Base Limitto the PremiumLoanPolicy, as shown in Figure 9.
Figure 9. Premium loan policy editor after assigning business variable
- Assign the business variable
Credit Risk Limitto the LowRiskPolicy, as shown in Figure 10.
Figure 10. Low risk policy editor after assigning business variable
- Assign the business variable
Credit Risk Limitto the HighRiskPolicy, as shown in Figure 11.
Figure 11. High risk policy editor after assigning business variable
- 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.
- Finally, it's a good idea to simulate the policies and test whether all the policies are working as expected.
- 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:
- In Integration Developer, switch to the Business Integration perspective.
- Open the assembly diagram for the LoanProvision module.
- Right-click LoanProcessInjector.
- Specify the following values:
- CustomerID : 100
- CustomerAddress : Any String
- LoanAmount : 50000
- Click Continue
- Select IBM WebSphere Business Services Fabric Server, and enter the administrator username and password (in our case, this is admin/admin).
- 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
- 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.
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.
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.
- Point your browser to
http://<hostname>:<webappport>/BusinessSpace/login.jsp. - Log in with the administrator ID and password (in our case, this is admin/admin).
- Click the Create New Business Space icon.
- In the Create New Business Space dialog, specify
My Business Spaceas 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
- Point your browser to
http://<hostname>:<webappport>/BusinessSpace/login.jsp. - Log in with the administrator ID and password (in our case, this is admin/admin).
- Select My Business Space.
- Click the Business Variable Configuration tab.
- Select Basic Loan Provider Limit and click Edit on the right.
- 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
- Click the value of Basic Loan Provider Limit.
- Change the Basic Loan Provider Limit to 20000, as shown
in Figure 15, and click Save.
Figure 16. Basic loan provider edit page
- Click the Governance tab and select Basic loan Provider change set.
- Click Submit and provide a description and comments for the
change, as shown in Figure 16.
Figure 16. Basic loan provider change set
- Click Approve and provide comments.
- Click Publish and provide comments.
- Change the value of the Premium Loan Provider Base Limit business variable to 55000 by repeating steps 1-12.
- 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
- In Integration Developer, switch to the Business Integration perspective.
- Open the assembly diagram for the LoanProvision module.
- Right-click LoanProcessInjector.
- Specify the following values:
- CustomerID : 100
- CustomerAddress : Any String
- LoanAmount : 50000
- Click Continue.
- Select IBM WebSphere Business Service Fabric Server, and enter the administrator username and password (in our case, this is admin/admin).
- 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
- 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.
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.
| Description | Name | Size | Download method |
|---|---|---|---|
| Project containing the Business integration module | ITSFinance.zip | 110KB | HTTP |
| Fabric content archive | FCA.zip | 28KB | HTTP |
Information about download methods
-
Creating flexible service-oriented business solutions with WebSphere Business Services Fabric series:
This series of articles describes how to leverage WebSphere Business
Services Fabric to build SOA applications using composite business
services.
-
Empowering business users through Business Space powered by WebSphere:
Get the technical detail of Business space in WebSphere Dynamic process
edition.
-
Getting Started with IBM WebSphere Business Services Fabric V6.1:
This IBM Redbook provides a complete overview of Fabric, from an
architectural introduction, to an installation guide, and a step-by-step
scenario that describes how to model, assemble, deploy, and manage
composite business applications.
-
developerWorks BPM zone:
Get the latest technical resources on IBM BPM solutions, including
downloads, demos, articles, tutorials, events, webcasts, and more.
-
WebSphere Business Services Fabric product information:
Get product information, including features and prerequisites.
-
WebSphere Business Process Management Version 6.2 information center:
Get complete product documentation for WebSphere BPM products.

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.





