Skip Headers
Oracle® BPEL Process Manager Quick Start Guide
10g (10.1.3.1.0)

Part Number B28983-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

3 Reviewing a Loan Procurement BPEL Process

This chapter examines how to execute a more sophisticated BPEL process than the one you created in Chapter 2, "Credit Flow Tutorial". Fault-handling, interactions with asynchronous services, user and manual tasks, Java and J2EE code integrations, and custom user interfaces and portals are all key requirements for many business flows. This chapter describes how you build, test, debug, and manage a BPEL process that implements these requirements.

This chapter contains the following topics:

3.1 LoanFlowPlus Process Overview

This chapter describes the LoanFlowPlus process, which is shipped with the Oracle BPEL Process Manager samples and available in the following directory after installation:

SOA_Oracle_Home\bpel\samples\demos\LoanDemoPlus

Figure 3-1 shows the requirements implemented by LoanFlowPlus.

Figure 3-1 LoanFlowPlus Overview

Description of Figure 3-1 follows
Description of "Figure 3-1 LoanFlowPlus Overview"

This process is a long-running BPEL flow that takes a loan application document as input and asynchronously returns a selected and approved loan offer.

At the beginning of process execution, this flow gets a social security number for the customer from an Enterprise Java Bean (EJB) (accessed as a service through the native EJB Web Services Invocation Framework (WSIF) binding) and then goes to the synchronous Credit Rating service you saw in Chapter 2, "Credit Flow Tutorial" to request a credit rating for the customer.

The process is coded to handle the negative credit faults that can be thrown by the credit rating service if a negative credit event is seen for the customer (for example, a bankruptcy). If such an exception is thrown, the LoanFlowPlus process starts a human task for a customer service representative to manually handle the exception and then waits for the task to complete. The customer service representative can use a dashboard user interface to see their tasks and specify a credit rating or select to cancel each application.

Once a credit rating is supplied, either through manual or automated activities, the process goes into automated processing. It then sends the completed loan application to two loan processors. Each processor can take an arbitrary amount of time before returning a loan offer. Since the loan processors can be long-running, they are implemented as asynchronous services and the BPEL process invokes them in parallel.

In the case of this BPEL flow, it waits for both loan offers to be received before using simple branching logic to select the best offer (the one with the lowest interest rate). Finally, another human task enables the customer to review and approve the selected loan offer. Once this task has completed, the selected and approved offer is returned as the result of the flow.

3.2 Building and Reviewing the Process in Oracle JDeveloper

This section describes how to build and deploy the external services used by your BPEL process and how to start and view your process in Oracle JDeveloper.

3.2.1 Starting and Testing Your Service

As in Chapter 2, "Credit Flow Tutorial", the LoanFlowPlus process is dependent on several external services that you can quickly build and deploy using the ant command. To do this:

  1. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > Developer Prompt to open up a command prompt at the SOA_Oracle_Home\bpel\samples directory.

  2. Change directories to demos\LoanDemoPlus:

    cd demos\LoanDemoPlus
    
    
  3. Enter the following command:

    ant
    
    

    This builds and deploys the external loan services required for the LoanFlowPlus process, including the process itself.

3.2.2 Opening the LoanFlowPlus Process in Oracle JDeveloper

  1. Return to Oracle JDeveloper.

  2. Highlight myBPELapplication in the Application Navigator.

  3. Select Open from the File main menu.

    The Open window appears.

  4. Go to the SOA_Oracle_Home\bpel\samples\demos\LoanDemoPlus\LoanFlowPlus directory.

  5. Select LoanFlowPlus.jpr and click Open.

    This is the LoanFlowPlus project file, which now displays in Oracle JDeveloper.

  6. Open LoanFlowPlus > Integration Content in the Application Navigator.

  7. Double-click LoanFlowPlus.bpel.

    This displays the Diagram view of your process.

    Description of ldfdesigner.gif follows
    Description of the illustration ldfdesigner.gif

    You see that creditRatingService partner link is the same synchronous service used in Chapter 2, "Credit Flow Tutorial". However, the StarLoanService and UnitedLoanService partner links are asynchronous, supporting a one-way initiate operation and an asynchronous onResult callback that is called after a loan offer is ready from each service. That can take anywhere from a few seconds to a few days or more. As with your previous process, the client interface to the LoanFlowPlus process is also asynchronous.

  8. View a visual representation in the center swim-lane of the entire process. Oracle JDeveloper uses standard BPEL source as its native format. This means you can always select the BPEL Source view to see the underlying BPEL source code, make changes in either view and see those changes represented immediately in the alternate view, or do both. Here you see that the Diagram view shows that the process gets initiated, then encapsulates the logic to get the social security number (including the exception handling code) in a BPEL scope, and so on.

    In the following sections of this chapter, you review the code that implements this process.

3.2.3 Managing Faults

The LoanFlowPlus process uses BPEL fault handling to catch and manage exceptions thrown by the social security number and credit rating services. Fault handlers are associated with a particular scope activity and faults encountered within a scope and not handled by that scope are sent up to the enclosing scope. This is just like try-catch in Java.

Follow these instructions to view the NegativeCredit fault handler defined for the getCreditRating.

  1. Click the + sign to expand the getCreditRating scope.

    Description of ldfscope.gif follows
    Description of the illustration ldfscope.gif

    This opens the view of that scope.

  2. View the main flow running top-to-bottom within the scope. You also see a secondary flow as an extension to the right. The top of this flow contains the error activity services:NegativeCredit.

    Description of ldffault.gif follows
    Description of the illustration ldffault.gif

  3. Open the scope activity within the exception flow and view the steps that are executed as the logic for handling this fault. Any activity in BPEL (that can be arbitrarily complex, short or long running, and so on) can be used in a fault handler. In this case, a human task is defined for a customer service representative to manually handle the exception. Faults can also be handled through automated logic or rethrown.

    A portion of the code that implements fault handling is shown:

    <scope name="getCreditRating" variableAccessSerializable="no">
       <variables>
          . . .
          . . .
       </variables>
    <!-- Watch for faults (exceptions) being thrown from creditRatingService -->
       <faultHandlers>
           <catch faultName="services:NegativeCredit" faultVariable="crError">
               . . .
           </catch>
       </faultHandlers>
       <sequence>
       . . .
       . . .
       <!-- Invoke the CreditRating Service, the URL of this service's
                   WSDL is specified in the deployment descriptor -->
           <invoke name="invokeCR" partnerLink="creditRatingService"
                   portType="services:CreditRatingService" operation="process"
                   inputVariable="crInput" outputVariable="crOutput"/>
       . . .
       </sequence>
    </scope>
    
    

See Also:

The technotes for building resilient BPEL processes and running crash tests on Oracle BPEL Server at the following URL for more information about exception management, reliability, and crash testing:
http://www.oracle.com/technology/bpel

3.2.4 Interacting with an Asynchronous Loan Processor Service

Once the loan application document has been filled in, it is sent to the two asynchronous loan processor services. In this section, we examine what is required to interact with an asynchronous service in a BPEL process. As mentioned previously, BPEL has support for asynchronous activities at its core. Oracle BPEL Process Manager supports a dehydration capability. This means that flows are reliably and efficiently persisted to a data store along with all their current state information whenever they wait for asynchronous events.

BPEL also enables support for several standard methods of correlating asynchronous messages so that asynchronous callbacks can find the appropriate waiting process instance. Specifically, Oracle BPEL Server supports the following:

  • Correlation set mechanism, which uses message content for correlation

  • WS-Addressing specification, which uses SOAP message headers for correlation of asynchronous messages

Follow these steps to see how the LoanFlowPlus process invokes the UnitedLoan service and waits for its asynchronous callback.

  1. Expand the scope_collectOffers scope activity.

  2. Expand the collectOffers flow activity.

  3. Double-click the invokeUnitedLoan invoke activity in the left-hand sequence.

    Description of ldfscope2.gif follows
    Description of the illustration ldfscope2.gif

In the Invoke window, you see that this activity passes the loan application document as an input variable (named loanApplication) to UnitedLoanService. The initiate operation returns immediately. However, the next activity (the receive activity for the onResult callback) waits until the service has called back with a loan offer.

WS-Addressing is used for message correlation (by default) and is handled completely transparently by Oracle BPEL Server. If you want to see the WS-Addressing correlation information, you can use a TCP tunnel to see the SOAP messages exchanged with the services.

The BPEL source code for the invoke and receive activities that receive the offer back from UnitedLoanService can be seen by clicking the BPEL Source view or by right-clicking the activity and selecting View > Go to Source. This source code is as follows:

<sequence>
      <!--  initiate the remote service -->
      <invoke name="invokeUnitedLoan" partnerLink="UnitedLoanService"
              portType="services:LoanService" operation="initiate"
              inputVariable="loanApplication"/>
   . . .
   . . .
 <!--  receive the result of the remote service -->
      <receive partnerLink="UnitedLoanService"
               portType="services:LoanServiceCallback" operation="onResult"
               variable="loanOffer1" createInstance="no"/>
     </sequence>

See Also:

Oracle BPEL Process Manager Developer's Guide for details about using TCP tunneling to view SOAP messages exchanged with services

3.2.5 Reviewing Parallel Processing

As mentioned in "LoanFlowPlus Process Overview", LoanFlowPlus must invoke the two loan service providers in parallel since they can take an arbitrary amount of time to complete. This is done in BPEL by using the flow activity, which enables several actions to be taken in parallel. An example of this is shown in the collectOffers flow activity in "Interacting with an Asynchronous Loan Processor Service". This flow contains two parallel activities — the sequence that invokes UnitedLoanService and the sequence that invokes StarLoanService.

The simple BPEL source code that implements this flow activity is as follows:

<flow name="collectOffers">
     <!-- ************************************************************
         Invoke the first loan provider (UnitedLoan)
           ************************************************************ -->
     <!-- invoke first loan provider -->
     <sequence>
      <!--  initiate the remote service -->
      <invoke name="invokeUnitedLoan" partnerLink="UnitedLoanService"
              portType="services:LoanService" operation="initiate"
              inputVariable="loanApplication"/>
      <!--  receive the result of the remote service -->
      <receive partnerLink="UnitedLoanService"
               portType="services:LoanServiceCallback" operation="onResult"
               variable="loanOffer1" createInstance="no"/>
     </sequence>
     <!-- ************************************************************
           Invoke the second loan provider (StarLoan)
           ************************************************************ -->
     <sequence>
      <!--  initiate the remote service -->
      <invoke name="invokeStarLoan" partnerLink="StarLoanService"
              portType="services:LoanService" operation="initiate"
              inputVariable="loanApplication"/>
      <!--  receive the result of the remote service -->
      <receive partnerLink="StarLoanService"
               portType="services:LoanServiceCallback" operation="onResult"
               variable="loanOffer2" createInstance="no"/>
     </sequence>
    </flow>

3.2.6 Reviewing Human Tasks

BPEL has fundamental support for asynchronous services, which integrate people and manual tasks into BPEL processes. A set of prebuilt services are integrated with Oracle BPEL Server that enable you to include human workflow in your processes. By implementing this as a true BPEL service, the interface to these services is described in the WSDL and people can be included in 100% standard BPEL processes. To the BPEL process, the person and manual task look like any other asynchronous Web service.

The LoanFlowPlus process illustrates manual task support in several places:

  • For exception management, as described in "Managing Faults"

  • For the approval step, where the flow waits for the customer to confirm the selected loan offer before completing

Follow these instructions to see how a human workflow is implemented:

  1. Select Process Activities from the Component Palette.

  2. View the Human Task activity, which can be dropped into a process flow. This enables you to create a task definition with the Human Task editor. This editor enables you to select assignees, approval patterns, notification channels, and so on.

    Description of ldfhuman.gif follows
    Description of the illustration ldfhuman.gif

    The Human Task palette element is a template activity that enables the developer to treat a human task as a higher-level abstraction, although it is implemented as a series of BPEL activities.

  3. Expand the LoanOfferReview human task activity.

    There are several initial assign activities. The process then makes a call to the TaskService partner link. This partner link exposes the operations required to act on a task.

    Description of ldfhumans2.gif follows
    Description of the illustration ldfhumans2.gif

    APIs are provided so that clients can query the tasks assigned to a user, update the task data, and complete or cancel the task. In addition, check out of tasks for group and role support expiration of tasks, escalation, and other common human task requirements are implemented by the task service.

    In the LoanFlowPlus process, all user interaction is handled by custom Java Server Pages utilizing the Java API. During the customer confirmation, you:

    Oracle also supplies an out-of-the-box Oracle BPEL Worklist Application that can be used (and customized) to handle human interaction within a workflow-enabled process.


    See Also:

    The Workflow Services chapter of Oracle BPEL Process Manager Developer's Guide for more information on human workflow within BPEL and building task service clients

3.3 Viewing the Web Services Invocation Framework

An enterprise frequently has existing Java code or Java APIs for accessing back-end systems that it wants to use in a BPEL process. There are three general approaches for this feature:

The first two approaches are straightforward and illustrated by several code examples shipped with Oracle BPEL Process Manager.

As an example of the third approach, the LoanFlowPlus process uses the WSIF to invoke an EJB that returns a social security number for the customer. From your BPEL process, you can treat the EJB service as you do any other service that has a WSDL interface and create a partner link for it in your BPEL process. Functionality offered by the EJB is mapped directly to the services WSDL interface through an EJB binding. The CustomerService.wsdl file in the Application Navigator shows this binding:

<!-- binding declns -->
  <binding name="EJBBinding" type="tns:CustomerService">
    <ejb:binding/>
    <format:typeMapping encoding="Java" style="Java">
      <format:typeMap typeName="xsd:string" formatType="java.lang.String" />
      <format:typeMap typeName="tns:CustomerNotFoundExceptionType"
 formatType="com.otn.samples.CustomerNotFoundException" />       
    </format:typeMapping>
    <operation name="getCustomerSSN">
      <ejb:operation
         methodName="getCustomerSSN"
         parameterOrder="email"
         interface="remote"
         returnPart="ssn" />
      <input name="GetCustomerSSNRequest"/>
      <output name="GetCustomerSSNResponse"/>
      <fault name="CustomerNotFoundException"/>    
    </operation>   
  </binding>

  <!-- service decln -->
  <service name="CustomerService">
    <port name="EJBPort" binding="tns:EJBBinding">
      <!-- Put appserver vendor-specific deployment information here -->
<ejb:address className="com.otn.samples.CustomerServiceHome"
     jndiName="ejb/session/CustomerService"
     initialContextFactory="com.evermind.server.rmi.RMIInitialContextFactory"
     jndiProviderURL="ormi://${hostname}/CustomerService"/>
      
    </port>
  </service>
      <plnk:partnerLinkType name="CustomerService">
    <plnk:role name="CustomerServiceProvider">
      <plnk:portType name="tns:CustomerService"/>
    </plnk:role>
   </plnk:partnerLinkType>  
</definitions>

This means that the EJB is being accessed as a WSDL-described service, where WSIF is mapping the operations to EJB methods.


Note:

Oracle JDeveloper 10.1.3.1.0 automatically generate WSDLs with Java and EJB bindings for plain old Java objects (POJOs) and EJBs, in addition to the currently supported SOAP bindings.

3.4 Building a Custom User Interface for Initiating the BPEL Process

All BPEL processes are themselves Web services. In addition, Oracle BPEL Process Manager provides a Java API for invoking deployed BPEL flows, fetching state and status information from active instances, and so on. A BPEL process is frequently instantiated from a portal or other custom user interface. For example, the LoanFlowPlus process has a JSP loan interface that customers can use to initiate new loan applications, see the offers they have received, and approve offers. The LoanFlowPlus user interface is deployed onto the same application server as Oracle BPEL Process Manager and full source for it can be found in your samples at:

SOA_Oracle_Home\bpel\samples\demos\LoanDemoPlus\LoanFlowPlusUI

JavaDocs for the Java API for initiating a deployed BPEL process can be found in:

SOA_racle_Home\bpel\docs\apidocs\index.html

In addition, a JSP tag library is available for easy use of this Java API from a JSP (this tag library is used by the LoanFlowPlusUI sample). Developers can also use the Web services SOAP and WSDL API to invoke BPEL processes. The Web services approach enables BPEL flows to be invoked and accessed from any language or tool kit that supports Web services.

3.5 Initiating the LoanFlowPlus Process

You now use the portal user interface to initiate and complete a LoanFlowPlus instance and Oracle Enterprise Manager 10g BPEL Control to view the status, audit trail, debugging information, performance metrics, and other information gathered automatically by Oracle BPEL Server.

The LoanFlowPlus BPEL process was compiled and deployed, along with its dependent services and the portal user interfaces, when you executed the ant command in "Starting and Testing Your Service". You can also build and deploy processes from Oracle JDeveloper, as you did in Chapter 2, "Credit Flow Tutorial".

Follow these instructions to initiate and complete a LoanFlowPlus instance:

  1. Go to the following portal user interface:

    http://localhost:8888/LoanFlowPlusUI/Homepage.html
    
    
  2. Click the Initiate New BPEL Loan Flow link on the portal page:

    Description of ldfloanflow.gif follows
    Description of the illustration ldfloanflow.gif

    A Web page appears that enables you to submit a loan application to initiate a new LoanFlowPlus instance.

  3. Change the fields in the user interface, if you want, and click Submit Loan Application to initiate the new process instance:

    Description of ldfloancenter.gif follows
    Description of the illustration ldfloancenter.gif

3.6 Viewing the Visual Audit Trail

You now perform the tasks of a developer or administrator and use Oracle Enterprise Manager 10g BPEL Control to view the audit trail and other status information regarding this process.

  1. Access Oracle Enterprise Manager 10g BPEL Control through one of the following methods:

    • Selecting Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > BPEL Control

    • Going to the following URL:

      http://localhost:8888/BPELConsole/
      
      
  2. Enter the following details to log in to Oracle Enterprise Manager 10g BPEL Control and click Login:

    Field Value
    Username bpeladmin
    Password password

    Where password is the value you entered during installation in "Installing Oracle Application Server SOA Suite".

    Several in-flight instances and several completed instances of BPEL processes appear.

  3. Click the active instance of the LoanFlowPlus process in the Instance column.

    Description of ldfconsole.gif follows
    Description of the illustration ldfconsole.gif

    Everything you see in Oracle Enterprise Manager 10g BPEL Control is also available through an API. In fact, Oracle Enterprise Manager 10g BPEL Control is just a set of JSPs that can serve as a code example of how to use Oracle BPEL Server APIs. Developers frequently use these APIs to build custom process dashboards, search screens, and other interfaces so users and administrators can more efficiently access and manage process instances. This is particularly common as applications are deployed to a production environment where there can be thousands or even millions of process instances to manage.

    Once you select the LoanFlowPlus instance in Oracle Enterprise Manager 10g BPEL Control, you see the visual audit trail that shows the current status of the process and its execution history. This audit trail is automatically generated and maintained by Oracle BPEL Server, though you can control what information gets logged.

  4. Click an activity in the visual audit trail to view detailed information for that activity (for this example, receiveInput). In the following window, for example, the client initiation has been selected and you see the XML input message that was sent to initiate the flow.

    Description of ldfact.gif follows
    Description of the illustration ldfact.gif

  5. Scroll down to the bottom of the visual audit trail to view the latest status for this instance. In this case, the StarLoan service has been initiated but the flow is waiting to receive a response (as indicated by the orange highlighting). However, the UnitedLoan service has already called back with a loan offer.

    Description of ldfflow.gif follows
    Description of the illustration ldfflow.gif

  6. Click the Audit tab to see a text-based audit trail. The text audit trail includes information such as the messages exchanged with services and timestamps for when each activity was started or completed. This is also configurable and accessible through the API.

3.7 Debugging the In-Flight BPEL Process

  1. Click the Debug tab to see the BPEL Debugger, which takes the BPEL source code that implements this process and matches it against the state of this particular instance. Points in the code where execution is currently paused are highlighted in yellow. As shown at the bottom of this code, the process is currently waiting for the StarLoan service to call back with a loan offer.

    Description of ldfdbg.gif follows
    Description of the illustration ldfdbg.gif

  2. Select variables in the debugger to inspect their current values. The value of the loan offer variable (named loanOffer1) that contains the result of the UnitedLoan service callback operation is shown in the preceding figure. As you can see, UnitedLoan has approved the loan application and returned a 5.7% interest rate loan offer.

3.8 Completing the Asynchronous StarLoan Service

If you now want to complete the process, you can start the StarLoan customer service representative dashboard, since StarLoan requires manual processing of loan applications. StarLoan has also been implemented as a BPEL process (though implementations are available where StarLoan is built with other Web services tool kits, such as Microsoft .Net, Apache Axis, and so on) and serves as an additional BPEL code example.

Follow these instructions to play the role of the StarLoan loan officer.

  1. Go to the following URL:

    http://localhost:8888/StarLoanUI/home.jsp
    
    
  2. Enter the following details to log in and click Submit:

    Field Value
    Username jcooper
    Password password

    Pending loan applications appear.

    Description of ldfapp.gif follows
    Description of the illustration ldfapp.gif

  3. Select the loan application, enter an interest rate (enter a low rate since you are approving your own loan application), and click Approve. This causes the StarLoan service to return a callback to the LoanFlowPlus process.

  4. Refresh the audit trail in Oracle Enterprise Manager 10g BPEL Control to see that processing has progressed, having received the StarLoan callback with the second loan offer and selected the best loan offer. It is now waiting for the customer to approve the offer.

    Description of ldfrec.gif follows
    Description of the illustration ldfrec.gif

  5. Click View xml document to view specific details about the loan offer:

    <?xml version="1.0" encoding="UTF-8" ?> 
    - <loanOffer xmlns="http://www.autoloan.com/ns/autoloan">
      <providerName>Star Loan</providerName> 
      <selected /> 
      <approved>true</approved> 
      <APR>5.5</APR> 
      </loanOffer>
    

3.9 Completing a Human Task

  1. Refresh the customer loan portal home page. You now see the selected loan offer waiting for review. This is the final step in the process.

    Description of ldfapp2.gif follows
    Description of the illustration ldfapp2.gif

  2. If you select this loan offer, a page displays that enables the customer to accept this offer. This completes the execution of this instance of the LoanFlowPlus BPEL process.

    Description of ldfaccept.gif follows
    Description of the illustration ldfaccept.gif

3.10 Tuning Performance

Performance (including throughput and response time requirements) is frequently a critical requirement for effectively implementing a BPEL process. Built in to Oracle BPEL Server and Oracle Enterprise Manager 10g BPEL Control is a performance-tuning framework. This framework assists developers in understanding the performance of their applications and identifying and resolving bottlenecks (whether in the developer's code, an external service, or Oracle BPEL Server).

  1. Return to Oracle Enterprise Manager 10g BPEL Control.

  2. Click Manage BPEL Domain in the upper right corner, and then click Statistics.

    A page with the performance data for your completed flows appears:

    Description of ldfstats.gif follows
    Description of the illustration ldfstats.gif

    Oracle Enterprise Manager 10g BPEL Control enables you to test any of your deployed processes through an automatically generated HTML form interface or by passing specific XML message content to it. This test page includes stress test capabilities that enable you to do load testing of a deployed BPEL process and view the performance statistics of the flow under stress.

  3. Click the Dashboard tab.

  4. Click LoanFlowPlus in the Deployed BPEL Processes list.

  5. Scroll to the bottom and select Perform stress test.


    Note:

    Do not use this built-in stress test capability with the Oracle Database Lite database included with the Oracle Application Server SOA Basic Install type.

    Description of ldfstress.gif follows
    Description of the illustration ldfstress.gif

3.11 Managing the Process Lifecycle

Oracle BPEL Process Manager and Oracle Enterprise Manager 10g BPEL Control provide support for process lifecycle management. For example, side-by-side versioning is supported so that new implementations of a process can be hot-deployed without disturbing current in-flight instances of prior implementations of the process. In addition, Oracle Enterprise Manager 10g BPEL Control can turn off an entire process, undeploy a process, or retire a process such that existing instances can complete, but new instances of the process are not allowed.

  1. Select the name of a deployed BPEL process in Oracle Enterprise Manager 10g BPEL Control and click the Manage tab on the left side.

    The following page appears.

    Description of ldfmanage.gif follows
    Description of the illustration ldfmanage.gif


    See Also:

    Oracle BPEL Process Manager Developer's Guide for additional details about the process lifecycle.

3.12 Building and Viewing Process Reports

Oracle BPEL Process Manager provides the following process reporting features:

3.12.1 Building A Reporting Dashboard

An important feature of automating a business process is often to provide greater visibility into process state information. This is often realized by building a process dashboard that displays aggregate summary information or process instance state information. For example, an executive may want to know how many loans are currently at each stage of processing, the average time to present a loan offer to a customer, or other key performance indicators against live and completed process instances.

Oracle BPEL Process Manager maintains a great deal of information regarding process state and makes this information available through the API. In addition, several simple reporting dashboard templates are shipped with Oracle BPEL Server or are available from professional services and support organizations.

  1. Access a template included with the LoanFlowPlus process through the following URL:

    http://localhost:8888/LoanFlowPlusUI/dashboard.jsp
    
    
    Description of ldfdash.gif follows
    Description of the illustration ldfdash.gif

3.12.2 Viewing Oracle Enterprise Manager 10g BPEL Control Reports

Oracle BPEL Process Manager also provides built-in reports to Oracle Enterprise Manager 10g BPEL Control to enable process optimization.

  1. Return to Oracle Enterprise Manager 10g BPEL Control.

  2. Click LoanFlowPlus in the Deployed BPEL Processes list of the Dashboard tab.

  3. Click the Reports tab.

  4. Select a specific report type, specify specific query details, and click Go. An example of the process time distribution report type is as follows.

    Description of reports_ptd1.gif follows
    Description of the illustration reports_ptd1.gif


    See Also:

    Oracle BPEL Process Manager Developer's Guide for additional details about Oracle Enterprise Manager 10g BPEL Control reports

3.12.3 Viewing BAM Reports

Oracle also provides a business activity monitoring (BAM) component that integrates with Oracle BPEL Process Manager. Oracle BAM enables business executives to monitor their business events and processes in the enterprise, correlate messages and define KPIs (key performance indicators) and define alerts and take corrective action based on real-time information accessed through a live-data, thin-client web interface.

Figure 3-2 provides an example of the Oracle BAM user interface displaying information:

Figure 3-2 Oracle BAM Reports

Description of Figure 3-2 follows
Description of "Figure 3-2 Oracle BAM Reports"

Oracle JDeveloper includes support for sensors that make it easy to send events from BPEL processes to Oracle BAM Server. However, Oracle BAM Server can gather events from any source within the enterprise (JMS messages, database events, and so on) that can write to a JMS queue, and is not limited to BPEL process events.

3.13 Testing BPEL Processes in a Development Environment

Oracle BPEL Process Manager enables you to create and deploy test suites with a BPEL process to Oracle BPEL Server. Test suites consist of XML test files that enable you to automate testing of a BPEL process in a development environment. The tests contain instructions you create for simulating partner Web service interactions, validating process actions with test data, and calculating the percentage of source code executed in simple activities. This testing ensures that a process runs correctly before its deployment to a production environment.

Follow these instructions to create and deploy test suites.

  1. Right-click Test Suites in Oracle JDeveloper and select Create Test Suite.

    Description of ldftests1.gif follows
    Description of the illustration ldftests1.gif

  2. Enter a name for the test suite and click OK.

  3. Right-click the test suite you created and select Edit Test Suite.

    Description of ldftests2.gif follows
    Description of the illustration ldftests2.gif

  4. Add baseline and emulated message instance test files to your test suite.

  5. Deploy test suites for the BPEL process to Oracle BPEL Server.

  6. Run the test suite on a BPEL process instance and create XML document reports from Oracle Enterprise Manager 10g BPEL Control (under the BPEL Processes tab > process_instance_name > Test Suites) or an ant task.

    Description of ts_testsuite2.gif follows
    Description of the illustration ts_testsuite2.gif

    You can view report results, fix any errors, and repeat test execution.


    See Also:

    Oracle BPEL Process Manager Developer's Guide for additional details about BPEL process testing

3.14 Integrating with a Web Service Management Solution

A frequently asked question is how do you secure and manage both services and the BPEL processes that orchestrate them within an enterprise adopting service-oriented architecture (SOA). A Web service management (WSM) solution such as Oracle Web Services Manager (OWSM) provides features such as authentication, authorization, encryption, and logging for services and processes through the definition of policies. As shown in Figure 3-3, Web service management solutions typically provide proxies or gateways in front of Web services. This includes both back-end Web services that can be implemented in many different technologies and BPEL processes deployed to Oracle BPEL Server, or other BPEL servers, since a BPEL process is itself a Web service.

Figure 3-3 Web Service Management

Description of Figure 3-3 follows
Description of "Figure 3-3 Web Service Management"

OWSM provides a managed end-point here, which looks to the BPEL process just like the underlying Web service. The BPEL process does not need to know that it is connecting to a managed end-point rather than the service itself. OWSM (or other products that support the same standards) then provides a pipeline of steps so that encryption, authentication, service virtualization, and other key requirements can be implemented in a uniform manner. Likewise, OWSM can be placed logically in front of Oracle BPEL Process Manager to manage the connections to BPEL processes.

Figure 3-4 and Figure 3-5 show the Oracle Web Services Manager user interface:

Figure 3-4 Oracle Web Services Manager User Interface

Description of Figure 3-4 follows
Description of "Figure 3-4 Oracle Web Services Manager User Interface"

Figure 3-5 Oracle Web Services Manager User Interface

Description of Figure 3-5 follows
Description of "Figure 3-5 Oracle Web Services Manager User Interface"

3.15 Demonstrations and Tutorials

A series of demonstrations, activity and conceptual reference materials, and tutorials are also provided to increase conceptual knowledge and hands-on experience with Oracle BPEL Process Manager. These materials are installed with Oracle BPEL Process Manager in the SOA_Oracle_Home\bpel\samples directory.


See Also:

Chapter 1 of the Oracle BPEL Process Manager Developer's Guide for descriptions of the demonstrations, activity and conceptual reference materials, and tutorials provided with Oracle BPEL Process Manager