< Previous | Next >

Making the components communicate

To enable components to communicate with each other through operations defined in interfaces, you wire components in the assembly diagram.

By connecting a source and a target component in the assembly diagram, the source can access the services of the target. The source components call other components via partner references shown on the right side of the component, and through operations defined by the interfaces on the targets that you added in the previous section.

For example, in order for the process to receive an ApplicationBO as defined in the applyOnline operation of mainProcessInterface, it needs to be connected with Stand-alone References so that operation is available to be invoked when a bank customer requests a loan from the bank's Web site.

The tasks below show you how to wire all the components in the assembly diagram.

Wiring the process to the rule group

You will wire mainProcess to the rule group so that the bank rules can be applied to an ApplicantBO, and then a boolean response received will indicate if a loan was rejected, or if it was manually or automatically approved.

To wire the mainProcess component to the LoanLimits rule group, follow these steps:
  1. Position the mouse over the border of the mainProcess component until a yellow handle is displayed.
  2. Click the yellow handle and drag it to connect with the LoanLimits component. The Add Wire dialog box is displayed.
  3. To create a new partner reference on mainProcess, click OK. A wire connects the two components through the partner reference on mainProcess and the interface of LoanLimits.

Wiring stand-alone references to the process

To access the services of the application through a JSP, you connect the stand-alone references with the business process. Through this communication, an ApplicationBO is sent to the process to be checked, and a string response is received back to the JSP.

To connect stand-alone references to mainProcess, follow these steps:
  1. Connect the Stand-alone References to the mainProcess component. The Add Wire dialog box is displayed.
  2. To create a matching reference on Stand-alone References, click OK.
  3. Another Add Wire dialog box will appear asking if you would like to convert WSDL interfaces to Java interfaces. Because you will test the loan application with JSPs and they are Java-based, it will be faster to invoke the module through Java interfaces rather than convert them first from WSDL interfaces. Click Yes. The new wire is created.

Wiring the remaining components

Now that you know how to use the wiring tool, connect the following components together in the assembly diagram:
  1. Source Target Communication
    LoanLimits CreditCheck
    • Operation: checkCredit
    • Input: taxPayerId (string)
    • Output: creditScore (CreditBO)
    mainProcess FollowUpDeclinedApp
    • Operation: FollowUpDeclinedApp
    • Input: TaskInformation (HumanTaskBO)
    mainProcess ProcessTheApplication
    • Operation: ProcessTheApplication
    • Input: TaskInformation (HumanTaskBO)
    mainProcess CompleteTheLoan
    • Operation: CompleteTheLoan
    • Input: TaskInformation (HumanTaskBO)
  2. Click File > Save. The assembly diagram should now look like this:
    Assembly Diagram: LoanApplicationModule
  3. Close the assembly editor.
Now that each component has been wired together, and the operations are complete, you will apply the business logic by implementing the process.

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