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:
- 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.
- Download the file, and save it as StockQuoteService.wsdl in
a temporary directory.
- From the menu, select File > Import. The Import window
opens.
- Click File system and then click Next.
- In the From directory list, type the name
of the temporary directory that you saved StockQuoteService.wsdl in.
- In the navigation tree, select the check box next to .
- In the Into folder field, type eMergedLibrary\com\emerged\portal.
- 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:

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 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:

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.