Thursday, August 12, 2010

Working with WebSphere Business Modeler

Working with WebSphere Business Modeler

The process flow modeling capability available in the Fabric Authoring widgets is restricted to defining simple sequences of tasks and is not designed to be a replacement for Modeler. Instead, the application flow represents a simplified, high-level outline of the process which provides visual context for a business user to understand where policies are used in a solution.

There are two basic approaches for working with Modeler and the Fabric Authoring capability. 

The first, and most general, approach involves disconnected use Modeler and Fabric authoring during the Model phase of development. Modeler is used to develop and simulate business processes while the authoring capability in business space is used to define business vocabulary and policies that determine the dynamic behavior of selected process steps.

The second approach, covered in this section, involves importing content authored in business space to establish a collection of Modeler projects with skeletal process flows. Once established, the modeler projects may be updated to pick up certain changes introduced in business space, but there is currently no reverse capability to import or update the content in business space with changes introduced in Modeler. Also, it is important to consider certain limitations that come along with using this approach.

Integrate Modeler with Fabric

You can skip this section if you installed Modeler and Fabric as part of Websphere Dynamic Process Edition 7.0 Tool and Testing Pack installation.  However, if you installed Modeler and Fabric  independently of each other, then you have to go through this process.

Note:  Websphere Dynamic Process Edition 7.0.1 Tool and Testing Pack no longer includes Websphere Business Services Fabric.  To use the Composition Studio (available in Fabric), you have to install Fabric and go through this same  Modeler and Fabric integration process.

  1. Stop WID if it is currently running (Websphere Integration Developer).
  2. Start Business Modeler and select the same workspace you previously used for WID (which should not be running).
  3. The first time you start up Business Modeler using a workspace you previously used for WID you may see a Workspace Migration requirement ()
    1. Follow the migration instructions (,) until completion ().
    2. Define () and configure a Server ()
    3. Use the following UID/Password, i.e admin/admin () and Server Settings ()
    4. Review your Server settings if you see the following errors ().

Importing a Fabric application into the Modeler

Modeler features that support Fabric integration are only enabled in the Fabric mode. This mode includes all of the capabilities of the WebSphere Process Server mode and adds the ability to import from Fabric and the ability to set a technical attribute that indicates a task should be implemented with a dynamic assembler component.
  1. Stop WID if it is currently running (Websphere Integration Developer).
  2. Start Business Modeler and select the same workspace () you previously used for WID (which should not be running).
  3. Start the server ()
    This is a required step.  Business modeler needs to connect to the server to be able to import the Fabric application which are stored on the Server.
  4. Switch to Websphere Business Services Fabric mode by clicking Modeling\Mode\Websphere Business Services Fabric ()
  5. From the main menu, select File\Import… Select WebSphere Business Modeler\WebSphere Business Modeler Import and click Next ()
  6. Select Websphere Business Service Fabric Repository elements and click Next ()
  7. Click the Add Repository button ()
  8. Define connection details for the Fabric server to import from:
    1. Location = http://localhost:9080
      Note: The port (9080) is setup when you installed Webpshere Business Services Fabric.  It is in the file called AboutThisProfile.txt (.._WTE\runtimes\bi_v7\profiles\qwdpe\logs).  If you supply an incorrect port number, you will get an error message.
    2. Name = Loan Origination 
    3. User Name = admin 
    4. password = admin  
    5. Click Finish ()
      The Repository Contents section shows the applications, business services, and vocabularies grouped by the business space(s) they are associated with. You will only see the content in those fabric authoring spaces that you are authorized to see in the Business Space.
  9. Specify the repository elements that you want to import and click Finish ()
  10. Click OK when you see the message Import finished successfully confirmation window ()
  11. This is the imported Fabric application ()

    The import operation creates several Modeler projects. Each imported vocabulary becomes a project that contains business items derived from the object concepts that were defined in the authoring space.

    Each business service becomes a modeler project with an empty process flow created for each process variation that was defined. A service is defined for the business service itself with technical attributes automatically set to indicate implementation with a dynamic assembly component.

    Finally, an application becomes a modeler project with a process flow that captures the process modeled in the application flow. Each task in the flow uses an abstract service defined in a business service project.

    Vocabularies and business services are designed to be reused in solutions that have been developed. Multiple modeler projects are created for the same reason. Instead of duplicating business items or business service logic each time it is needed, this content is grouped into different modeler projects that could be reused.

Working with the Main Process Flow

Loan Origination application process flow

Starting at the top, let's look at the process flow created for the Loan Origination application.
  1. Open the Loan Origination process () in the Loan Origination project and open the Window\Properties view ()

    In the Fabric authoring space, we defined two channels that could invoke the process including “Customer Care Call Center” and “Better Financials Online”. Since there is no concept of a channel in Business Modeler, this information does not appear in the process flow.

    When defining the business services in the authoring space, we were careful to specify the loan application as the input and output of every business service. When the process is imported, the orchestration from one task to the next is only preserved when the output of one business service is the same as the input to the next.

    For the purposes of authoring policies in a Fabric authoring space, it is sufficient to add inputs to a business service to represent the business concepts that need to be available to evaluate policies for that step at runtime. When the modeler import is brought into the picture, business service inputs and outputs need to be modeled more completely and with greater restrictions since these are used to define the business items and flow from one task to the next.

    The output of the final step in our Loan Origination process is wired to the process terminal. If we want our process to yield an output we'll need to configure and output on the process.
  2. Add an output node (Loan Application)
    1. In the Loan Origination process, click anywhere on an empty space on the canvas, select the Properties tab, click Outputs and click the Add button ()
    2. Change the default Associated data type (from Text to Loan Application) to make it compatible with the output of Notify Customer task.  Click the browse button to display available data type ()
    3. Select Loans Origination Vocabulary\Business items\Loan Application as the data type and click OK ()
    4. The Loan Origination process output node is created ()
  3. Reconnect to the process output
    1. Delete the Terminal node ()
    2. Re-connect Notify Customer to Output Node ()
      Hover the mouse over Notify Customer and drag/drop the connection to the Output node.
    3. New connection ()

Setup Processes for each Process Variation

Each process variation is created as an empty process flow with the inputs and outputs derived from the definition of the Business Service in the authoring space. Open each process and model the process for each step. Since the purpose of this guide is to illustrate how to build applications with the Fabric, we will keep these processes streamline with simple task implementations.


  1. Open the Automated Underwriting Process (). Add a task named “Automatic Underwriting” and wire it to the input and output.  Using the technical attributes view, set the implementation type for this task to Java. When exporting to WID, this will cause the task to be implemented with a java component.

Fill in the remaining process variations:
ProcessProcess Variation\Type\Implementation Type
Check CreditAutomated Credit Check
Local Task
Java
Final ReviewAutomated Underwriting
Local Task
Java

Human Underwriting
Local
Human Task
Notify CustomerAutomatic Notification
Local Task
Java

Human Notification
Local
Human Task
Review CollateralHuman Collateral Review
Local
Human Task

No Collateral Review
Local Task
Java

Export the project interchange file for WID

When modeling is complete we can export the project interchange file with SCA modules and libraries for further assembly in WID.

  1. Select File\Export
  2. Select WebSphere Business Modeler\Websphere Business Modeler Export and click Next ()
  3. Select Webpshere Integration Developer and click Next ()
  4. Provide a location for the export (Browse button), select Export entire project... , check all elements you want to export and click Next ()
  5. Select the export option (Module + Library, check all the square buttons, enter Project Interchange Name (Loan Origination Application) and click Finish ()
  6. You can ignore the warning message and click OK (). 

    TEN20010W: The element "Review Collateral" uses the Dynamic Assembler implementation type, which is supported only in WebSphere Business Services Fabric.
    TEN20010W: The element "Notify Customer" uses the Dynamic Assembler implementation type, which is supported only in WebSphere Business Services Fabric.
    TEN20010W: The element "Final Review" uses the Dynamic Assembler implementation type, which is supported only in WebSphere Business Services Fabric.
    TEN20010W: The element "Check Credit" uses the Dynamic Assembler implementation type, which is supported only in WebSphere Business Services Fabric.

Import the project interchange file into WID

After exporting the elements from Websphere Business Modeler, you can then import it into WID.
  1. In the Business Integration perspective in WID, Select File\Import. Select Other\Project Interchange option, and click Next ()
  2. Provide the location of the zip file. Select all projects, and click Finish ()

Modify the project in WID

Here are the before  ()  and after  (modifications.  To perform the modifications, proceed as follows:

Open the assembly diagram for the Loan Origination module ()
Typically, a dynamic assembly component is used in place of an import. When modeler generates the implementation for the process variations, it also puts the dynamic assembler component in that module. Imports wired off the process are linked to the export of the dynamic assembly component.

The next few steps cover how to remove this extra layer of indirection.
  1. Delete the Check Credit import (right-click the import and select Delete)
  2. Right-click on the Canvas and select Add\Dynamic Assembler component
  3. Drag/drop the new component in the place where the import used to be and name it CheckCreditDA
  4. Re-draw the old wire from the old reference to the new CheckCreditDA Dynamic Assembler component.
  5. The Add Wire window appears asking if you want to continue. Click OK.
  6. Double-Click the dynamic assembler component that you just created to implement it. Click Yes when the Open window appears asking if you like to implement the component.
  7. A "Generate Implementation" window appears asking you to select a folder.  Select loanorigination and click OK.
  8. A Dynamic Assembly Configuration Editor window appears.  Select Event with full business payload as the event style, check Enable Result Caching and close the editor.  Click Yes on the Save Resource pop-up window.
  9. Open the assembly diagram for the Check Credit module and delete the dynamic assembly component and the export associated with it ()
  10. Perform the same steps for the other three imports. This Loan Origination assembly diagram should then look something like this ()

Related links

  1. Previous: Define Application and Policies Next: Assemble in Websphere Integration Developer
  2. Modeling, developing, assembling, deploying and managing an application
  3. Working with the Fabric templates in Business Space
  4. Business Space Information Center




No comments:

Post a Comment