WebSphere Business Services Fabric (hereafter called Fabric) provides an end-to-end platform for creating and managing composite business applications by leveraging related business processes and services. In order to create composite business applications, Fabric provides the ability to adapt and extend the base Fabric business model to your business domain, including extending roles, assertions and channels.
The flexibility in SOA-based industry-specific solutions is typically driven by business policies that help adapt business processes to different business scenarios. It's common, especially during proof of concepts and technical demonstrations of Fabric, to create business policies around user roles. In order to do this, Fabric developers first need to adapt the Fabric business model to the business domain by adding custom roles to the base set of roles provided. This article describes how to do this. After adding the custom roles to the Fabric business model, administrators can create policies and assertions around them.
In this article, you'll learn how to add custom roles to the Fabric business model using the Fabric modeling tool. To get the most out of this article, you should have a good understanding of Fabric, ontology, and universal modeling language (UML) modeling.
Important: This article is based on Fabric V6.1 and does not apply to older versions, such as V6.0.2.
In order to complete the steps in this article, you'll need Rational® Software Architect V7 (hereafter called Software Architect) or above with the following plug-ins installed:
- UML modeling
- UML-to-UML transformations and patterns
- WSDL and XSD modeling and transformations
- Transformation authoring
- Fabric Modeling Tool
- WebSphere Business Services Fabric Core Stubs (available as part of the Fabric Tool Pack V6.1)
More information: Refer to Chapter 8.7.1 in the IBM Redbook Getting Started with IBM WebSphere Business Services Fabric V6.1 for detailed installation instructions for the plug-ins.
Fabric ships with a few basic roles, such as Administrator, QA Engineer, and so on. For the use case in this article, we'll build a role-based service subscription at a medical clinic called AcmeOrg. The solution should provide an authenticated user with access to a provisioned set of services based on the user's role. The first step to achieve this is to add the roles to the Fabric business model. In our example, we'll add Physician, CheckInClerk and Patient roles.
In this article, we'll walk through the steps to add custom roles. We won't cover setting up role-based access.
To add the custom roles, you'll perform the following steps, which are described in detail in the following sections:
- Step 1: Create a new Fabric core model
- Step 2: Transform the UML model into a Fabric content archive
- Step 3: Create the Fabric artifacts for the project
- Step 4: Import the custom roles into the project
Step 1: Create a new Fabric core model
Creating a Fabric core model involves creating a new UML model in Software Architect that contains Fabric elements like channels, roles and policy assertions. These model elements combined with the ontology stereotypes are transformed into Web Ontology Language (OWL) constructs that can then be imported into Fabric Web tools. Developers can then use these imported assertions, channels, and roles in Rational Software Architect Composition Studio to model business policies, assign channels and roles to business services, aso on. In this article, we'll focus on extending roles.
- Create a new UML project called
FabricRoleExtProjectand a model calledFabricRoleExtModelthat referencesFabric-Model-Stubandwbsf_profileby completing the following steps:- In Software Architect, select File => New =>
Project, as shown in Figure 1.
Figure 1. Select new project
- Select UML Project and click Next, as shown in
Figure 2.
Figure 2. Select UML project
- Specify
FabricRoleExtProjectfor the project name, and click Next. - Specify
FabricRoleExtModelfor the model name, and click Next. - Add a reference to Fabric-Model-Stubs, and click
Finish, as shown in Figure 3.
Figure 3. Add reference to Fabric-Model-Stubs
- In Software Architect, select File => New =>
Project, as shown in Figure 1.
- Add a Fabric core ontology profile, by doing the following:
- Select FabricRoleExtModel and click the Details
tab, as shown in Figure 4. If you receive a warning message,
ignore it.
Figure 4. FabricRoleExtModel properties
- Click Add in the Applied Profiles section.
- In the Select Profile dialog, select Fabric Core Ontology
Profile, and click OK, as shown in Figure 5.
Figure 5. Select applied profile
- Save the project.
- Select FabricRoleExtModel and click the Details
tab, as shown in Figure 4. If you receive a warning message,
ignore it.
- To add the XSDDataTypes model library to FabricRoleExtProject:
- Select FabricRoleExtModel and click the Details tab.
- Click Add in the Model Libraries.
- Under Deployed Library, select XSDDataTypes and
click OK, as shown in Figure 6, to add the model
library to FabricRoleExtProject.
Figure 6. Add XSDDataTypes library to FabricRoleExtProject
- Save the project.
- Create a new package called FabricRoleExtPkg with the stereotype
fabricNamescape by doing the following:
- Right-click FabricRoleExtModel and select Add UML
=> Package, as shown in Figure 7.
Figure 7. Add new package to the model
- Specify
FabricRoleExtPkgas the name. - Select FabricRoleExtPkg and click the Properties tab.
- Select Stereotypes => Apply Stereotypes, check
fabricNamescape, then click OK, as shown in
Figure 8.
Figure 8. Add the new package to the model
- Save the project.
- Right-click FabricRoleExtModel and select Add UML
=> Package, as shown in Figure 7.
- Add the following properties to the fabricNamespace
stereotype, as shown in Figure 9:
-
directory: Specify the directory where the transform
OWL should be stored. In this example,
Fabricroleextensiondir. - uri: Specify the namespace URI. This uri should match the schema namespace for the Fabric project that these roles will belong to. In this example, http://www.ibm.com/industry/poc/role/extension.
Figure 9. Specify stereotype properties
-
directory: Specify the directory where the transform
OWL should be stored. In this example,
- Create a new class in the package called
CheckinClerkRoleby doing the following:- Select Fabric-Model-Stubs => Models => Subscriber Ontology => Role.
- Drag the
RoleOWL class into the model window of FabricRoleExtMode => FabricRoleExtPkg => Main window, as shown in Figure 10.
Figure 10. Drag Role to model
- Create a new OWL class by selecting Add UML =>
Class, as shown in Figure 11, and name it
AcmeOrg
Figure 11. Create a new OWL class
- Add the OWLclass stereotype to AcmeOrg, as shown in Figure
12.
Figure 12. Add OWLclass stereotype to AcmeOrg
- Create a generalization to the OWLclass role, as shown in
Figure 13.
Figure 13. Create generalization
- Create another class called
CheckinClerkRoleof stereotype OWLclass with a generalization to AcmeOrg. - Repeat Step 7 to add the roles Physician and Patient. When you're
done, the FabricRoleExtModel UML model should look like Figure 14.
Figure 14. UML model of the custom roles
Note: If the business domain you're adapting the Fabric Business Model to doesn't require grouping the roles under a main group or department like in our example, you can directly associate the custom roles to the Role owl class in the Fabric Model, as shown in Figure 15.
Figure 15. UML model without grouping the roles
Step 2: Transform the UML model into a Fabric content archive
Now that you've added all the roles in the model, you need to transform the UML model into a Fabric content archive (hereafter called FCA) file to import it into Fabric. To do this, complete the following steps:
- In Software Architect, select Modeling => Transform
=> New Configuration, as shown in Figure 16.
Figure 16. Create a new configuration
- In the New Transformation Configuration dialog, shown in Figure 17,
specify
FabricRoleExtTransformationfor the name, and select OWL Transformation from the list. - Click Finish.
Figure 17. Create new transformation
- Select FabricRoleExtModel for both the source and target, as
shown in Figure 18, and click Finish.
Figure 18. Specify source and target
- To perform the transform, right-click FabricRoleExtTransformation and select Transform => OWL Transformation.
Upon transformation, the generated OWL files are created in
FabricOWLProject in the Fabricroleextensiondir folder you specified for
the directory property for the fabricNamespace
stereotype in the FabricRoleExtPkg => fabricNamespace stereotype
properties.
The generated OWL should look similar to the following:
<?xml version="1.0"?>
<rdf:RDF xml:base="http://www.ibm.com/industry/poc/role/extension2"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:fabric-core="http://www.webifysolutions.com/2005/10/catalog/core#"
xmlns:fabric-assertion="http://www.webifysolutions.com/2005/10/catalog/assertion#"
xmlns:fabric-subscriber="http://www.webifysolutions.com/2005/10/catalog/subscriber#"
xmlns:fabric-service="http://www.webifysolutions.com/2005/10/catalog/service#"
xmlns:fabric-time="http://www.webifysolutions.com/2005/10/catalog/time#"
xmlns:fabric-bcpm="http://www.ibm.com/websphere/fabric/bcpm#"
xmlns="http://www.ibm.com/industry/poc/role/extension#" >
<owl:Ontology rdf:about="">
<owl:imports rdf:resource="http://www.webifysolutions.com/
2005/10/catalog/subscriber"/>
</owl:Ontology>
<owl:Class rdf:about="#AcmeOrg">
<rdfs:subClassOf>
<owl:Class rdf:about="http://www.webifysolutions.com/2005
/10/catalog/subscriber#Role"/>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="#CheckinClerkRole">
<rdfs:subClassOf>
<owl:Class rdf:about="#AcmeOrg"/>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="#Physcian">
<rdfs:subClassOf>
<owl:Class rdf:about="#AcmeOrg"/>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="#Patient">
<rdfs:subClassOf>
<owl:Class rdf:about="#AcmeOrg"/>
</rdfs:subClassOf>
</owl:Class>
</rdf:RDF>
|
Step 3: Create the Fabric artifacts for the project
To create a Fabric ontology extension project that will own the custom roles in the business service catalog, do the following:
- Log in as administrator to the Fabric administrative console at http://<hostname:portnumber>/fabric.
- Select Subscriber Manager => Manage Subscribers and create a new organization called ACME. You can skip this step if you want to associate this project with another organization.
- Create a new project called FabricRoleExt of type Ontology Extension,
as shown in Figure 19, and associate it with the ACME organization or
other desired organization.
Figure 19. Create FabricRoleExt project
- Add the same schema namespace
(http://www.ibm.com/industry/poc/role/extension) to the project that
you added to package above, as shown in Figure 20.
Figure 20. Create FabricRoleExt project
- Select Import/Export and click the Export by project tab.
- Select Full Content for the Content Type,
FabricRoleExt for the Project, check the
RoleExtSchema namespace, and click Export to File,
as shown in Figure 21, to save the generated
FabricRoleExt<date>-owl.zip to your hard drive.
Figure 21. Export the project
- Extract the contents of the FabricRoleExt<date>-owl.zip file to a temporary location.
- Find the OWL ransformation file FabricRoleExtPkg.owl in <RSAWorkspace>/FabricOWLProject/Fabricroleextensiondir.
- Copy FabricRoleExtPkg.owl to the temporary location specified in Step 7.
- Delete http_www.ibm.com_industry_poc_role_extension.owl from the temporary location.
- Rename FabricRoleExtPkg.owl to http_www.ibm.com_industry_poc_role_extension.owl.
- Zip content.xml and http_www.ibm.com_industry_poc_role_extension.owl into a compressed file called FabricRoleImportExt.zip.
Step 4: Import the custom roles into Fabric
To import the zip file into the Fabric business services catalog, do the following:
- Log in as administrator to the Fabric administrative console at http://<hostname:portnumber>/fabric.
- Select Governance Manager => Import/Export.
- Import FabricRoleImportExt.zip file into the Fabric business services
catalog, as shown in Figure 22.
Figure 22. Import the roles into Fabric
- Ensure that the file imports successfully, as shown in Figure 23.
Figure 23. File imported successfully
- After importing the file, replicate the catalog in Composition Studio. The new roles are now available for building business policies and assertions.
Following the steps in this article, you should have successfully created and imported custom roles, which Fabric administrators build policies and assertions around. Administrators can also subscribe services to these custom roles using the Fabric Subscriber Manager.
-
WebSphere Business Service
Fabric:
Get product information, including requirements, features, training and
more.
-
WebSphere Business Services Fabric V6.1 Information Center:
Get complete product documentation.
-
Getting started with IBM WebSphere
Business Service 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 business
process management zone:
Get the latest technical resources for IBM BPM solutions, including
technical articles and tutorials, downloads, events, education, and more.

Salil Ahuja is an SOA Solutions Architect in the Industry SOA Accelerators group in IBM Software Services for WebSphere. He joined IBM with the acquisition of Webify Solutions. Salil works with clients to help them leverage IBM business process management tools to meet their business needs. His focus is on WebSphere Business Services Fabric and he has years of experience working with large healthcare payers. You can reach Salil at sahuja@us.ibm.com.




