WebSphere Business Services Fabric (WBSF) acts as a mediator for all service invocations for service interfaces that it has registered. The mediation is based on metadata associated with service endpoints, policies registered in WBSF, and contextual and content information in the service request. The types of metadata that can be registered in WBSF are defined with the help of an ontology.
In this article, you extend the core WBSF ontology to introduce a new assertion based on the credit score of a credit card applicant. We'll use this assertion in the WBSF Service Assembler to select (at runtime) one of several endpoints for a business service in a credit card approval BPEL process executing in WebSphere Process Server.
Scenario: Credit card application process
Figure 1 shows a use case for a credit card application process in the proof-of-concept Jivaro bank composite application, introduced in the article "Building SOA composite business services" (see Resources). The credit card application (CCA) process includes two subprocesses (CCA1 and CCA2) for application approval. The subprocess for high credit score applicants (CCA1) has only one level of approval by a bank employee. The subprocess for low credit score applicants has two levels: by a bank employee and another by a manager. The cut-off limit for a high credit score is determined according to bank policies. The CCA process chooses one of these two subprocesses (CCA1 or CCA2) at runtime based on the credit score of the applicant. The CCA scenario demonstrates how WBSF can provide dynamic and configurable service mediation.
Figure 1. Credit card approval process with two alternative sub-processes

To implement the use case, you will:
- Prepare BPEL workflows and the Web services.
- Extend the WBSF core ontology.
- Assemble the services in the WBSF composition studio.
- Invoke the services through the WBSF services assembler.
Preparing BPEL and Web services
To start implementing the use case in Figure 1, you will create a composite business service with three BPEL processes providing these services:
- CreditCardApproval
- Retrieve the credit score of the credit card applicant, and invoke the credit card approval process.
- HighCreditScoreCreditCardApproval
- Create a human task for a bank employee to review and approve the credit card application.
- LowCreditScoreCreditCardApproval
- Create two human tasks: one for a bank employee and another for a bank manager to review and approve the credit card application.
The HighCreditScoreCreditCardApproval and the LowCreditScoreCreditCardApproval services will both implement the same Service Component Architecture (SCA) Web service interface: ApprovalProcessInterface, as shown in Figure 2.
Figure 2. ApprovalProcessInterface

WBSF uses OWL (Web Ontology Language), to represent different types of service-related metadata and their relationships. For the use case in Figure 1, the requirements are:
- If the credit score of the applicant is more than 750 and less than 800, invoke the HighCreditScoreCreditCardApproval process from the parent CreditCardApproval process.
- If the credit score of the applicant is less than 750 and more than 0, invoke the LowCreditScoreCreditCardApproval process from the parent CreditCardApproval process.
To implement the above requirements, we will create a WBSF content-based assertion: CreditScoreAssertion with two integer type properties called MinCreditScore and MaxCreditScore.
To create an OWL file, you'll use an open source tool called Protégé. To create a new OWL/RDF files project in Protégé, use http://www.webifysolutions.com/2006/11/jivaro2_schm as the ontology URI, as shown in Figure 3. The URI name should match the namespace of the ontology project to be created in WBSF in a later step.
Figure 3. Enter the Jivaro ontology URI in Protégé

In the Metadata tab, click Import Ontology, as shown in the red box in Figure 4, to
import the extension stubs. Import the WBSF Core stub and assertion stub. These files are in the WBSF FoundationPack installation directory. For example:
D:\IBM\WebSphere\Fabric\6.0\FoundationPack\SDKs\fabric-sdk-6.0.0\owl
C:\IBM\WebSphere\Fabric\6.0\ToolPack\Plugins\SDKs\fabric-sdk-6.0.0\owl
Figure 4. Import WBSF extension stubs

In the OWL classes tab, click Create subclass, in the red box in Figure 5, to create a subclass CreditScoreAssertion under ContentBasedAssertion. Click Create new annotation value, in the blue box in Figure 5, to add a new annotation core:assertionType to subclass CreditScoreAssertion. Set the value of the annotation core:assertionType to Endpoint Selection.
Figure 5. Create a subclass under ContentBasedAssertion

In the Properties tab, click Create datatype property, in the red box in Figure 6, to create the datatype property MinCreditScore. Add two annotations, core:assertionPropertyComparator and core:controlWidget, to property MinCreditScore. Set the value of the annotations to LessThanComparator and integer, respectively. In Domain, click Specialism Domain, in the blue box in Figure 6, to add the subclass CreditScoreAssertion. Select int for the range, and check the Functional box.
Figure 6. Create datatype property MinCreditScore

Add a similar datatype property, MaxCreditScore, similar to MinCreditScore. Repeat the preceding step with the value of the annotation core:assertionPropertyComparator set to GreaterThanComparator.
Figure 7. Create datatype property MaxCreditScore

Save this project as an OWL file, as in Figure 8.
Figure 8. Save the OWL file

Create an ontology extension project in WBSF
In this step, you create an Ontology Extension project in WBSF named Jivaro2 Ontology and a new schema namespace for this project, http://www.webifysolutions.com/2006/11/jivaro2_schm# .
The project's namespace URI must match the URI of the OWL file created in Create an OWL file.
- Start the WBSF runtime, which is installed on top of WebSphere Process Server.
- Log in to the WBSF Business Services Catalog as an administrator, for example http://localhost:9080/fabric.
- Click My Services > Governance Manager > Configure Projects, and click Create a Project.
- In the Create a Project form, as shown in Figure 9, enter a
project name, such as Jivaro2 Ontology, select Ontology Extension for the Project Type, and select a Team Organization.
We'll use System for demonstration purposes. In practice, it is recommended that different team organizations be created for different development teams and the appropriate team organization be selected.
Click Create Project.
Figure 9.Create an ontology extension project in WBSF Business Services Repository
- Click My Services > Governance Manager > Configure Namespaces, and click Create a Namespace.
- In the Create a Namespace form, as shown in Figure 10, use:
- Display Name: Jivaro2 Schema
- Namespace Type: Schema
- Namespace Prefix: jivaro2
- Namespace URI: http://www.webifysolutions.com/2006/11/jivaro2_schm#
- Owner Project: Jivaro2 Ontology
Figure 10.Create a new schema namespace in the WBSF Business Services Repository
Create a WBSF Ontology Content Pack file
WBSF uses Ontology Content Pack (OCP) files to specify a project's ontology. In order to extend the WBSF core ontology, we need to export an empty OCP file from the WBSF Business Services Repository (BSR). The OCP file is a zip file containing OWL files and a special manifest file named content-pack.xml.
The OWL file Jivaro2Schema.owl, created in Figure 8, should be inserted into this empty OCP file, and the name of the OWL file specified in the manifest file should be changed to Jivaro2Schema.owl. The updated OCP file should be imported back into the WBSF BSR.
- Log in to the WBSF Business Services Catalog as an administrator.
- Click My Services > Governance Manager > Import/Export, and select the Export by Project tab, as shown in Figure 11.
Select the project Jivaro2 Ontology and the namespace Jivaro2 Schema, and click Export
To File. A file download dialog is promoted.
Figure 11. Export an empty OCP file for Jivaro2 Ontology project from WBSF Business Services Repository
- Save this OCP file to your hard disk. Open the file using a tool such as WinZip. Replace the empty OWL file with the OWL file created in Create an ontology extension project in WBSF, using exactly the same file name.
- In the Import tab, as shown in Figure 12, click Browse to file this OCP file to import. Click Import File.
Figure 12. Import updated OCP file for Jivaro2 Ontology project into BSR
Assembling a composite business service in WBSF
WBSF provides an environment to assemble composite business services (CBSs). The steps, discussed in this section, are:
- Create a project and a runtime environment in the WBSF BSR.
- Create a project with Web services, endpoints, and metadata in the WBSF Composition Studio.
- Simulate the policies.
- Submit the changes to the WBSF Governance Manager.
- Publish the metadata to the BSR.
Create a CBS project in WebSphere Business Services Fabric BSR
At the start of a development project, a WBSF administrator creates a new project of type SOBA, assigns a team to it, and allocates CBS instance namespaces for that project. The steps are similar to the steps in Create an ontology extension project in WBSF, except that we use a project type of SOBA, as shown in Figure 13.
Figure 13. Create new project in WBSF Business Services Repository

As shown in Figure 14, use an instance namespace of http://www.webifysolutions.com/2006/11/jivaro2-inst# .
Figure 14. Create an instance namespace for new project

Configure the runtime environment
WBSF uses named environments to store service endpoint metadata at runtime. The environment name ties the runtime storage to a development project in WBSF Composition Studio.
- Login to the WBSF Business Services Catalog as an administrator.
- Click My Services > Governance Manager > Configure Environments, then click Create an Environment.
- As shown in Figure 15, in the Configure Environments
form enter the environment name Jivaro2 Banking Runtime
and the description. Click Create Environment.
Figure 15. Create an environment in WBSF BSR
- Click My Services > Governance Manager > Configure Catalog, check Jivaro2 Banking Runtime environment, and click Save Environments, as in Figure 16.
Figure 16. Configure the Repository in WBSF
Create a project in WBSF Composition Studio
In this step, you'll create a project in WBSF Composition Studio for creating services and endpoint metadata.
- Launch Composition Studio and set the Catalog configurations in the Preferences dialog, as shown in Figure 17.
Figure 17. Repository Configuration in WBSF Composition Studio
- Switch to the SOBA Resource perspective. Right-click in the Resource Explorer view, and select New > SOBA Project.
- Click Next, enter a Project name of Jivaro2, as shown in Figure 18, and click Next.
Figure 18. Create project in WBSF Composition Studio
- In the second page of this wizard, click Replicate to replicate the local copy of the Business Services Catalog in your workspace. Click Next.
- In the third page, select the Fabric Project Jivaro2, created in the first step of assembly, and click Finish.
Create Web services in WBSF Composition Studio
In this step, you create a WBSF Web service corresponding to the common ApprovalProcessInterface service described in Preparing BPEL and Web services.
- Right-click Jivaro2 in the Resource Explore view, and select New > Web Service.
- Click Next. As shown in Figure 19, select Jivaro2 as the Project and Jivaro2 Instance as the Namespace.
Make sure Create Web Service Model from a WSDL is selected, and click Next.
(Download sample code now.)
Figure 19. Create Web Service entity from WSDL in WBSF Composition Studio
- Use Browse to select the Web Services Description Language (WSDL) file of CreditCardApprovalProcess service and
click Next, as shown in Figure 20. ( Download the WSDL file now.)
Figure 20. Set location of WSDL for WBSF Web service in local file system
- Click Add All to select port types and operations, as in Figure 21, and click Next.
- Click Finish, and a Web service named ApprovalProcessInterface is created.
Figure 21. Select PortTypes for CreditCardApproveProcess Web service
In this step you'll create two endpoints, HighCreditScoreApprovalEndpoint and LowCreditScoreApprovalEndpoint for services 2 and 3, described in Preparing BPEL and Web services. For each endpoint you add a CreditScoreAssertion that was created in Extending the WBSF ontology. We'll set the MinCreditScore and MaxCreditScore properties of the assertion for the HighCreditScoreApprovalEndpoint as 750 and 800, respectively.
For the LowCreditScoreApprovalEndpoint, we will set these properties to 0 and 750, respectively. This will meet the requirements described in Extending the WBSF ontology.
- Right-click Jivaro2 in the Resource Explore view, and select New > Endpoint.
- Click Next, select Jivaro2 as the project, set the name to HighCreditScoreApprovalEndpoint, select Jivaro2 Instance as the namespace, and select HTTP as the Address. Click Next.
- Enter the URL of HighCreditScoreCreditCardApproval process endpoint, for example http://saswsserver:9080/HighCreditScoreCCApprovalWeb/sca/ApprovalProcessExport, and click Finish. An endpoint HighCreditScoreApprovalEndpoint will be created.
- In the Assertions tab, click Interoperability. Select CreditScoreAssertion and click Add. As shown in Figure 22, set the two properties MinCreditScore and MaxCreditScore to 750 and 800.
Figure 22. Add CreditScoreAssertion, MinCreditScore, MaxCreditScore properties for HighCreditScoreApprovalEndpoint
- In the Web Services tab, click Add Existing to set the Web service
ApprovalProcessInterface as an associated Web service, as in Figure 23.
Figure 23. Associate the ApprovalProcessInterface Web service with HighCreditScoreApprovalEndpoint
- In the Environments tab, as shown in Figure 24, click Add Existing to set the environment Jivaro2 Banking Runtime as an associated environment.
Figure 24. Associate environment Jivaro2 Runtime with HighCreditScoreApprovalEndpoint
- Save this endpoint definition.
- Repeat the preceding steps to create another endpoint, LowCreditScoreApprovalEndpoint. Set
the two properties MinCreditScore and MaxCreditScore of CreditScoreAssertion to 0 and
750, as shown in Figure 25.
Figure 25. Add CreditScoreAssertion, MinCreditScore, and MaxCreditScore properties for LowCreditScoreApprovalEndpoint
In this step, you use the Policy Simulator in the WBSF Composition Studio to test the policies. As shown in Figure 26, when we set the properties MinCreditScore and MaxCreditScore to 600, the LowCreditScoreApprovalEndPoint is selected.
- Switch to SOBA Assembly Perspective, right click Jivaro2 in the SOBA Explorer view, and select New > Application Suite. Enter Test Suite as the name of the application suite, and click Finish. An application suite is created.
- Right-click the created application suite and select New > Application. Enter Test Application as the name of the application. Browse to Test Suite, and select it as the Application Suite. Click Finish, and an application is created.
- Switch to the SOBA Resource Perspective. Right-click Jivaro2 in the Resource Explore view, and select New > Business Service.
- Select Visibility Service as Business Service Model Type, and click Next.
- Enter
CreditCardApprvalServiceas the name of the service, browse to Test Application, select it as the application, add WebServiceChannel as a channel, and add Customer as a role type. Click Finish to create a business service. - In the Channels tab of the business service CreditCardApprvalService, select the WebServiceChannel and add ApprovalProcessInterface created in Create a WBSF Ontology Content Pack file as a Web service. Save this business service.
- Click Run SOBA Policy Simulator for a new SOBA Simulator.
- Under Required Criteria, click Browse to select the business service CreditCardApprvalService.
- Under Optional Criteria, click Browse beside Content to set the value of properties MaxCreditScore and MinCreditScore to 600.
- Click Run Simulation, as shown here.
Figure 26. Policy Simulator in WBSF showing result of a simulation for CreditScoreAssertion
Now it's time to submit the services and metadata to the WBSF Governance Manager for approval.
- In the Catalog Changes view, right-click Jivaro2 and select Submit Changelist.
- Click Next, select the Jivaro2 project, and click Next.
- Use Add All, as shown in Figure 27, to select all the changes, and click Finish.
Figure 27. Submit Changes to the WBSF Business Services Repository from the Composition Studio
In this step, the administrator will review the business service metadata, approve them, and publish them to the repository.
- Log in to the WBSF Business Services Catalog as an administrator.
- Click My Services > Governance Manager > Manage Changes, and click Search.
- The changes submitted from the Composition Studio can be seen in the list. Click the Short
Description field, as shown in Figure 28.
Figure 28. Search change lists in WBSF Governance Manager
- Click Approve to approve.
- Click Publish to publish it to the repository. Now the changes are available.
Invoking the services through WBSF Dynamic Assembler
The WBSF Dynamic Assembler applies assertions on properties included in the context
element of the SOAP header. Listing 1 shows a sample SOAP
header containing the MaxCreditScore and MinCreditScore properties. We define the WBSF context element
explicitly in the Web Services Description Language (WSDL) for the ApprovalProcessInterface using the technique described in the article
"Tip: Implement explicit and implicit headers" (see Resources). We use service data object (SDO) application programming
interfaces (APIs) in a Java™ snippet within the BPEL process to add the MaxCreditScore and MinCreditScore property values to the context element. (Download sample code now.)
Listing 1. Sample SOAP header with WBSF context information for CreditScoreAssertion
<soapenv:Header> <Context xmlns="http://www.webifysolutions.com/2006/01/prism-context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <context-identifier xmlns="http://docs.oasis-open.org/wscaf/2005/10/wsctx">prism:begin </context-identifier> <property name="http://www.webifysolutions.com/context/interface"> http://CreditScoreCCApproval/ApprovalProcessInterface#ApprovalProcessInterface </property> <property name="http://www.webifysolutions.com/2006/11/jivaro2_schm#MaxCreditScore">600 </property> <property name="http://www.webifysolutions.com/2006/11/jivaro2_schm#MinCreditScore">600 </property> </Context> </soapenv:Header> |
We explicitly define the SOAP header context element in the ApprovalProcessInterface in WebSphere Integration Developer, as shown in Figure 29.
Figure 29. Explicit SOAP header in the ApprovalProcessInterface WSDL

You'll then update the message and binding elements of the WSDL, as follows.
- Launch Integration Developer, and open the SCA module that contains a BPEL.
- Import four XML schema definition files into this SCA project.
- Open the WSDL file with XML Source Page Editor.
- Import prism-context-1.0.xsd to the schema part of WSDL, as shown in Listing 2.
Listing 2. Import prism-context-1.0.xsd to ApprovalProcessInterface WSDL schema definition<xsd:schema targetNamespace="http://CreditScoreCCApproval/ApprovalProcessInterface" ...> <xsd:importnamespace="http://www.webifysolutions.com/2006/01/prism-context"schemaLocation="prism-context-1.0.xsd" /> <xsd:element name="approveRequest">......</xsd:element> <xsd:element name="approveRequestResponse"> ...... </xsd:element> </xsd:schema>
- As shown in Listing 3, add an additional part named
contextto the request message.
Listing 3. Add context part to request message in ApprovalProcessInterface WSDL<wsdl:message name="approveRequestRequestMsg"> <wsdl:part element="tns:approveRequest" name="approveRequestParameters" /> <wsdl:part element="bons2:Context" name="context" /> </wsdl:message> <wsdl:message name="approveRequestResponseMsg"> <wsdl:part element="tns:approveRequestResponse" name="approveRequestResult" /> </wsdl:message>
- Add
headeras an additional input in thebindingdefinition of WSDL, as in Listing 4.
Listing 4. Define SOAP header element as additional input in ApprovalProcessInterface WSDL binding<wsdl:binding name="ApprovalProcessExport_ApprovalProcessInterfaceHttpBinding" type="tns:ApprovalProcessInterface"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="approveRequest"> <soap:operation /> <wsdl:input name="approveRequestRequest"> <soap:body use="literal" /> <soap:header use="literal" message="tns:approveRequestRequestMsg" part="context" /> </wsdl:input> <wsdl:output name="approveRequestResponse"> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding>
- Save this WSDL file.
Add a Java snippet to set parameters in the SOAP header
In this step, you'll use SDO APIs to add the credit score of the applicant to the SOAP header as shown in the source code. We add a Java snippet: "Prepare the Fabric Context" with the code to the CreditCardApproval BPEL process.
- Double-click the BPEL component to open it.
- Create a variable named
FabricContextwhose type isContextTypeExt, a XSD type defined in prism-context-1.0.xsd. - Add a Java snippet before the invocation of the imported Web service ApprovalProcess.
- As shown in Listing 5, set the value of
FabricContextusing SDO APIs.
Listing 5. Java source code for adding MinCreditScoreProperty and MaxCreditScoreProperty to context element in SOAP headerString PRISM_CONTEXT_NS_URI = "http://www.webifysolutions.com/2006/01/prism-context"; String WS_CONTEXT_NS_URI = "http://docs.oasis-open.org/wscaf/2005/10/wsctx"; String PROPERTY_ELEMENT_TYPE = "ContextPropertyType"; String context_type = "ContextTypeExt"; String context_id_type = "contextIdentifierType"; String SERVICE_INTERFACE = "http://www.webifysolutions.com/context/interface"; String SUBSCRIPTION = "http://www.webifysolutions.com/context/subscription"; String ELEMENT_VALUE = ":0"; String ELEMENT_NAME_ATTRIBUTE = "name"; String PROPERTY_ELEMENT = "property"; String CONTEXT_IDENTIFIER_ELEMENT = "context-identifier"; String BEGIN_CONTEXT = "prism:begin"; String serviceInterface = "http://CreditScoreCCApproval/ApprovalProcessInterface#ApprovalProcessInterface"; String minCreditScoreProperty = "http://www.webifysolutions.com/2006/11/jivaro2_schm#MinCreditScore"; String maxCreditScoreProperty = "http://www.webifysolutions.com/2006/11/jivaro2_schm#MaxCreditScore"; //Instantiate the BOFactory BOFactory factoryService = (BOFactory) new ServiceManager(). locateService("com/ibm/websphere/bo/BOFactory"); if (FabricContext==null) FabricContext = factoryService.create(PRISM_CONTEXT_NS_URI,context_type); // CONTEXT IDENTIFIER -------------------------------------------- DataObject element = factoryService.create(WS_CONTEXT_NS_URI,context_id_type); element.setString(ELEMENT_VALUE, BEGIN_CONTEXT); FabricContext.setDataObject(CONTEXT_IDENTIFIER_ELEMENT,element); // ADDITIONAL CONTEXT PROPERTIES --------------------------------- List properties = new java.util.ArrayList(); DataObject property = null; // SERVICE INTERFACE property = factoryService.create(PRISM_CONTEXT_NS_URI, PROPERTY_ELEMENT_TYPE); property.setString(ELEMENT_VALUE, serviceInterface); property.setString(ELEMENT_NAME_ATTRIBUTE, SERVICE_INTERFACE); properties.add(property); // CONTENT MinCreditScore property = factoryService.create(PRISM_CONTEXT_NS_URI, PROPERTY_ELEMENT_TYPE); property.setString(ELEMENT_VALUE, CreditScore.toString()); property.setString(ELEMENT_NAME_ATTRIBUTE, minCreditScoreProperty); properties.add(property); // CONTENT MaxCreditScore property = factoryService.create(PRISM_CONTEXT_NS_URI, PROPERTY_ELEMENT_TYPE); property.setString(ELEMENT_VALUE, CreditScore.toString()); property.setString(ELEMENT_NAME_ATTRIBUTE, maxCreditScoreProperty); properties.add(property); FabricContext.setList(PROPERTY_ELEMENT,properties); - As shown in Figure 30, in the Invoke activity set FabricContext as the input parameter context.
Figure 30. Add a Java snippet to set FabricContext variable in SOAP header
- Save the change to this BPEL.
Set the URL of Dynamic Assembler as the endpoints of invoked Web services
In this step, you'll update the invocation link of the CreditCardApproval Web service (http://localhost:9080/fabric-engine/prism) so that the WBSF Dynamic Assembler can mediate requests to one of the two endpoints created in Create endpoints and metadata.
- Launch WebSphere Integration Developer, and switch to the Business Integration perspective.
- Double-click to open the module CreditCardApproval.
- In the Assembly Diagram view, as shown in Figure 31, select the Import component of the credit card approval process and show it in Properties.
Figure 31. Set URL of Dynamic Assembler as endpoints of invoked Web services
- In the Properties view, click Binding. You may see the endpoint of this import. Replace it with the URL of Dynamic Assembler (http://localhost:9080/fabric-engine/prism).
- Save the diagram.
You might need to install or upgrade to the right version of WebSphere Application Server and WebSphere Process Server. The following tips supplement the instructions in the WBSF V6.0 Foundation Pack Installation guide to successfully install the WBSF FP:
- Use the English version OS. If you don't have it, please add the OS environment
SKIP_VERSION_CHECK=truebefore you start the installation. - Use DB2 Version 8.2.3 or 8.1, or with fixpack 10. 9.1.
- Use WebSphere Process Server Version 6.0.1.3.
- The WebSphere Process Server profile location path should be short; for example, x:/pf/p1.
- WebSphere Process Server and DB2 should be running before launching the WBSF FP installation.
- WebSphere Service Registry and Repository (WSRR) is not needed for WBSF installation.
- If global security is enabled in WebSphere Process Server, disable it before installing WBSF.
To install WBSF V6.0 tool pack, follow these steps:
- Use WebSphere Integration Developer Version 6.0.1.2 or later.
- Install the tool pack to a location <WBSF_TP_Installation_Directory>
- From WebSphere Integration Developer, add the WBSF plug-in from this site:
<WBSF_TP_Installation_Directory>\Plugins\runtime\com.webify.wsf.studio.site-6.0.0.jar - Refer to <WBSF_TP_Installation_Directory>\Plugins\documentation\ FabricToolPackInstallGuide.pdf
To create an OCP file, the recommended method is discussed in Create a WBSF Ontology Content Pack file.
Comparing the WBSF solution to other possible solutions
The use case can also be implemented by using a mediation module with business rules in WebSphere Process Server. A mediation module is a type of SCA component that can be used to conditionally route a message to one or more target services based on the contents of the message. A business rule is a type of SCA component that can be used to capture and enforce policies.
The credit score limit for each endpoint (for example, 750) of the ApprovalProcessInterface can be implemented as a business rule so that it is configurable. A mediation module can be used to route the Invoke Approval Process service request to the appropriate endpoint.
A selector is another type of SCA component that can also be used to route a service invocation to one of several possible target implementation endpoints based on configuration. However, using a mediation module or a selector would both require writing Java code. In contrast, with WBSF the mediation logic is entirely implemented with content-based assertion (policies). The only code to write is for adding the credit score to the context element of the SOAP request. As a result, the WBSF solution is more flexible and configurable.
The advantage becomes apparent if the business requirements change in the future, requiring the addition of a new credit card approval subprocess (CCA3) for handling credit card applications for extremely low credit score applicants (credit score < 200). In the WBSF solution, the only changes required are 1) to add a new endpoint and a new CreditScoreAssertion instance with the MaxCreditScoreProperty set to 200 and the MinCreditScoreProperty set to 0; and 2) to change the MinCreditScore property of the CreditScoreAssertion associated with the LowCreditScoreEndpoint to 200. The alternative solution, with mediation modules or selectors and business rules, will require changing BPEL code and Java code, thus making it a costly solution to deploy.
This article describes how to use WBSF to achieve variability and dynamicity in a CBS application using a scenario of a credit card approval process. You learned how the WBSF core ontology can be extended (the CreditScoreAssertion) to create new criteria for routing decisions in a business process. The article also explains how dynamic endpoint selection in WBSF can be used for achieving late-binding of endpoints to service invocations.
Using WebSphere Business Services Fabric, instead of other techniques such as mediation module or selectors, has a few advantages:
- Greater flexibility: No code change overhead when incorporating new extensions to business processes.
- Greater configurability: Ability to change assertion properties (or policies) with adequate governance.
If this is your first encounter with a developerWorks article that includes
demos, here are a few things you might want to know:
Demos are an optional way to see the same steps described in this article. To see an
animated demo, click the Show me icon. The demo opens in a new browser window. Each demo
contains a navigation bar at the bottom of the screen. Use the navigation bar to to pause,
exit, rewind, or fast forward portions of the demo. The demos are 800 x 600 pixels. If
this is the maximum resolution of your screen or if your resolution is lower than this,
you will have to scroll to see some areas of the demo. JavaScript must be enabled in your
browser and Macromedia Flash Player 6 or later must be installed.
Download Adobe Flash Player.
| Description | Name | Size | Download method |
|---|---|---|---|
| Resources mentioned in this article | ar-cbspov2resource.zip | 294KB | HTTP |
| source code WID | ar-cbspov2resourceB.zip | 62KB | HTTP |
Information about download methods
Learn
-
Part 1 of this series, Choosing the right implementation
, gives an overview of the different options for designing and developing composite business services to cope with change, and describes the features and capabilities in IBM WebSphere software that can help you enable points of variability.
-
"Building SOA composite business services, Part 1:
Develop SOA composite applications to enable business services" (developerWorks, Oct 2006) discusses integrating existing SOA services by composing them in different ways.
- Service Component Architecture (SCA): Read about specifications for building systems that use an SOA for help with simpler and more powerful ways of constructing applications based on SOA.
-
Read an overview of OWL Web Ontology Language.
- OASIS Web Services Context
(ws-context) specifications (PDF) discusses multiple Web services being used in combination, and how the
ability to structure execution-related data called context becomes important.
-
Learn more about mediation modules, business rules, and selectors in WebSphere Process Server.
-
"Tip: Implement implicit and explicit SOAP headers" (developerWorks, Feb 2005) discusses how to define SOAP headers in a WSDL definition using explicit and implicit headers.
- In the
Architecture area on developerWorks, get the resources you need
to advance your skills in the IT architecture arena.
-
Browse the technology bookstore for books on these and other technical topics.
- Stay current with
developerWorks technical events and webcasts.
- RSS feed for this series. (Find out more about RSS.)
Get products and technologies
- WebSphere Business Service Fabric (WBSF)
- WebSphere Process Server
- WebSphere Integration Developer
- Protégé, a free open source ontology editor.
-
Get started now! Download more IBM product evaluation versions and get your hands on application development tools and middleware products from DB2®, Lotus®, Rational®, Tivoli®, and WebSphere.
Discuss
- Participate in the discussion forum.
-
Check out developerWorks
blogs and get involved in the developerWorks community.

Indrajit Poddar (IP) is a member of the Strategy, Technology, Architecture and Incubation (STAI) team in the IBM Software Group, where he is architecting a number of PoCs for building SOA composite business services using IBM SOA Foundation products.

DuoWei (David) Sun is a staff software engineer in China Software Development Lab (CSDL). He is currently working in the SOA development area.

Dr. Germán Goldszmidt is a Distinguished Engineer working in the IBM Software Group, with focus on architecture of an integrated platform to deliver, customize, and deploy SOA composite business services. Previously, he was a researcher at the IBM T.J. Watson Research Center, and he led the design and implementation of several technologies, including Océano, the first prototype autonomic computing eUtility, and Network Dispatcher, the load balancer component of WebSphere products.





