Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Adding custom roles in WebSphere Business Services Fabric

Salil Ahuja (sahuja@us.ibm.com), SOA Solutions Architect, IBM
Salil Ahuja photo
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.

Summary:  Learn how you can add custom roles to the WebSphere® Business Services Fabric V6.1 business model using Rational® Software Architect and the Fabric modeling tool. Once you add these roles, you can build policies and assertions around them.

Date:  11 Jun 2008
Level:  Introductory
Also available in:   Chinese

Activity:  3791 views
Comments:  

Introduction

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.


Software requirements

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.


Overview of the use case

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:

  1. Step 1: Create a new Fabric core model
  2. Step 2: Transform the UML model into a Fabric content archive
  3. Step 3: Create the Fabric artifacts for the project
  4. 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.

  1. Create a new UML project called FabricRoleExtProject and a model called FabricRoleExtModel that references Fabric-Model-Stub and wbsf_profile by completing the following steps:
    1. In Software Architect, select File => New => Project, as shown in Figure 1.

      Figure 1. Select new project
      Figure 1. Select new project

    2. Select UML Project and click Next, as shown in Figure 2.

      Figure 2. Select UML project
      Figure 2. Select UML project

    3. Specify FabricRoleExtProject for the project name, and click Next.
    4. Specify FabricRoleExtModel for the model name, and click Next.
    5. Add a reference to Fabric-Model-Stubs, and click Finish, as shown in Figure 3.

      Figure 3. Add reference to Fabric-Model-Stubs
      Figure 3. Add reference to Fabric-Model-Stubs

  2. Add a Fabric core ontology profile, by doing the following:
    1. Select FabricRoleExtModel and click the Details tab, as shown in Figure 4. If you receive a warning message, ignore it.

      Figure 4. FabricRoleExtModel properties
      Figure 4. FabricRoleExtModel properties

    2. Click Add in the Applied Profiles section.
    3. In the Select Profile dialog, select Fabric Core Ontology Profile, and click OK, as shown in Figure 5.

      Figure 5. Select applied profile
      Figure 5. Select applied profile

    4. Save the project.
  3. To add the XSDDataTypes model library to FabricRoleExtProject:
    1. Select FabricRoleExtModel and click the Details tab.
    2. Click Add in the Model Libraries.
    3. 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
      Figure 6. Associate XSDDataTypes library with FabricRoleExtProject

    4. Save the project.
  4. Create a new package called FabricRoleExtPkg with the stereotype fabricNamescape by doing the following:
    1. Right-click FabricRoleExtModel and select Add UML => Package, as shown in Figure 7.

      Figure 7. Add new package to the model
      Figure 7. Add new package to the model

    2. Specify FabricRoleExtPkg as the name.
    3. Select FabricRoleExtPkg and click the Properties tab.
    4. Select Stereotypes => Apply Stereotypes, check fabricNamescape, then click OK, as shown in Figure 8.

      Figure 8. Add the new package to the model
      Figure 8. Add the new package to the Model

    5. Save the project.
  5. 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
    Figure 9. Specify                             stereotype properties

  6. Create a new class in the package called CheckinClerkRole by doing the following:
    1. Select Fabric-Model-Stubs => Models => Subscriber Ontology => Role.
    2. Drag the Role OWL class into the model window of FabricRoleExtMode => FabricRoleExtPkg => Main window, as shown in Figure 10.

      Figure 10. Drag Role to model
      Figure 10. Drag role to model

    3. 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
      Figure 11.                                     Create a new OWL class

    4. Add the OWLclass stereotype to AcmeOrg, as shown in Figure 12.

      Figure 12. Add OWLclass stereotype to AcmeOrg
      Figure 12.                                      Add OWLclass stereotype to AcmeOrg

    5. Create a generalization to the OWLclass role, as shown in Figure 13.

      Figure 13. Create generalization
      Figure 13.                                     Create generalization

  7. Create another class called CheckinClerkRole of stereotype OWLclass with a generalization to AcmeOrg.
  8. 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
    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
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:

  1. In Software Architect, select Modeling => Transform => New Configuration, as shown in Figure 16.

    Figure 16. Create a new configuration
    Figure 16. Create a                             new configuration

  2. In the New Transformation Configuration dialog, shown in Figure 17, specify FabricRoleExtTransformation for the name, and select OWL Transformation from the list.
  3. Click Finish.

    Figure 17. Create new transformation
    Figure 17. Create new                             transformation

  4. Select FabricRoleExtModel for both the source and target, as shown in Figure 18, and click Finish.

    Figure 18. Specify source and target
    Figure 18. Specify source and target

  5. 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:

  1. Log in as administrator to the Fabric administrative console at http://<hostname:portnumber>/fabric.
  2. 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.
  3. 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
    Figure 19.                             Create FabricRoleExt project

  4. 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
    Figure 20. Create                             FabricRoleExt project

  5. Select Import/Export and click the Export by project tab.
  6. 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
    Figure 21. Export the project

  7. Extract the contents of the FabricRoleExt<date>-owl.zip file to a temporary location.
  8. Find the OWL ransformation file FabricRoleExtPkg.owl in <RSAWorkspace>/FabricOWLProject/Fabricroleextensiondir.
  9. Copy FabricRoleExtPkg.owl to the temporary location specified in Step 7.
  10. Delete http_www.ibm.com_industry_poc_role_extension.owl from the temporary location.
  11. Rename FabricRoleExtPkg.owl to http_www.ibm.com_industry_poc_role_extension.owl.
  12. 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:

  1. Log in as administrator to the Fabric administrative console at http://<hostname:portnumber>/fabric.
  2. Select Governance Manager => Import/Export.
  3. Import FabricRoleImportExt.zip file into the Fabric business services catalog, as shown in Figure 22.

    Figure 22. Import the roles into Fabric
    Figure 22. Import the                             roles into Fabric

  4. Ensure that the file imports successfully, as shown in Figure 23.

    Figure 23. File imported successfully
    Figure 23. File                             imported successfully

  5. After importing the file, replicate the catalog in Composition Studio. The new roles are now available for building business policies and assertions.

Summary

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.


Resources

About the author

Salil Ahuja photo

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.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

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, SOA and Web services
ArticleID=312910
ArticleTitle=Adding custom roles in WebSphere Business Services Fabric
publish-date=06112008
author1-email=sahuja@us.ibm.com
author1-email-cc=crothemi@us.ibm.com

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.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

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).

Try IBM PureSystems. No charge.

Special offers