< Previous | Next >

Adding components and stand-alone references

To provide services in the application, you will add components in the assembly diagram. Each component has a specific task within the application and an interface to communicate with other components. To allow access to the business process from components outside of the module, you will add stand-alone references to the module.

Here is an overview of what you will be adding to the assembly diagram:
Component Type Name Purpose
Business Process Business Process mainProcess You will create this central component to contain the business logic that evaluates the loan requests received by your application. mainProcess is a service that will access the other business services in the loan application, such as the rule group and human tasks, to accomplish this goal. Through a series of checks and choices that you create, the business process will direct the loan request to either approved or rejected.
Stand-alone References Stand-alone References Stand-alone References You will add Stand-alone References to use existing JavaServer Pages (JSPs) and Enterprise JavaBeans (EJBs) to interact with the components that you create in the loan application module. This will allow you to quickly test the loan application from a Web browser.
Rule Group Rule Group LoanLimits You will create business rules to determine, for example, what the minimum credit rating required to approve a loan is, or what the maximum loan request amount to be auto-approved is. These rules will be contained in the rule group.
Human Task Human Task FollowUpDeclinedApp You will create a human task to delegate the responsibility of following up on a rejected loan to a bank employee, perhaps to provide references to credit counselling services. This action cannot be completed automatically, and requires the skills or authority of a person.
Human Task Human Task ProcessTheApplication Another human task that you will create to handle the manual processing of a loan application.
Human Task Human Task CompleteTheLoan Another human task that you will create to acknowledge the auto approval of a loan application.
Java Java CreditCheck You will create this Java component to use an existing Java code implementation that generates a random value for an applicant's credit rating.
The following tasks show you how to add the components and stand-alone references that the loan application requires.

Adding the business process

The mainProcess component provides a business process that executes the business logic, including receiving the loan request, checking the loan amount, sending a reply and delegating the request to a bank employee.

To add the process component, follow these steps:
  1. In the assembly editor, click Component (with no implementation type), which is the Component (with no implementation type) icon, and then click Process, which is the Process icon. The icon displayed in the palette will always be the most recently selected from that category.
  2. Click the canvas. Component1 is added. The exclamation mark in the lower-left corner indicates that the implementation for this component has not yet been created. You will create the implementation for each component later on.
  3. Rename Component1 to mainProcess by clicking the component and typing over the highlighted text.

Adding the stand-alone references

Stand-alone references stand alone, which means that their implementation resides outside of the module, and they allow existing applications outside of your module to invoke the services of the components contained in the module. In this sample, the bank customer needs a web interface to process its data to the bank. To do that, you need a standalone-reference to implement this interface.

To add stand-alone references so that you can invoke mainProcess from a JSP later, follow these steps:
  1. Switch to the assembly editor.
  2. Click Import, which is the Import icon, and then click Stand-alone References, which is the Stand-alone References icon.
  3. Click the canvas. The Stand-alone References figure is added.

Adding the remaining components

  1. Add the remaining components to the assembly diagram using the following information:
    Component Type Name
    Rule Group Rule Group LoanLimits
    Human Task Human Task FollowUpDeclinedApp
    Human Task Human Task ProcessTheApplication
    Human Task Human Task CompleteTheLoan
    Java Java CreditCheck
  2. Click File > Save. The Assembly Diagram should now look similar to this:
    Assembly Diagram: LoanApplicationModule
Next you will create the objects and interfaces that facilitate communication between each of the components that you just added to the assembly diagram.

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.
< Previous | Next >