Saturday, March 23, 2013

BPEL Process Monitoring Objects through Oracle BAM

BPEL process configurable monitoring objects are available in three types:
  • Counters.
  • Intervals. 
  •  Business Indicators.

Configuring Counters

   Every time the BPEL process passes a snapshot of a Counter (which is attached to an activity in the BPEL process diagram), data is sent to Oracle BAM. The Counter indicates how often a BPEL activity is encountered, and creates a new record in an Oracle BAM data object with time data.
1.       Open ApproveLargeOrder BEPL in JDeveloper.
2.       Right Click on receiveInput activity    select Create, Choose a monitoring object type as Counter from the list.


3.       Use counter Dialog to create a Counter monitoring object. Mention Name as AllInputs, check Enable, in Snapshots section select ReceiveInput for Activity Name.

4.       Choose an evaluation event (an event within the activity), by clicking the browsing icon.
5.       The Evaluation Event Chooser opens to let you select one or more evaluation events then click ok twice.
6.       When the Counter snapshot configuration is complete, it is displayed as an N icon next to activity in the BPEL process diagram.

7.       The Counter and its snapshot are represented in the structure pane also.

8.       Once you done all these steps of configure counters, save the composite uses save all option from JDeveloper toolbar.  

Configure Intervals

                An Interval monitoring object captures the amount of time to go from one activity to another in the BPEL process. The start and end times are captured and sent to an Oracle BAM data object.
  1. To create Interval monitoring object you can use any one way out of there ways to create a  monitoring object.
2. In BEPL Editor right click on select Create  choose Interval monitoring  object
   3.       Use the Interval dialog to configure an Interval monitoring object.

a.       The Enabled checkbox enables or disables this particular monitoring object.

b.      The Start Activity defines the beginning of the Interval. Select a Start Activity from the list as assignCCNumber.


c.       End Activity defines the end of the Interval. Select an End Activity from the list as callBackClient.

d.      You can select Associated Indicators if a Business Indicator has been previously defined in the BPEL process. Selecting an associated indicator automatically provides two snapshots on the selected Business Indicator. This captures the Business Indicator metrics at the start and at the end of the Interval.
  4.       Click Ok to complete Interval monitoring object wizard.
   5.       Once you done! You able to see MainFlow interval object in structure plane.
   6.        Finally save the composite.

Configure Business Indicators

A Business Indicator monitoring object captures a snapshot of BPEL variables, specified by the metrics in the Business Indicator, or evaluates expressions, when the events specified in the Business Indicator are encountered in the BPEL process.
  1.      To create Business Indicator you can use any one way out of there ways to create a monitoring  object. From ApprovalLargeOrder bple click Monitoring .
2. In apprevellargeOrder.bpel click create Monitoring object icon from header of BPEL. As shown in diagram.
         
          
 3 Now it will show the Business Indicator dialog box by clicking Green plus Icon add business Indicator.

4.       Now go to Structure  panel of BPLE select Business Indicator  click on pencil like icon for Editing.

      5.        It will show the Business Indicator dialog. 
      Name as PriceIndicator
   From Metric use green plus icon to add Metric


  6.       In Metric change name as Price Data Type to decimal and select XPath as below diagram using search.

  7.       After Entering all above details the Diagram look like as below.

  8.       Now add Business Indicator to right click on  assigeCCNumber add Business Indicator.


    9.       This will show the available business Indicator in dialog select PriceIndicator the click ok.


   10.   Now observer BPEL at assigneeCCNumber  Business Indicator icon will be appear.
 

   11.   Click on that Indicator  this will show  Activity Business Indicator dialog the select  PriceIndicator


   12.   The priceIndicator will opened Business indicator   as shown below diagram. From that select and From Evaluation Events select Browse. 


   13.   In Evaluation Event Chooser check activates and complete   then click OK.
   14.   After setting all Indicators the Business Indicator will be look like.

   15.   Click ok Twice for all Business Indicators.

   16.   Save the Composite close the BPEL Process. 

Configure BPEL Process Monitors for Deployment

   1.       In the Application Navigator project folder, open the  monitor.config  file for editing.
   2.       The monitor.config file defines deployment and runtime properties needed to connect with Oracle BAM Server to create and populate the data objects
  3.       The default monitor.config file is shown in the following example.
<?xml version="1.0" encoding="UTF-8"?>
<MonitorConfig>
  <Connection>
    <BAM dataObjectsFolder="/Samples/Monitor Express/"
         adapterConnectionFactoryJNDI="eis/bam/rmi" batch="true"
         deploymentProtocol="http"></BAM>
  </Connection>
  <Deployment ignoreErrors="true"/>
</MonitorConfig>
2.       Deploy PoProcessing Application to SOA server (as u did in your Po Processing application deployment).

Testing the Application 

Testing Application here is you configures Express Monitoring in BPEL and configured monitoring objects.
    1.       Open em console where PO Processing application is running.


    2.       After logged in navigate to PO Processing application from SOA domain click on PO processing.


   3.       Once PO Processing composite Opened click on Test button to test the services.

   4.       Provide input as xml formate  as you did for PO Processing application time.here provide input  from file po-large-iPodx30.txt

    5.       After provide input click on TestWebservices button.

   6.       After successfully test, you can see test status as Request successfully received.


   7.       Use internet Explorer Browser to login Oracle BAM.
   8.       Enter credentials of Oracle BAM server
Username: weblogic(or match with user configurations) .
Password: welcome1 (or match with user configurations)

    9.       Once you successfully login, able to see the Oracle BAM server console like below diagram.  



    10.   For observing Data Objects created by Express Monitoring click on Architect tab.
    11.   In  BAM Architect page  navigate to Data Objectsà Samples  then click on Express Monitoring 
In Data Objects of Express Monitoring you can able to see COMPONENT, COUNTER, and INTERVAL Data Objects which is created by monitoring option.

   12.   Now click on COMPONENT Data Object.


  13.   Right side of COMPONENT Data Object click on Content, you’re able to see content Component Data.   


   14.   Same way can also to see for COUNTER Data objects contents also which you configure at the time of Counter configuration.

How many Orders/requests are received to receive input activity?
    
  

  15.   As Same as Interval Data Objects also.
As for Business Indicator will create BI_PO_POPROCESSING_APPROVELARGEORDER Data Object in Express Monitoring folder. You can see content as same above.

No comments:

Post a Comment