3 Introduction to the SOA Sample Application

This chapter introduces the SOA sample application that can be used with this guide. The WebLogic Fusion Order Demo application of the Fusion Order Demo demonstrates various capabilities of Oracle SOA Suite and is used as an example throughout this guide.

This chapter includes the following sections:

3.1 Introduction to the Fusion Order Demo

The WebLogic Fusion Order Demo application is part of a larger sample application called Fusion Order Demo. In this larger sample application, Global Company sells electronic devices through many channels, including a web-based client application. Electronic devices are sold through a storefront-type web application. Customers can visit the web site, register, and place orders for the products.

There are two parts to the Fusion Order Demo, the Store Front module and the WebLogic Fusion Order Demo application.

3.1.1 Store Front Module

The Store Front module provides a rich user interface built with Oracle Application Development Framework to show how to combine an easily built AJAX user interface with a sophisticated SOA composite application. It is based on Oracle ADF business components, ADF model data bindings, and ADF faces.

The Store Front module sells electronic devices through a storefront-type web application.

The Store Front module contains the following projects:

  • StoreFrontService: This project provides access to the storefront data and provides transaction support to update data for customers, orders, and products.

  • StoreFrontUI: This project provides web pages that the customer uses to browse the storefront, place orders, register on the site, view order information, and update the user profile.

Figure 3-1 shows the Home page of the Store Front module user interface. It shows the featured products that the site wishes to promote and gives access to the full catalog of items. Products are presented as images along with the name of the product. Page regions divide the product catalog area from other features that the site offers.

Figure 3-1 StoreFrontUI Home Page

Description of Figure 3-1 follows
Description of "Figure 3-1 StoreFrontUI Home Page"

From the home page, you can browse the web site as an anonymous user, then log in as a registered customer to place an order.

The Fusion Order Demo application ships with predefined customer data. Because the Fusion Order Demo application implements Oracle ADF Security to manage access to Oracle ADF resources, only the authenticated user can view orders in their cart.

For more information about the Store Front module, see Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

3.1.2 WebLogic Fusion Order Demo Application

The WebLogic Fusion Order Demo application processes orders placed in the Store Front module. It uses the following Oracle SOA Suite components:

  • Oracle Mediator

  • Oracle BPEL Process

  • Oracle Human Workflow (using a human task)

  • Oracle Business Rules

  • Spring

  • Oracle User Messaging Service

  • Oracle Business Activity Monitoring

  • Oracle Metadata Repository

Once an order has been placed by using the Store Front module, the WebLogic Fusion Order Demo application processes the order. When processing an order, it uses various internal and external applications, including a customer service application, a credit validation system, and both an internal vendor and external vendor. For example, the internal vendor (InternalWarehouseService) and external vendor (ExternalPartnerSupplier), are sent information for every order. As part of the order process, they each return a price for which they would supply the items in the order. A condition in the process determines which supplier is assigned the order.

For information about SOA composite applications, see Chapter 1, "Introduction to Building Applications with Oracle SOA Suite."

3.2 Setting Up the Fusion Order Demo Application

This section describes how to prepare the environment to run the WebLogic Fusion Order Demo application.

3.2.1 Task 1: Install Oracle JDeveloper Studio

Install Oracle JDeveloper 11g Studio Edition to create the WebLogic Fusion Order Demo application. You can download Oracle JDeveloper from:

http://www.oracle.com/technology/products/jdev/11/index.html

Ensure that you download and install 11g and that it is the Studio Edition, not the Java Edition. You can verify these details in Oracle JDeveloper from the Help > About menu option.

In order to create and deploy SOA composite applications and projects, you must install the Oracle SOA Suite extension. For instructions on installing this extension for Oracle JDeveloper, see the Oracle Fusion Middleware Installation Guide for Oracle JDeveloper.

3.2.2 Task 2: Install the Fusion Order Demo Application

Throughout this tutorial, you must view or use content from Fusion Order Demo in your Oracle JDeveloper environment. The Fusion Order Demo is contained within a ZIP file.

To access the ZIP file:

  1. Download the Fusion Order Demo application ZIP file (FusionOrderDemo_R1PS2.zip). You can download the ZIP file from:

    http://www.oracle.com/technology/products/jdev/samples/fod/index.html
    
  2. Unzip the file to a temporary directory.

    This tutorial refers to this directory as DEMO_DOWNLOAD_HOME.

3.2.3 Task 3: Install Oracle SOA Suite

To successfully deploy and run the Fusion Order Demo applications, you must complete an installation for Oracle SOA Suite. Specifically, the domain contains an Administration Server and a Managed Server.

Installing Oracle SOA Suite requires the following

  • Creating schemas for Oracle SOA Suite in an Oracle database

  • Installing Oracle WebLogic Server

  • Configuring a domain in Oracle WebLogic Server to support Oracle SOA Suite, Oracle Enterprise Manager, and optionally, Oracle BAM. Oracle BAM is not required for Fusion Order Demo, but if an Oracle BAM Server is configured, Oracle BAM Adapters send data to the Oracle BAM Server.

    After the domain is created, it contains an Administration Server to host Oracle Enterprise Manager Fusion Middleware Control for performing administrative tasks, a Managed Server to host deployed applications, and if you configured Oracle BAM, a second Managed Server for the Oracle BAM Server.

For instructions on installing and configuring Oracle SOA Suite, see the Oracle Fusion Middleware Installation Guide for Oracle SOA Suite.

After successfully completing the installation process, perform the following additional configuration steps:

  1. Enable the credentials that are included in the StoreFront module by adding a setting to the configuration file for the domain:

    1. Locate the configuration file set for the Oracle SOA Suite domain in the following directory:

      (UNIX) MW_HOME/user_projects/domains/domain_name/bin/setDomainEnv.sh
      (Windows) MW_HOME\user_projects\domains\domain_name\bin\setDomainEnv.cmd
      
    2. Add the following option to the JAVA_PROPERTIES (UNIX) or the SET JAVA_PROPERTIES (Windows) line:

      -Djps.app.credential.overwrite.allowed=true
      

      For more information about setting this property, see Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

    3. If the Oracle WebLogic Server Administration Server is running, stop it:

      On UNIX, as the root user, change directories to directory MW_HOME/user_projects/domains/domain_name/bin and enter the following command:

      ./stopWebLogic.sh
      

      On Windows, from the Windows Start menu, select All Programs > Oracle WebLogic > User Projects > domain_name > Stop Admin Server.

    4. Start the Administration Server:

      On UNIX, from directory MW_HOME/user_projects/domains/domain_name/bin, enter the following command:

      ./startWebLogic.sh
      

      On Windows, from the Windows Start menu, select All Programs > Oracle WebLogic > User Projects > domain_name > Start Admin Server.

      When prompted on UNIX, enter your Oracle WebLogic Server user name and password. The password is not visible as you type.

      The Administration Server is started when the command window displays the following messages:

      <Server state changed to RUNNING> 
      <Server started in RUNNING mode> 
      

      Leave the command window open, although you may minimize it. The Administration Server is now running and ready for use.

    5. When the Administration Server is in RUNNING mode, start the Managed Servers, if they are not running. In a command window, enter the following command all on one line:

      On UNIX, from directory MW_HOME/user_projects/domains/domain_name/bin, enter the following command:

      ./startManagedWebLogic.sh managed_server_name admin_url username password 
      

      On Windows, from directory MW_HOME\user_projects\domains\domain_name\bin, enter the following command:

      startManagedWebLogic.cmd managed_server_name admin_url username password
      

      Substitute the following values in Table 3-1.

      Table 3-1 startManagedWebLogic Values

      Value Description

      managed_server

      The name of the Managed Server. For example:

      soa_server1

      bam_server1

      admin_url

      The URL of the Managed Server. For example:

      http://soahost:8001

      http://soahost:9001

      The port of the Managed Server for hosting SOA applications is typically 8001. The port of the Managed Server for Oracle BAM is typically 9001.

      username

      The Oracle WebLogic Server administrator. For example:

      weblogic

      password

      The password of the Oracle WebLogic Server administrator. For example:

      welcome1


  2. If you are deploying remotely from one computer that has Oracle JDeveloper to another computer that has the Oracle SOA Suite installation with Oracle WebLogic Server, modify the JAVA_HOME and PATH environment variables on the computer with the Oracle SOA Suite installation.

    Oracle JDeveloper requires changes to these variables for running the scripts that deploy the composite services. You set the JAVA_HOME variable to include the path to the Oracle WebLogic Server JDK, and set the PATH variable to include the path to the Oracle WebLogic Server bin directory for ant.

    On UNIX, use the export command. For example:

    export JAVA_HOME=$MW_HOME/jdk160_11 
    export PATH=$PATH:MW_HOME/modules/org.apache.ant_1.7.0/bin
    

    On Windows, perform the following steps to modify the variables:

    1. Open Control Panel from the Windows Start menu and double-click the System icon.

    2. In the System Properties dialog, select the Advanced tab and click Environment Variables.

    3. In the Environment Variables dialog, locate the JAVA_HOME system variable and ensure that it is set to the location of the Oracle WebLogic Server JDK.

      If there is no JAVA_HOME variable defined, click New and in the New System Variable dialog, enter a variable name of JAVA_HOME and a variable value pointing to the Oracle WebLogic Server JDK, such as C:\weblogic\jdk160_11. Click OK to set the new system variable.

    4. Double-click the Path system variable and ensure that it includes the path to the Oracle WebLogic Server ant\bin directory. If it does not, add the path to the end of the variable value. For example:

      ;C:\weblogic\modules\org.apache.ant_1.7.0\bin
      

      Click OK to set the new system variable.

    5. Click OK twice more to dismiss the Environment Variables and the System Properties dialogs.

3.3 Taking a Look at the WebLogic Fusion Order Demo Application

After you have set up the WebLogic Fusion Order Demo application, spend time viewing the WebLogic Fusion Order Demo artifacts in Oracle JDeveloper.

To open the WebLogic Fusion Order Demo in Oracle JDeveloper:

  1. From the Oracle JDeveloper main menu, choose File > Open.

  2. In the Open dialog, browse to DEMO_DOWNLOAD_HOME/CompositeServices and select WebLogic Fusion Order Demo.jws. Click Open.

  3. When prompted to migrate files to the 11.1.1.3.0 format, click Yes. When the migration is complete, click OK.

    Figure 3-2 shows the Application Navigator after you open the file for the application workspace. It displays the project applications of the WebLogic Fusion Order Demo.

    Figure 3-2 Projects of WebLogic Fusion Order Demo Application

    This graphic is described in the surrounding text.
    Description of "Figure 3-2 Projects of WebLogic Fusion Order Demo Application "

3.3.1 Project Applications of the WebLogic Fusion Order Demo Application

Table 3-2 lists and describes the projects in the WebLogicFusionOrderDemo application workspace.

Table 3-2 Projects in the WebLogic Fusion Order Demo Application

Application Description

B2BX12OrderGateway

This project contains a composite for Oracle B2B. This composite is not used in this guide.

bin

This project contains a build script for deploying all the SOA projects. It also contains templates for seeding JMS connector information, demo topics, and demo users.

CreditCardAuthorization

This project provides the service needed by OrderBookingComposite project to verify the credit card information of a customer.

ExternalLegacyPartnerSupplierEjb

This project provides an external system to provide price quotes.

OrderApprovalHumanTask

This project provides a task form for approving orders from the OrderBookingComposite project.

OrderBookingComposite

This project processes an order submitted in the Store Front module user interface. This project contains the main process for the WebLogic Fusion Order Demo application. It also uses the Oracle BAM adapter and Oracle BAM sensors to send active data into Oracle BAM dashboard. This composite is not used in this guide.

OrderSDOComposite

This project simulates the StoreFrontService service of the Store Front module for testing purposes.

PartnerSupplierComposite

This project contains a composite containing both a BPEL process and spring context for obtaining a quote from a partner warehouse. It is referenced as a service from the composite for the OrderBookingComposite project. The quote request is routed to either the BPEL process or the spring component based on the amount.


3.3.2 The composite.xml File

To understand how a composite is designed, examine the main project, OrderBookingComposite, in Oracle JDeveloper.

To view the composite.xml file:

  1. In Application Navigator, expand OrderBookingComposite > SOA Content.

  2. Select composite.xml.

The composite then appears in the SOA Composite Editor in Oracle JDeveloper, as shown in Figure 3-3.

Figure 3-3 SOA Composite Editor

This graphic is described in the surrounding text.
Description of "Figure 3-3 SOA Composite Editor"

3.4 Understanding the OrderBookingComposite Flow

OrderBookingComposite is the main project of the WebLogic Fusion Order Demo application, containing a composite application for processing orders from Global Company. This composite demonstrates how services, both internal to an enterprise, and external at other sites, can be integrated using the SOA architecture paradigm to create one cohesive ordering system.

At the center of OrderBookingComposite composite is the OrderProcessor BPEL process. It orchestrates all the existing services in the enterprise for order fulfillment with the right warehouse, based on the business rules in the process.

Figure 3-4 shows an overview of the OrderBookingComposite composite for the WebLogic Fusion Order Demo application, followed by a step-by-step description of the composite flow for how the application processes an order.

Figure 3-4 OrderBookingComposite Flow

Description of Figure 3-4 follows
Description of "Figure 3-4 OrderBookingComposite Flow"

When a new customer registers in Global Company's storefront user interface, the web client sends the customer's information to the internal customer service application called StoreFrontService. StoreFrontService then stores the customer information in a database. The customer can then browse products, add them to their online shopping cart, and place the order. User ngreenbe is the only user not required to register before placing an order.

When a registered customer uses Global Company's storefront user interface, the user interface invokes the StoreFrontService and provides authentication. A registered user builds up their shopping cart, and places an order. When the order is submitted, the following events take place:

After an order is placed, the following sequence occurs to complete the order:

  1. Oracle ADF Business Component writes the order to a database with schema for Fusion Order Demo, and raises a NewOrderSubmitted event using the Event Delivery Network (EDN). The data associated with this event is the order ID.

  2. Because the OrderPendingEvent mediator subscribes to the NewOrderSubmitted event, the EDN layer notifies the OrderPendingEvent mediator of the new order.

  3. The OrderPendingEvent mediator receives the order and routes the input order ID to the OrderProcessor BPEL process.

  4. The OrderProcessor BPEL process receives the order ID from the database, using a bind entity activity to bind to the exposed Oracle ADF Business Component StoreFrontService service.

    Some of the information about the order used later in the process is:

    • Customer ID

    • Items the customer purchased

    • Credit card used

    • Shipping address chosen

  5. The BPEL process initiates StoreFrontService, passing it the order ID, to retrieve information about the customer.

  6. The BPEL process then sends the purchase amount, credit card type, and credit card number to CreditCardAuthorizationService, which verifies if the customer's credit card is valid.

    If credit card is not valid, the BPEL process cancels the order.

    If credit card is valid, the BPEL process sends the order to the RequiresApprovalRule business rule to determine if the order requires approval by management.

  7. The RequiresApprovalRule business rule evaluates if manual approval is required. The business rule contains a rule that requires manual approval for orders over $2,000.

  8. For those orders requiring manual approval, the BPEL process invokes the ApprovalHumanTask human task, which in turn performs the following:

    • Routes a message to an assignee named jstein, who then approves or disapproves the order.

    • Publishes the OnTaskAssigned event. The OrderApprovalTaskAssignedMediator mediator subscribes this event, and if an Oracle BAM Server is configured, it uses an Oracle BAM Adapter to send the assignee ID jstein (based on the ECID) of the order to the Oracle BAM Server.

  9. If the order is approved, the BPEL process sends the order information to the following suppliers in parallel to obtain a bid:

    • Internal supplier by using the InternalWarehouseService BPEL process, also located in OrderBookingComposite

    • External supplier by using the PartnerSupplierMediator mediator, which in turn routes to the ExternalPartnerSupplier BPEL process or SpringPartnerSupplierMediator spring component, located in another composite called PartnerSupplierComposite

  10. The two suppliers respond with their bids, and the BPEL process send the bids to the EvaluatePreferredSupplierRule business rule.

  11. The EvaluatePreferredSupplierRule business rule chooses the supplier with the lower of the two bids.

  12. The BPEL process invokes the FulfillOrder mediator, which performs the following four operations:

    • Stores the order in a temporary queue and uploads it to the fulfillment system in batch mode overnight

    • Routes the order to USPS

    • If an Oracle BAM Server is configured, it uses an Oracle BAM Adapter to send data about the order (based on order ID) to the Oracle BAM Server.

    • If an Oracle BAM Server is configured, it uses an Oracle BAM Adapter to send data about the time for the order to process (based on the instance ID) to the Oracle BAM Server.

  13. Once the order is fulfilled, the BPEL process sets the order to complete.

  14. The BPEL process invokes the NotificationService service, which sends the customer an E-mail notification with the purchase order information.

  15. When the order completes, the OrderPendingEvent mediator publishes the OrderCompleted business for the OrderProcessor process.

While not depicted in Figure 3-4, the OrderBookingComposite composite provides the following processing flow for approved orders:

  1. The UpdateOrderStatus mediator performs the following:

    • Publishes business event OrderUpdateEvent and sends the order ID to the OrderProcessor BPEL process.

    • If an Oracle BAM Server is configured, it uses an Oracle BAM Adapter to send data about the order ID and order status to the Oracle BAM Server.

  2. The OrderUpdateEventMediator mediator subscribes to business event OrderUpdateEvent, sends the order ID to StoreFrontService, and waits for the StoreFrontService to respond with updated details about the order.

To aid with the tracking of an order, the OrderBookingComposite composite contains sensors to provide a method for implementing trackable fields on messages. For example, the CreditCardAuthorization service has a composite sensor that indicates if the credit card was authorized. In addition, the OrderProcessor BPEL process also uses sensors for various activities. For example, the Scope_AuthorizeCreditCard scope in the OrderProcessor BPEL process, which verifies that the customer has acceptable credit using the CreditCardAuthorizationService service, uses a sensor for tracking. When you monitor instances of a composite through Oracle Enterprise Manager Fusion Middleware Control Console, you can monitor the sensors for both the composite and the BPEL process.

In the remaining sections of this chapter, deploy and run Fusion Order Demo. As a part of it running it, use Fusion Middleware Control Console to monitor orders processed by the OrderBookingComposite composite. When you monitor an order, you can also view the composite sensors and activity sensors.

3.5 Deploying Fusion Order Demo

This section describes how to deploy the Fusion Order Demo applications in the partition.

3.5.1 Task 1: Create a Connection to an Oracle WebLogic Server

To create a connection to an Oracle WebLogic Server:

  1. Start Oracle JDeveloper:

    (UNIX) ORACLE_HOME/jdev/bin/jdev
    (Windows) JDEV_ORACLE_HOME\jdeveloper\JDev\bin\jdev.exe
    
  2. From the Application Menu, select New.

    Figure 3-5 Application Menu

    Description of Figure 3-5 follows
    Description of "Figure 3-5 Application Menu"

  3. In the New Gallery dialog, in the Categories tree, select General, and then Connections.

  4. Select Application Server Connection and click OK.

    The Create Application Server Connection Type page displays.

  5. Enter a unique name for the connection in the Connection Name field and select WebLogic 10.3 from the Connection Type list.

    Figure 3-6 Create Application Server Connection

    Description of Figure 3-6 follows
    Description of "Figure 3-6 Create Application Server Connection"

  6. Click Next.

    The Authentication page is displayed.

  7. Enter weblogic for the User Name and the password for that administrator in the Password field.

  8. In the Configuration page, enter the details shown in Table 3-3.

    Table 3-3 Configuration Page Fields and Values

    Application Description

    Weblogic Hostname (Administration Server)

    Name of the DNS name or IP address of the Administration Server of the Oracle WebLogic Server

    Port

    The address of the port on which the Administration Server is listening for requests (7001 by default)

    Weblogic Domain

    The domain name for Oracle WebLogic Server


  9. Click Next.

    The Test page displays.

  10. Click Test Connection.

    The following message should appear:

    Testing JSR-88                         ... success.
    Testing JSR-88-LOCAL                   ... success.
    Testing JNDI                           ... success.
    Testing JSR-160 DomainRuntime          ... success.
    Testing JSR-160 Runtime                ... success.
    Testing JSR-160 Edit                   ... success.
    Testing HTTP                           ... success.
    Testing Server MBeans Model            ... success.
     
    8 of 8 tests successful. 
    

    If the test is unsuccessful, ensure that Oracle WebLogic Server is running, and retry the test.

  11. Click Finish.

  12. In the Resource Palette, under IDE Connections, expand Application Server to see the application server connection that you created.

    Figure 3-7 Resource Palette

    Description of Figure 3-7 follows
    Description of "Figure 3-7 Resource Palette"

3.5.2 (Optional) Task 2: Create a Connection to the Oracle BAM Server

If you configured an Oracle BAM Server during installation, create a connection to it.

To create a connection to an Oracle BAM Server:

  1. From the Application Menu, select New.

  2. In the New Gallery dialog, in the Categories tree, select General, and then Connections.

  3. Select BAM Connection and click OK.

    The BAM Connection Wizard displays.

  4. Ensure that Application Resources is selected.

  5. Provide a name for the connection.

  6. Click Next.

  7. Enter weblogic for the User Name and the password for that administrator in the Password field.

  8. Enter the connection information about the Oracle BAM Server host described in Table 3-4.

    Table 3-4 Oracle BAM Server Connection Information

    Field Description

    BAM Web Host

    Enter the name of the host on which the Oracle BAM Report Server and web applications are installed. In most cases, the Oracle BAM web applications host, Oracle BAM Server host, and the Oracle WebLogic Server are the same.

    BAM Server Host

    Enter the name of the host on which the Oracle BAM Server is installed.

    User Name

    Enter the Oracle BAM Server user name. For example:

    weblogic

    Password

    Enter the password of the user name.

    HTTP Port

    Enter the port number or accept the default value of 9001. This is the HTTP port for the Oracle BAM web applications host.

    JNDI Port

    Enter the port number or accept the default value of 9001. The JNDI port is for the Oracle BAM report cache, which is part of the Oracle BAM Server.

    Use HTTPS

    Select this checkbox to use secure HTTP (HTTPS) to connect to the Oracle BAM Server during design time. Otherwise, HTTP is used.


  9. Click Next.

    The Test page displays.

  10. Click Test Connection.

    The following message should appear:

    Testing HTTP connection ... success.
    Testing Data Object browsing ... success.
    Testing JNDI connection ... success.
     
    3 of 3 tests successful. 
    
  11. Click Finish.

3.5.3 Task 3: Install the Schema for the Fusion Order Demo Application

To install the schema for the sample application:

  1. Start Oracle JDeveloper 11g and from the main menu choose File > Open.

  2. In the Open dialog, browse to DEMO_DOWNLOAD_HOME/Infrastructure and select Infrastructure.jws. Click Open.

  3. When prompted to migrate files to the 11.1.1.3.0 format, click Yes. When the migration is complete, click OK.

  4. In the Application Navigator, expand MasterBuildScript and then Resources, and double-click build.properties.

  5. In the editor, modify the following properties shown in Table 3-5 for your environment.

    Table 3-5 Properties Required to Install the Fusion Order Demo Application

    Field Description

    jdeveloper.home

    The root directory where you have Oracle JDeveloper 11g installed. For example:

    C:/JDeveloper/11

    jdbc.urlBase

    The base JDBC URL for your database in the format jdbc:oracle:thin:@<yourhostname>. For example:

    jdbc:oracle:thin:@localhost

    jdbc.port

    The port for your database. For example:

    1521

    jdbc.sid

    The SID of your database. For example:

    ORCL or XE

    db.adminUser

    The administrative user for your database. For example:

    system

    db.demoUser.tablespace

    The tablespace name for the Fusion Order Demo users. For example:

    USERS


  6. From the JDeveloper main menu, choose File > Save All.

  7. In the Application Navigator, under the Resources node, right-click build.xml and choose Run Ant Target > buildAll.

  8. When prompted, enter the administrative-user password for your database.

    The buildAll command then creates the FOD user and populates the tables in the FOD schema. In the Apache Ant - Log, a series of SQL scripts display, followed by:

    buildAll:
    BUILD SUCCESSFUL
    Total time: nn minutes nn seconds
    

    For more information on the demo schema and scripts, see the README.txt file in the MasterBuildScript project.

3.5.4 Task 4: Set Configuration Property for the Store Front Module

You can deploy the Store Front module as a simple web application or as part of a SOA environment. There is a property defined in the service portion of the Store Front module that is used within one of its pages to determine whether the Submit Order button fires an event that launches a BPEL process. When using the Store Front module within a SOA environment, you must change the default value for this property.

  1. Choose File > Open.

  2. In the Open dialog, browse to DEMO_DOWNLOAD_HOME/StoreFrontModule and select StoreFrontModule.jws. Click Open.

  3. When prompted to migrate files to the 11.1.1.3.0 format, click Yes. When the migration is complete, click OK.

    Figure 3-8 shows the Application Navigator after you open the file for the application workspace.

    Figure 3-8 Application Navigator with StoreFrontModule

    TBD
    Description of "Figure 3-8 Application Navigator with StoreFrontModule"

  4. In the Application Navigator, expand StoreFrontService > Application Sources > oracle.fodemo.storefront > store > service.

  5. Right-click StoreServiceAM and select Configurations.

  6. In the Manage Configurations dialog, select StoreServiceAMLocalWeb in the Names list, and then click Edit.

    Figure 3-9 StoreServiceAMLocalWeb

    Description of Figure 3-9 follows
    Description of "Figure 3-9 StoreServiceAMLocalWeb"

  7. In the Edit Business Components Configuration dialog, select the Properties tab and the fod.application.issoaenabled property. This property specifies whether the application is being deployed to a SOA environment.

  8. Change the value of the fod.application.issoaenabled property to true, and then click OK.

    Figure 3-10 fod.application.issoenabled

    Description of Figure 3-10 follows
    Description of "Figure 3-10 fod.application.issoenabled"

  9. Click OK.

  10. In the Manage Configurations dialog, click OK.

3.5.5 Task 5: Deploy the Store Front Module

To deploy the Store Front module, you first deploy services and then to deploy the application itself.

During deployment, Oracle JDeveloper creates the .jar and .war files and then assembles the .ear file, as specified in the deployment profiles. After the file is assembled, Oracle JDeveloper deploys the .ear file and unpacks it in a directory on the application server. The directory that is used is dependent on the target environment.

To deploy the Store Front module:

  1. Deploy the services used by the Store Front module to send orders to the OrderBookingComposite composite.

    1. From the Application menu, choose Deploy > StoreFrontModule_SDOServices.

      Figure 3-11 StoreFrontService_SDOServices

      Description of Figure 3-11 follows
      Description of "Figure 3-11 StoreFrontService_SDOServices"

    2. In the Deployment Action page of the Deploy StoreFrontService_SDOServices dialog, select Deploy to Application Server, and then click Next.

    3. In the Select Server page, select MyAppServerConnection.You created this connection in Section 3.5.1, "Task 1: Create a Connection to an Oracle WebLogic Server."

    4. Deselect option Deploy to all server instances in the domain, and then click Next.

    5. In the Server Instances page, select the Managed Server for the Oracle WebLogic Server, such as soa_server, and click OK.

    6. In the Summary page, click Finish.

    7. View the messages that display in the Deployment log window at the bottom of Oracle JDeveloper to ensure deployment was successful.

  2. Deploy the Store Front module. From the Application menu, select Deploy > StoreFrontModule > to > MyAppServerConnection.

    1. From the Application menu, choose Deploy > StoreFrontModule.

    2. In the Deployment Action page of the Deploy StoreFrontModule dialog, select Deploy to Application Server, and then click Next.

    3. In the Select Server page, select MyAppServerConnection.

    4. Deselect option Deploy to all server instances in the domain, and then click Next.

    5. In the Server Instances page, select the Managed Server for the Oracle WebLogic Server, such as soa_server, and click Next.

    6. In the Summary page, click Finish.

    7. View the messages that display in the Deployment log window at the bottom of Oracle JDeveloper to ensure deployment was successful.

3.5.6 Task 6: Deploy the WebLogic Fusion Order Demo Application

In this task, you deploy the WebLogic Fusion Order Demo application to an Oracle SOA Suite installation, containing an Oracle WebLogic Server domain with an Administration Server and a Managed Server.

To deploy the WebLogic Fusion Order Demo application:

  1. In the Application Navigator, select WebLogicFusionOrderDemo.

  2. If you configured an Oracle BAM server during installation, perform the following steps:

    1. From the Application Navigator, expand OrderBookingComposite, then SOA Content, and then bin. Double-click sca-build.properties.

      Figure 3-12 Navigating to sca-build.properties

      Description of Figure 3-12 follows
      Description of "Figure 3-12 Navigating to sca-build.properties"

    2. In the editor, modify the following properties shown in Table 3-6 for the Oracle BAM environment.

      Table 3-6 Properties Required for Oracle BAM

      Field Description

      enable.bam.sensors

      true

      Set to true to enable sensors for Oracle BAM.

      seed.bam.do

      true

      Set to true to seed data objects, alerts, and reports for Oracle BAM.

      After deployment is done, set this value back to false. If this parameter is set true after initial deployment and you redeploy at a later time, then the data objects, alerts, and reports reseed. Therefore, after initial deployment, set this parameter to false.

      bam.server.host

      The DNS name or IP address of the Managed Server for Oracle BAM. For example:

      soahost

      bam.server.port

      The port of the Managed Server for Oracle BAM. For example:

      9001

      bam.server.username

      The Oracle WebLogic Server administrator. For example:

      weblogic

      bam.server.password

      The password of the Oracle WebLogic Server administrator. For example:

      welcome1


    3. From the JDeveloper main menu, choose File > Save All. Keep the sca-build.properties tab open, so you can modify the seed.bam.do parameter to false after deployment.

  3. In the editor, perform the following steps for the WebLogicFusionOrderDemo application:

    1. From the Application Navigator, expand bin, and then Resources. Double-click build.properties.

      Figure 3-13 Navigating to build.properties

      Description of Figure 3-13 follows
      Description of "Figure 3-13 Navigating to build.properties"

    2. In the editor, modify the following properties shown in Table 3-7 for the WebLogicFusionOrderDemo application.

      Table 3-7 Properties Required for the WebLogic Fusion Order Demo Application

      Field Description

      oracle.home

      The root directory where you have Oracle JDeveloper 11g installed. For example:

      C:\\Oracle\\Middleware\\jdeveloper\\

      soa.only.deployment

      false

      You set this property to true if you are using the OrderSDOComposite composite to place orders. This guide assumes you are using the Store Front Module to place orders. Therefore, you must modify this property to false.

      admin.server.host

      The DNS name or IP address of the Administration Server for Oracle SOA Suite for hosting applications. For example:

      soahost

      admin.server.port

      The port of the Administration Server. For example:

      8001

      managed.server

      The DNS name or IP address of the Managed Server for Oracle SOA Suite for hosting applications. For example:

      soahost

      managed.server.port

      The port of the Managed Server for Oracle SOA Suite for hosting applications. For example:

      8001

      server.user

      The Oracle WebLogic Server administrator. For example:

      weblogic

      server.password

      The password of the Oracle WebLogic Server administrator. For example:

      welcome1

      server.targets

      The name of the Managed Server. For example:

      soa_server

      soa.server.oracle.home

      The location of where to store the deployment plans for the adapters. For example:

      C:\\AS11gR1SOA

      foreign.mds.type

      The location of the Oracle Metadata Repository.

      Leave the value to db and supply values for the mds.db.userid, mds.db.password, and mds.db.url parameters to specify the location of the MDS Repository.

      Set the value to Leave the default value to jdev. You do not have to specify the values for the following parameters:

      soa.partition.name

      The partition in which to deploy the composites. For example:

      soaFusionOrderDemo


  4. From the JDeveloper main menu, choose File > Save All.

  5. In the Application Navigator, under the Resources node, right-click build.xml and choose Run Ant Target and select the following ant targets in the specified sequential order shown in Table 3-8.

    Table 3-8 ant Targets to Deploy the WebLogic Fusion Order Demo Application

    Target Description

    1. validateFodConfigSettings

    This script validates the server settings, checks if the servers are up, and also validates the MDS settings. If this script returns without error, proceed with target server-setup-seed-deploy-test.

    2. server-setup-seed-deploy-test

    This script calls the following targets:

    • compile-deploy-all compiles, builds, and deploys all the SOA composites to the Managed Server.

    • seedFodJmsResources populates the JMS resources for the Fulfillment mediator.

    • seedDemoUsers This script adds jstein as the user to approve orders for over $2,000. When you run the demo, you place an order for $2,000 and log in to the Oracle BPM Worklist as jstein and approve the order.


    In the Apache Ant - Log, you should see the following message when the target successfully completes:

    BUILD SUCCESSFUL
    Total time: nn minutes nn seconds
    

    If you set up Oracle BAM after you run target server-setup-seed-deploy-test, you can still configure Oracle BAM for Fusion Order Demo by running one of these targets:

    • Re-run target server-setup-seed-deploy-test.

    • From the Application Navigator, right-click build_sca_composite.xml, (OrderBookingComposite > SOA Content) choose Run Ant Target, and then select seedBAMServerObjects.

  6. Go back to the sca-build.properties tab and modify the seed.bam.do parameter to false.

  7. From the JDeveloper main menu, choose File > Save All.

3.6 Running Fusion Order Demo

You begin the ordering process in the storefront user interface, where you submit an orders.

When an order is submitted, the Application Development Framework Business Component writes the order to database and raises an NewOrderSubmitted business event using the Events Delivery Network (EDN). The OrderPendingEvent mediator subscribes this event, and initiates the main BPEL process, OrderProcessor, to process the order.

After you submit an orders, you use Fusion Middleware Control for the Oracle SOA Suite installation to monitor how the OrderProcessor BPEL process orchestrated the orders. If you submit an order for more than $2,000, you can monitor how it requires human approval.

The instructions for placing orders and monitoring them in detail with Fusion Middleware Control are available from Oracle Technology Network:

http://download.oracle.com/otn_hosted_doc/jdeveloper/doc/11/runningfod_notes.pdf

3.7 Viewing Data Sent to Oracle BAM Server

If you configured an Oracle BAM server and a Managed Server for it, you can use the Oracle BAM Architect to view data sent to the server. For more information about using Oracle BAM applications, including Oracle BAM Architect, see Oracle Fusion Middleware User's Guide for Oracle Business Activity Monitoring.

3.8 Undeploying the Composites for the WebLogic Fusion Order Demo Application

To undeploy the WebLogic Fusion Order Demo composite applications:

  1. Access the Undeploy SOA Composite wizard in Fusion Middleware Control through the options described in Table 3-9.

    Table 3-9 Options to Access Undeploy SOA Composite Wizard

    From the SOA Infrastructure Menu... From the SOA Folder in the Navigator... From the SOA Infrastructure Home Page... From the SOA Composite Menu...
    1. Select SOA Deployment > Undeploy.

      The Select Composite page appears.

    2. In the SOA Composite Deployments section, select OrderBookingComposite and PartnerSupplierComposite to undeploy them, and click Next.

    1. Right-click soa-infra.

    2. Select SOA Deployment > Undeploy.

      The Select Composite page appears.

    3. In the SOA Composite Deployments section, select OrderBookingComposite and PartnerSupplierComposite to undeploy, and click Next.

    1. Click the Deployed Composites tab.

    2. In the Composite table, select both OrderBookingComposite and PartnerSupplierComposite.

    3. Above the Composite table, click Undeploy.

    Select SOA Deployment > Undeploy.


    The Confirmation page appears.

  2. Click Undeploy. Note that you are warned if you are about to undeploy the last remaining revision of a deployed composite application.

    Processing messages display.

  3. When undeployment has completed, click Close.