IBM BPM V7.5 orchestration scenarios, Part 1: Top-down design using IBM Process Designer and IBM Integration Designer

Learn to create a simple top-down process in IBM® Business Process Manager Advanced V7.5 by creating a Business Process Model and Notation business process in IBM Process Designer and invoking a BPEL integration service that is created in IBM Integration Designer. This tutorial shows how a BPMN process can easily invoke an SCA service.

Share:

Ashok Iyengar (ashoki@us.ibm.com), Executive IT Specialist, IBM China

Ashok Iyengar photoAshok Iyengar is a member of IBM for Software Services for WebSphere (ISSW). He has worked extensively with the IBM Business Process Management platform doing proof of concepts, pilots, and architecture design. Currently his focus is on the cloud, specializing in Platform as a Service (PaaS). He helps customers deploy patterns on IBM PureApplication Systems and IBM SmartCloud.


developerWorks Contributing author
        level

Kent Below (kbelow@us.ibm.com), Advisory Software Engineer, IBM

Author photo of Kent BelowKent Below is a Software Engineer in the Business Process Management Bring-up Lab in Rochester, Minnesota. Kent has over 10 years of experience with BPM, automation, and integration. He works with BPM development teams to deliver products that allow customers to continuously improve their business processes. He is currently working to integrate multiple IBM products to support common business patterns.



14 September 2011

Also available in Portuguese

About this tutorial

This tutorial shows you how to create a simple top-down process in IBM Business Process Manager (BPM) Advanced V7.5. In a typical top-down process scenario, a Business Process Model and Notation (BPMN) business process created in IBM Process Designer (hereafter called Process Designer) invokes a Service Component Architecture (SCA) based service that is created in IBM Integration Designer (hereafter called Integration Designer).

This tutorial is the first of a 4-part tutorial series that describes orchestration scenarios in IBM BPM Advanced V7.5. The four scenarios are:

  • Top-down
  • Bottom-up
  • Straight through processing
  • Straight through processing with exception

Objectives

In this tutorial, you will learn how to:

  • Create a business process using Process Designer.
  • Create a service using Integration Designer.
  • Run the business process to invoke that service.

This tutorial has three parts:

  • In Part 1, you work with Process Designer to create a process application containing a Business Process Definition (BPD).
  • In Part 2, you work with Integration Designer to implement an Advanced Integration Service in the Process Application.
  • In Part 3, you use Process Designer to run the Business Process Definition, which in turn invokes the Advanced Integration Service.

Prerequisites

You need to be familiar with business processes.

System requirements

  • IBM BPM Advanced V7.5 Process Center
  • IBM Process Designer V7.5 (capable of communicating with Process Center)
  • IBM Integration Designer V7.5 (capable of communicating with Process Center)

Duration

This tutorial takes about 2 hours to complete.


Part 1: Working with Process Designer

You will use Process Designer to create a simple BPMN process commonly referred to as the Business Process Design or BPD. The business process will contain three activities.

  1. Launch Process Designer. On the login screen, enter the proper credentials, such as tw_admin/tw_admin shown in Figure 1. Click Login.
    Figure 1. Process Designer login screen
    Process Designer login screen
  2. If the Welcome screen comes up, close it.
  3. In the menu on the right, click Create New Process App, as shown in Figure 2.
    Figure 2. Menu option to create a new process app
    Menu option to create a new process app
    1. Enter Top Down 1 for the Process App Name as shown in Figure 3.
    2. Enter TOPDN1 for the Acronym.

      Note: The acronym acts as an identifier for the project and its related library items. It must be unique and is limited to 7 characters. An acronym cannot start with a number and cannot include special characters or spaces.

    3. The Description field is optional. Click Create.
      Figure 3. Details about the new process app
      Details about the new process app
    4. The process app gets added to the list.
    5. Click Open in Designer that is next to the newly created app (Top Down1), as shown in Figure 4. The Designer perspective is displayed.
      Figure 4. Option to open the process app in Process Designer
      Option to open the process app in Process Designer

Create a Business Process Definition (BPD)

  1. In the Designer perspective, click the plus sign (+) next to Processes.
  2. Select Business Process Definition as shown in Figure 5.
    Figure 5. Option to create a BPD
    Option to create a BPD
    1. Give the BPD a name, such as TopDown1Bpd, as shown in Figure 6.
    2. Click Finish.
      Figure 6. Naming the BPD
      Naming the BPD
  3. The Diagram View is displayed with a Start node and an End node. Before you create the process model, add a variable to the BPD that will carry the data. In this case, add a Private Variable.
    1. Click the Variables tab and then click the Add Private button as shown in Figure 7.

      Note: Variables are analogous to business objects. They carry the data or payload through the Business Process. There are three kinds of variables: private, input, and output. Private variables are local variables that are only used within the process. Input variables are mapped to values that you can pass into the current process. Output variables are mapped to values that you can pass out from the current process to a parent process.

      Figure 7. Adding a private variable
      Adding a private variable
    2. Name the variable as data, as shown in Figure 8.
    3. Ensure the variable type is String.
    4. Check the Has Default box.
    5. Provide any default values within double-quotes.
      Figure 8. Details about the variable
      Details about the variable

Adding activities

  1. Go back to the Diagram View by clicking the Diagram tab. Now you can add activities to the BPD.
  2. Add three activities in the System swim lane:
    1. From the palette on the right, click the Activity tool and then drag it to the System swim lane, as shown in Figure 9.
      Figure 9. Diagram view
      Diagram view
    2. Repeat that step two more times to add a total of three activities to the System swim lane, which are named Untitled, Untitled1, and Untitled2.
  3. Select the Sequence Flow tool, as shown in Figure 10.
    Figure 10. Sequence Flow tool
    Sequence Flow tool
  4. Connect the three activities starting from the Start node, in a linear manner, ending with the End node, similar to what is shown in Figure 11.
    Figure 11. Diagram with three activities
    Diagram with three activities
  5. Press Ctrl+S (or click the Save icon) to save your edits.

Creating services

  1. Now create services for the activities. Revert back to the Selection Tool as shown in Figure 12.
    Figure 12. Selection Tool
    Selection Tool
    1. Right-mouse click on the activity named "Untitled" and select Activity Wizard.
    2. Name the activity, debug, as shown in Figure 13.
    3. Make it a System Service (without human interaction).
    4. Choose Create a New Service, name it debug, and click Next.
      Figure 13. Setting up an activity
      Setting up an activity
    5. Notice that the data variable is passed to and returned from the service, as shown in Figure 14.
      Figure 14. Parameter list in the activity wizard
      Parameter list in the activity wizard
    6. Click Finish.
  2. Similarly, create a service for the second activity named Untitled1. Right-mouse click and from the context menu, choose Activity Wizard.
    1. Name the activity, sca service.
    2. Choose Advanced Integration Service (Service implemented in Integration Designer).

      Note: Do not forget this step to make this activity an Advanced Integration Service (AIS).

    3. Choose to Create a New Service and name it sca service, as shown in Figure 15.
    4. Click Finish.
      Figure 15. Adding an AIS via the activity wizard
      Adding an AIS via the activity wizard
  3. Similar to the first activity, create a service for the third activity named Untitled2.
    1. Name the activity as debug2.
    2. Make it a System Service (Service without human interaction.
    3. Create a New Service named debug2.
    4. Click Finish.
  4. The completed BPD diagram looks similar to Figure 16.
    Figure 16. Completed BPD diagram
    Completed BPD diagram

Implementing services

  1. The next step is to implement the services. First, implement the debug service.
  1. In the Diagram view, double-click the debug activity. The debug activity diagram is displayed.
  2. Double-click the Script activity, shown in Figure 17.
    Figure 17. The Script activity diagram
    The Script activity diagram
  3. In the Properties view, the blank implementation is shown. If not, click the Implementation tab.
  4. For the sake of simplicity, you will add a println statement. That line is written to the server log showing when the BPD starts. Figure 18 shows the completed line of code in the Properties window.
    Figure 18. Implementation code in Properties view
    Implementation code in Properties view
  5. In Listing 1, notice the use of the local data variable with the full package named tw.local.data.
    Listing 1. Debug activity implementation code
    java.lang.System.out.println("BU:  TopDown1Bpd – start " + tw.local.data);
  6. Click the X next to the title to close the debug service, as shown in Figure 19.
    Figure 19. Closing the debug service
    Closing the debug service
  7. When prompted to save the resource, click Yes to save the changes.
  8. You are now back viewing the TopDown1Bpd diagram. In a similar manner, implement the debug2 service.
    1. Double-click the debug2 activity.
    2. Double-click Script.
    3. Again, enter a println statement shown in Listing 2. That line is written to the server log showing when the BPD ends.
      Listing 2. debug2 activity implementation code
      java.lang.System.out.println("BU:  TopDown1Bpd – end " + tw.local.data);
    4. Close and save the debug2 service.
    5. Make sure you click Ctrl+S (or click the Save icon) to save all your edits.

You may minimize the Process Designer for now. The TopDown1Bpd process consists of three activities with two services implemented in Process Designer. Next, you will implement the third service using Integration Designer.


Part 2: Working with Integration Designer

Bring up Integration Designer to implement an SCA-based Plain Old Java Object (POJO) service that will be used by the second of the three activities in TopDown1Bpd.

Create a new workspace

  1. Launch Integration Designer.
  2. In the Workspace Launcher window, enter a workspace name, such as C:\IBM\workspaces\TopDown (Figure 20).
    Figure 20. Selecting a workspace
    Selecting a workspace
  3. Click OK.

    Note: Do not check the box that says “Use this as the default and do not ask again”.

  4. You are asked for the Process Center connection details:
    1. Enter the Process Center URL as http://<SERVER_NAME>:<PORT_NUMBER>/ProcessCenter, as shown in Figure 18.
    2. Enter the appropriate credentials, such as tw_admin/tw_admin.
    3. Click Login (Figure 21).
      Figure 21. Process Center login
      Process Center login
    4. If a Getting Started welcome screen is displayed, close it.
    5. You are now in the Process Center perspective.

      Note: In case you are taken to the Business Integration perspective, which is the default perspective in the Integration Designer, click the tab on the top right to open the Process Center perspective. You can also get to that perspective by selecting Windows > Open Perspective > Process Center.

  5. Once you are in the Process Center screen, open the Top Down 1 Process Application in the Integration Designer workspace by clicking Open in workspace.
    1. Notice the subtle difference between the Process Center screens. In Process Designer, the menu option reads "Open in designer", whereas in Integration Designer, the menu option reads "Open in workspace" (see Figure 22).
      Figure 22. Process app listed in Process Center perspective
      Process app listed in Process Center perspective

      Note: The Process Center, which is the common repository, is accessible via Process Designer as well as Integration Designer.

    2. Select Top Down 1 in the Open Process Applications pop-up window and click OK, as shown in Figure 23.
      Figure 23. Process apps to be opened in the workspace
      Process apps to be opened in the workspace
  6. It takes some time for the Process Application information to be populated and built in Integration Designer. Watch the little status bar at the bottom right of the tool.

After everything is loaded, let's explore the creation and deployment of a Service Component Architecture (SCA) service.

Implementing an SCA Service

  1. In the Business Integration perspective, navigate down to Top Down 1 > Advanced Integration Services.
  2. Right-mouse click on sca service and choose Implement as shown in Figure 24.
    Figure 24. Context menu in Integration Designer
    Context menu in Integration Designer
  3. From the four choices for implementation type, select Java component (Figure 25) and click Finish.
    Figure 25. Implementation types
    Implementation types
  4. The Java™ implementation window is displayed.

    In another tab, the Assembly diagram is updated. If you browse it, you see that there are two components wired together: scaservice is an import component that is wired to the reference of the Java component named scaservice_JavaImplementation.

    Note: The tooling generates most of the Java code for you.

  5. Go back to the Java implementation tab. Scroll to the bottom and implement the invoke method. Similar to what you did in Process Designer, you added println (see Listing 3). The output shows up on the log and returns a new string.
    Listing 3. Java implementation code
    public String invoke(String data) {
    	System.out.println("BU: sca service  "+data);
    	data = "hi dad";
    	return data;
  6. Press Ctrl+S to save the edits and then close the Java editor.

The service, although a simple println statement, has been implemented. At this time, the updates only exist in the Integration Designer workspace. You need to update the Process Center with these code changes.

Publishing to the Process Center

  1. Still in the Business Integration perspective, right-mouse click on the project folder, Top Down 1 Main, and choose Refresh and Publish (Figure 26). Watch the little status bar at the bottom right of the tool to make sure all the artifacts get updated.
    Figure 26. Context menu in Integration Designer to sync up with Process Center
    Context menu in Integratio Designer to sync up with Process Center
  2. Choose Yes, if prompted to close the editors.

You may minimize the Integration Designer for now. Next, you will run the process using Process Designer.


Part 3: Playback the BPD

Bring up Process Designer again. Make sure you are in the Designer perspective. You will now test the process.

Run the process

  1. Make sure you are seeing TopDown1Bpd in the Diagram view.
  2. Click on the Run Process button (white arrow in a red circle) on the upper-right side, as shown in Figure 27.
    Figure 27. Run process icon in Process Designer
    Run process icon in Process Designer
  3. Click Yes when prompted to switch to the Inspector perspective.
  4. Click the refresh icon a few times. Eventually, you will see the status of the process instance change to Completed, as shown in Figure 28.
    Figure 28. Inspector showing Process Instances
    Inspector showing Process Instances
  5. If you look through Systemout.log, which is found at <BPM_HOME>/profiles/<PROFILE_NAME>/logs/<SERVER_NAME>/, you can locate the following three lines of output shown in Figure 29. The lines may not be lined up as shown. You can search on unique terms such as "mom" or "dad".
    Figure 29. Output listing
    Output listing

Conclusion

You started off with Process Designer, created a Business Process Definition with three activities, and implemented two of the activities. You then used Integration Designer to implement the third activity, an SCA service, updated the Process Center, and then executed the BPD. Although a simple scenario was shown, the tutorial demonstrated the versatility of how a BPMN process can invoke an SCA service.

Future tutorials in this series will cover other orchestration scenarios in IBM BPM Advanced V7.5, such as bottom up, straight through processing, and straight through processing with exception.

Acknowledgements

The authors would like to thank Srikanth Ganesan for his review of the tutorial.

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


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. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

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.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

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

 


All information submitted is secure.

Dig deeper into Business process management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business process management, WebSphere
ArticleID=757232
ArticleTitle=IBM BPM V7.5 orchestration scenarios, Part 1: Top-down design using IBM Process Designer and IBM Integration Designer
publish-date=09142011