Use Case One: WebLogic Portal Features


The initial page for all the example's use cases is accessed at http://localhost:7501/ (see Figure A.1). You can access the three use cases at this page. If your environment is configured for it, the server will attempt to start your browser for you. It might start the browser using the machine name you are on. For example, if your machine is named mymachine , a browser might be started for you with the address http://mymachine:7501/ . This is not a problem so long as the server is also accessible through the localhost address.

Figure A.1. The example's main page.

graphics/app01fig01.gif

Additionally, throughout this example are pop-up windows that provide context-sensitive hints and information about the portion of the use case you are exploring.

Click the Visit the Site link under the Digital Imaging section to enter the portal associated with the first use case; the page shown in Figure A.2 is displayed.

Figure A.2. The first page for use case one.

graphics/app01fig02.gif

On the page the username and password should already be filled in. If they are not, log in as the user radams with the password password . A pop-up window should also appear to tell you this information. Click the Login button to log in.

Use case one is that Rachel Adams is an existing customer of Avitek Digital Imaging. She wants to buy a camera for a birthday that falls on the following day. However, Rachel cannot complete the order because Avitek Digital Imaging needs at least two days to deliver the camera to her. This delivery schedule is a problem for Avitek because it has lost revenue from an existing customer. The use case goes on to show how Avitek can make existing functionality available to give customers correct and timely information and, therefore, close the sale.

After you have logged in as Rachel, you see a window that looks like the one in Figure A.3.

Figure A.3. Use case one after logging in.

graphics/app01fig03.jpg

Next , you are going to try to buy a camera. To get to the catalog view page, click the Products tab at the top of the page (see Figure A.4).

Figure A.4. The catalog view page for use case one.

graphics/app01fig04.jpg

On the catalog view page, you can select from the catalog items that are displayed. If you select the AviPix camera, you see the three cameras that Avitek offers. Select the AviPix 1000 camera, and then click Express Checkout. Notice on this page that the order will not arrive for two days (see Figure A.5). As Rachel needs the camera tomorrow, this delivery date is not acceptable, so you (as Rachel) cancel the order. Simply click the Cancel button at the bottom of the window.

Figure A.5. The order page for use case one.

graphics/app01fig05.jpg

Capturing the Sale

Avitek wants to expand its portal so that customers can pick up a purchase from any Avitek partner store. In this way, Avitek would not lose a sale if the merchandise was available at a "brick and mortar" store. Acting as the administrator for the Avitek site, you will add functionality to the Avitek Web site by enabling the Clicks and Bricks portlet. With this portlet, physical stores can provide customers with merchandise if they have it in stock. Avitek communicates with the stores using a Web service interface, and you will use this Web service to help Avitek capture the sale.

Adding a Web ServiceBased Portlet

The E-Business Control Center (EBCC) enables you to easily add a portlet from a Web service. A portlet is a subsection on a Web page used for displaying any type of information. For example, a single page might have a portlet to display stock prices, a portlet for accessing an e-mail server, and a portlet for displaying current news headlines. You can interact with each portlet to varying degrees, depending on the portlet's purpose.

For this example, a Web service to interact with stores' inventory systems has already been created for you. This Web service contains the business logic to properly communicate with the stores. Although the Web service is prepackaged with the example, you still get an overview of creating a portlet with Web Services Description Language (WSDL). WSDL is an XML format for describing Web services. It describes the Web service as a set of endpoints operating on messages sent between the endpoints.

Again, as the Web service and portlet have already been created for you, creating the portlet in the EBCC is not a requirement. However, you can walk through the steps for creating a Web servicebased portlet to see how it is done.

To start the EBCC, you use the Windows Start menu. In a standard installation, you can find it under Start, All Programs (Windows XP) or Programs, BEA WebLogic Platform 7.0, WebLogic Portal 7.0, E-Business Control Center (Windows 2000). When first starting the EBCC, you see a window that looks like Figure A.6.

Figure A.6. The EBCC startup window.

graphics/app01fig06.gif

To create a Web service portlet, you use an already existing project. After the EBCC is started, select File, Open Project from the main menu. A dialog box representing the physical file system opens. It starts out at %BEA_HOME%\weblogic700. You should navigate to the demoDomain project directory. Select samples, platform, demoDomain, beaApps, e2eApp-project, and then click Open.

To experiment with creating a portlet based on WSDL, choose File, New, Presentation, Portlet. Select the Use the Portlet Wizard radio button. You can then walk through creating a new portlet using WSDL. Make sure that in step 4, Content Types, you select the Web Service(s) option, as shown in Figure A.7.

Figure A.7. The EBCC Content Types dialog box.

graphics/app01fig07.gif

Because the portlet wizard cannot predict any customized presentation logic, a portlet has already been created for you that accesses the AviClicks & Bricks Web service. The next step is to make this service available on the Avitek Web site. You will log in as an administrator over the entire Avitek site and make the portlet available for the Avitek Digital Imaging portal. To access the Portal Administration pages, go to http://localhost:7501/e2eAppTools with your browser. Your browser should display a login dialog box. Enter administrator for the username and password for the password. Remember that usernames and passwords are case sensitive in this installation.

After entering the username and password, you see the portal's Administration Tools home page (see Figure A.8).

Figure A.8. The portal's Administration Tools home page.

graphics/app01fig08.jpg

Click the Portal Management icon to display the Portal Management page (see Figure A.9).

Figure A.9. The Portal Management page.

graphics/app01fig09.jpg

Click the Default Digital Imaging Portal (Everyone) link under the b2cPortal heading. (Make sure to select the link under b2cPortal.) On the next page, click the Manage Pages and Portlets link (see Figure A.10).

Figure A.10. The Pages and Portlets page.

graphics/app01fig10.jpg

Toward the bottom of this page is the Unused Pages section. Click the Attributes button to the right of the Profile entry to display the Profile page, and select the Available and Visible check boxes (see Figure A.11).

Figure A.11. Setting page attributes.

graphics/app01fig11.jpg

Click the Save button to continue.

After you have saved the page attributes, you can log back in as Rachel. An additional tab named Profile, representing the Profile portal page, is now available at the top of the page. You (as Rachel) can use this page to update her profile so that she is able to search in more than just the online store (see Figure A.12).

Figure A.12. The Profile page.

graphics/app01fig12.gif

To take advantage of the new service, you need to do the following:

  1. Select the Use Clicks and Bricks radio button to enable Rachel to use the new Web service.

  2. Click the Submit button.

  3. Return to the catalog by selecting the Products tab.

  4. Select the AviPix image.

  5. Select the AviPix 1000 image. The ZIP code should already be filled in for you with 94108 .

  6. You might need to click the Go icon to see the stores that have the merchandise in stock (see Figure A.13).

    Figure A.13. The new catalog page with stores that have the camera in stock.

    graphics/app01fig13.jpg

An existing bug in the demo when using WebLogic Platform GA (7.0.0.1) or 7 SP1 (7.0.1.0) sometimes displays a message saying that the functionality is temporarily unavailable. Additionally, a long stack trace is printed to the console. Neither of these two messages affects the running of the demo or the underlying code, however. After you have selected a ZIP code, the sample runs fine. You should not experience this bug if you're using WebLogic Platform 7 SP2 (7.0.2.0).

After you have selected a store by clicking the Buy Now button under the store address, continue through the buying process. Your checkout proceeds as before, but the confirmation shows that the merchandise will be shipped to the store you selected (see Figure A.14).

Figure A.14. The AviClicks & Bricks checkout page.

graphics/app01fig14.jpg



BEA WebLogic Platform 7
BEA WebLogic Platform 7
ISBN: 0789727129
EAN: 2147483647
Year: 2003
Pages: 360

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net