< Previous | Next >

Browsing the ready-made sample

After you have imported the required resources, you may browse the ready-made sample.

When you first look at the sample folders, you will see some errors indicated below the Problems tab. The program was looking for a Web Services Description Language (WSDL) file that it did not find. This file was not included with the sample for legal reasons.

To browse the ready-made sample, you must first import the required StockQuoteService.wsdl file by following these steps:

  1. Go to the following Web site: http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl
    CAUTION:
    Because this is an external web site, we have no control over the content and the reliability of URL address provided. If you are unable to download the WSDL file and complete the following steps, there will be errors in your process and this sample will likely not run, but the sample can still be used as an excellent instructional tool on how to work with the editor to build a business process.
  2. Download the file, and save it as StockQuoteService.wsdl in a temporary directory.
  3. From the menu, select File > Import. The Import window opens.
  4. Click File system and then click Next.
  5. In the From directory list, type the name of the temporary directory that you saved StockQuoteService.wsdl in.
  6. In the navigation tree, select the check box next to StockQuoteService.wsdl.
  7. In the Into folder field, type eMergedLibrary\com\emerged\portal.
  8. Click Create selected folders only and then click Finish. Click Yes to overwrite the existing file.
Now you may browse the sample application. As you browse, notice the following resources, diagram, components and process:
  • eMergedLibrary contains several resources that can be shared across different modules if you import them, including:
    • The business objects that are used for representing the stocks and stock portfolio
    • Interfaces that allow components to communicate with each other
    • The single Web service port that accesses the stock quote Web service
  • In the Business Integration view, expand StockPortfolioModule and double-click Assembly Diagram to open the assembly editor, which will be displayed as shown in the following image:
    Imported assembly diagram
    The three figures shown are:
    • Stand-alone References, which is required so that non-SCA components outside the module can invoke the business process and evaluate the stock portfolio. For example, you would need stand-alone references if you wanted to create a Web interface to interact with your application using JavaServer Pages (JSPs) and Enterprise JavaBeans (EJBs).
    • PortfolioEvaluatorProcess, which visualizes the business logic of the application using activities and snippets.
    • StockQuoteService, which is an import component that you use to invoke a Web service and obtain stock quotes.
  • You can also expand Business Logic under StockPortfolioModule > Processes to find the business process, PortfolioEvaluatorProcess. To open PortfolioEvaluatorProcess in the process editor, double-click it. The implementation of PortfolioEvaluatorProcess is displayed as shown in the following image:
    Completed PortfolioEvaluatorProcess
    PortfolioEvaluatorProcess is a business process that receives a stock portfolio as input. Then it loops through each stock listed in the portfolio, invoking the Web service to obtain stock quotes and adding the value of each stock to that of the portfolio. After the loop terminates, the process replies with a new stock portfolio, complete with an updated value.
Now that you have browsed the sample application, you can begin building it yourself in the next topic.

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