Skip to main content

Building SOA composite business services, Part 5: Using IBM WebSphere Business Modeler

Best practices, gaps, and lessons learned

Qiang Wang (wangq@cn.ibm.com), Software Engineer, IBM
Qiang Wang photo
Qiang Wang works as a software engineer in the China Emerging Technology Institute, China Software Development Laboratory. He concentrates on IBM Incubator Projects and SOA-related topics. His interests include J2EE, SOA, MDA/MDD, AOP, RUP, and project management. He is currently working on an SOA pilot called composite business services (CBS).
Mary Taylor (marytaylor@us.ibm.com), Senior Software Engineer, IBM
Mary Taylor photo
Mary Taylor is a senior software engineer. She is working in the Strategic Technology Architecture and Incubation team, and she is currently working on an SOA CBS pilot. Her interests include DB2 and DataStage.

Summary:  This article is the fifth in a series about developing composite applications to enable business services. Composite Business Services components are compliant with the Service Component Architecture and are developed using an integrated tool suite, which includes IBM WebSphere® Business Modeler (WBM) and IBM WebSphere Integration Developer (WID). The runtime for the artifacts these tools generate is the IBM WebSphere Process Server. This article describes best practices for modeling, assembling, and deploying business processes using WBM V6. It also identifies some gaps in the integration of WBM and WID, and it describes some lessons learned during the example process modeling work, which is based on a real use case described in the article.

View more content in this series

Date:  22 Mar 2007
Level:  Intermediate
Activity:  1725 views

Introduction

WebSphere Business Modeler (WBM) Advanced Edition Version 6 enables business analysts to construct a business model for a composite business service (CBS) without getting bogged down with the technical details of software development. WBM also provides an export function that transforms its model artifacts into IBM WebSphere Integration Developer (WID) artifacts. WBM Advanced Edition can transform:

  • Business processes into Business Process Execution Language (BPEL) skeletons
  • Interfaces into Web Services Description Language (WSDL) files
  • Business items and other type definitions into XML schema definition (XSD) files and business object (BO) definitions

There are challenges to transforming business processes into BPEL skeletons. This article describes best practices for modeling, assembling, and deploying business processes using WBM V6. It also identifies some gaps in the integration of WBM and WID, and it describes some lessons learned during the example process modeling work, which is based on a real use case called credit card request.

Introducing the credit card request use case example

The example implementation of a credit card request scenario (see Figure 1) illustrates best practices. In this use case, a bank customer is applying for a credit card product using the bank's portal. The user interface (UI) invokes a BPEL process that retrieves the customer’s social security number (SSN) from his profile to invoke the credit score service. Based on the credit score that the service returns, the credit card request is automatically rejected, approved, or forwarded to a manager for manual review. The decisions are controlled through a set of business rules based on the credit score. If the request is automatically rejected, the status is logged, and a notification is sent to the customer. If the request is automatically approved, the status is logged, the credit card fulfillment process is initiated, and a notification is sent to the customer. If manual approval is necessary, a second workflow (shown in Figure 2) is initiated.


Figure 1. Credit card request process in WBM
Credit card request process in WBM

Note: A larger view of Figure 1 is available.

When a credit card request requires manual approval, the bank employee reviews additional information regarding the applicant and the product. Then the bank employee approves or rejects the application. If the request is rejected, the request is logged, and a notification is sent to the customer. If the request is approved, a decision (implemented through business rules) determines whether a bank manager's approval is also needed. If not, the request status is logged, the credit card fulfillment process is initiated, and a notification is sent to the customer. If a bank manager’s approval is needed, the bank employee's approval is logged, and the request is routed to the bank manager. The bank manager either approves or rejects the request. The bank manager's decision is logged and a notification is sent to the customer.


Figure 2. Credit card approval process
Credit card approval process

Note: A larger view of Figure 2 is available.

Best practices

This article describes best practices for modeling, assembling, and deploying business processes using WBM V6.

Using an efficient business model assembly technique

If a change to an existing business process is required, you can do one of the following:

  • Use WBM to model and simulate that change and then generate the BPEL for that process
  • Implement the change directly in the deployable artifacts

For minor changes, the BPEL process within WID can be changed, tested, and deployed. The function to import a WID BPEL back into WBM does not currently exist. This limitation implies that to keep the WBM and WID models in sync, you need to make all changes in WBM and then regenerate the BPEL to feed WID. If the changes to the BPEL do not significantly change the flow of the model in WBM, it is best to make the changes directly in WID. For major changes to a business process, the BPEL model should be re-generated from WBM and imported into WID. From there, the process assembly would continue using the pre-existing assets from the previous business process.

Avoiding duplicate SCA components

You can use Global or Local tasks in the process diagram. You can add the same Global task multiple times into one or more business processes by simply dragging its icon from the project tree into the process diagrams. This results in a single SCA component being created for that Global task during the transformation process. If you instead add different Local task icons from the process diagram palette into the diagram to represent multiple instances of the same service, although those different Local task icons actually represent the same service, they are regarded as different tasks during the transformation process. In this case, duplicate SCA components are created. In Figure 3, there are two Local Log Credit Card Request tasks in the Credit Card Request process. The transformation utility in WBM regards each Local task as a different service, and the utility generates a unique SCA component for each Local task in the SCA module. In the example, each Local log task yields an SCA component. In order to remove the redundancy, revise the structure of the generated assembly diagram manually.

Note: For best results, business analysts should identify reusable business tasks, and then create those tasks as Global tasks in WBM.


Figure 3. Duplicate SCA components
Duplicate SCA components

Note: A larger view of Figure 3 is available.


Gaps between WBM and WID

To transform the processes into BPEL process skeletons, model the business process in the WebSphere Process Server editing mode in WBM. Be aware of restrictions on the modeling element types you can use in this mode so that the process is compatible with BPEL. The following element types are not available in Process Server mode:

  • Business item instance
  • Do-while loop
  • For loop
  • Notification broadcaster
  • Notification receiver
  • Observer
  • Global repository
  • Timer

In a customer environment, you might need to use some of the model element types above, which accounts for the gaps between the pure business model or process WBM constructs and the BPEL process in WID. You can include all the unavailable element types listed above into your process as long as you are in the WBM Basic mode. A process in Basic mode is a pure business process, which has no dependency on specific technologies, such as BPEL or FDL for WebSphere MQ Workflow. When you switch from Basic mode to WebSphere Process Server mode, any of the element types above causes an error.


Lessons learned

This article describes lessons learned for modeling, assembling, and deploying business processes using WBM V6.

Supporting process dependencies in WBM

Sometimes you want to depict a BPEL process that is dependent on another BPEL process, for example: A invokes B as a service. Do this in WBM by using global processes. Connect two global processes by specifying a dependency between them (see the process dependency in Figure 1 ). Although there is a sub-process concept in WBM, the sub-process inside the business process is transformed into a flow structure inside the parent BPEL process instead of a separate BPEL process. Also, although in the Technical Attributes View in WBM you can specify a task as a process that can then be transformed into a standalone BPEL process, you cannot model that standalone process in WBM. Sometimes you need a separate BPEL process that can be modeled to be generated, because you will reuse that BPEL process in different scenarios. Or you might need to make that BPEL process a long-running process while its parent BPEL process is a short-running process. Use a global process for this kind of dependency relationship. If you are using local processes, manually create a dependency after running the transformation process by modifying the generated BPEL process skeleton.

Considering task granularity when using Java snippets

WID supports the capability to embed Java™ snippets inside a BPEL process. The SCA programming model also provides Java architecture as an implementation type for an SCA component. Normally, if you need some minor function within the BPEL processes, such as a simple calculation, you can embed this code in a Java snippet inside the BPEL process. However, if the business logic from the Java code needs to be reused or is complex, you can put the logic inside a standalone Java type SCA component, which a BPEL process can reference as a common SCA service. When you use WBM to model a process and you want to transform the process into a BPEL process, consider the granularity of each task. If the granularity of one task is adequate (realizing simple functions), use a map element in WBM, which can be transformed to an empty Java snippet in the generated BPEL process skeleton.


Figure 4. Java snippet example
Java snippet example

In Figure 4, there is one Auto Approve the Request map element. After exporting this business process to a BPEL skeleton, this map element will be transformed into a Java snippet inside the generated BPEL skeleton instead of a standalone SCA component.

Using the technical attributes view

The technical attributes view in WBM, as shown in Figure 5, provides an optional way to specify technical details that are used to implement a process, global task, or service on WPS. By using the capabilities provided in this view, you can simplify the downstream implementation tasks. When exporting a business process using the WPS export, default values are provided for the technical attributes. You can override these defaults by using the technical attributes view to specify values. For processes, tasks, and services, the Implementation page in the technical attributes view contains the element's SCA information. This information is used to implement the element as an SCA component. There are five implementation types provided in the technical attributes view of the WPS modeling mode:

  • State machine
  • Business rule group
  • Human task
  • Java
  • Process

For example, if you choose the implementation type of a task as a business rule type, you can add concrete business rule requirement descriptions in WBM. When you transform the WBM project into BPEL and import the project into WID, the original WBM task is transformed to a Business Rule Group component with the same requirements description you added in WBM. Then you can design a business rule set in WID to realize those requirements.


Figure 5. Technical attributes view
Technical attributes view

Note: A larger view of Figure 5 is available.

The human task is a special case. After running the transformation process, this task is transformed to a standalone human task component. If you do not need a standalone human task, leave the implementation type as none in the technical attributes view, and go to the attributes view to assign one staff role to this task. After the transformation process, this task will be transformed to an embedded human task instead of a standalone human task component.

Generating the WID BPEL process

To generate the Credit Card Request and Credit Card Approval processes in WID (see Figure 6), run the export and transformation wizard to generate the credit card request and approval BPEL skeletons. Then, adjust and add code to flesh out the generated BPEL skeletons, which yields the processes that you can then deploy to WPS 6.


Figure 6. WID process
WID process

Note: A larger view of Figure 6 is available.


Summary

This article described some best practices, gaps, and lessons learned during process modeling work using WBM V6. These include:

  • Best practices
    • Using an efficient business model assembly technique
    • Avoiding duplicate SCA components
  • Gaps between WBM and WID
  • Lessons learned
    • Supporting process dependencies in WBM
    • Considering task granularity when using Java snippets
    • Using the technical attributes view

Resources

Learn

Get products and technologies

  • Download IBM product evaluation versions and get your hands on application development tools and middleware products from DB2®, Lotus®, Rational®, Tivoli®, and WebSphere®.

Discuss

About the authors

Qiang Wang photo

Qiang Wang works as a software engineer in the China Emerging Technology Institute, China Software Development Laboratory. He concentrates on IBM Incubator Projects and SOA-related topics. His interests include J2EE, SOA, MDA/MDD, AOP, RUP, and project management. He is currently working on an SOA pilot called composite business services (CBS).

Mary Taylor photo

Mary Taylor is a senior software engineer. She is working in the Strategic Technology Architecture and Incubation team, and she is currently working on an SOA CBS pilot. Her interests include DB2 and DataStage.

Comments (Undergoing maintenance)



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=SOA and Web services, WebSphere
ArticleID=202830
ArticleTitle=Building SOA composite business services, Part 5: Using IBM WebSphere Business Modeler
publish-date=03222007
author1-email=wangq@cn.ibm.com
author1-email-cc=flanders@us.ibm.com
author2-email=marytaylor@us.ibm.com
author2-email-cc=flanders@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