Oracle BAM data control is a binding component in the Oracle ADF Model with support for Active Data Services. Oracle BAM data control allows ADF developers to build applications with a dynamic user interface that changes based on real-time business events. Oracle BAM data control is used to bind data from Oracle BAM data objects to databound UI components in an ADF page.
Oracle BAM data control abstracts a query on Oracle BAM data objects using standard metadata interfaces to describe the Oracle BAM data collections. Using JDeveloper, you can view that information as icons which you can drag and drop onto a page. Using those icons, you can create databound UI components (for JSF JSP pages) by dragging and dropping them from the Data Controls panel onto the visual editor for a page. JDeveloper automatically creates the metadata that describes the bindings from the page to the Oracle BAM data objects. At runtime, the ADF Model layer reads the metadata information from appropriate XML files for both the data controls and bindings and implements the connection between your user interface and Oracle BAM data objects. Note that Oracle BAM data control is read-only.
Creating Projects using BAM DC
Oracle BAM data control must to be hosted by a valid ADF web application. Also, a limited set of ADF Faces components support active data, therefore a limited set of ADF Faces components can make use of the main functionality of an Oracle BAM data control.
Oracle BAM data control requires that the project contain the ADF Faces and ADF Page Flow technologies. The Fusion Web Application (ADF) template in JDeveloper contains these technologies.
Creating BAM Server Connection
You must create a connection to Oracle BAM to browse the available data objects in JDeveloper. This connection information is automatically used during deployment and runtime.
Fallowing Steps describes about Creating BAM Server Connection in JDeveloper. Create a connection to an Oracle BAM Server to browse data objects available on that server.
- In JDeveloper, from File menu click New.
- From the General category, choose Connections and from Items select BAM Connection
- Click ok
- Ensure that Application Resources is selected, provide a name for the connection as BAMServerConnectionPO and click Next.
- Enter the connection information about the Oracle BAM Server host.
BAM Web Host: localhost.
BAM Sarver Host: localhost
User Name:Enter the Oracle BAM Server user name (weblogic).
Password: Enter the Password of user name (welcome1).
HTTP Port: 9001
JNDI Port: 9001
Uses HTTPS: uncheck
- Click Next.
- Test the connection use Test Connection button; if the connection was successful, the following message appears in wizard.
- Once test was successful click Finish.
Exposing Oracle BAM with Oracle ADF Data Controls
Once you have created your Oracle BAM data objects and established a connection to an Oracle BAM server from JDeveloper, you can use JDeveloper to create data controls that provide the information needed to declaratively bind UI components to those data objects.
- Create Generic Application in JDeveloper.
Application Name as Test_bam
Package as com.techdemo.bam
Project name as Test_bam
Select technologies as ADF Business Components and ADF Faces.
- Once Test_bam Created in JDeveloper Application Navigator will be look like as below diagram.
- Ensure that BAM Server connection is there are not for this application if not create a BAM Server connection.(if connection was created you’re able to see BAM serverConnection under Application Resources)
- In the Application Navigator, Application Resources panel, expand the data object folders in the Oracle BAM Server connection.
- Right-click the Oracle BAM data object for which you want to create a data control, and select Create Data Control from the context menu.
- Here create Data Control for BAM_Composite_DO Data Object
- Complete the BAM Data Control wizard to create the data control query.
In Create BAM Data Control Wizard Name step
Bam Data Control name: default
Directory name: default
Query Type: select Group Query
New records position: at the beginning
- Click Next.
- Click Add to add a parameter.Click the Add icon above and to the right of the Parameters box. Name as myparameter and check Enable Default Value select ALL.
- Click Next.
- From Calculation step from Insert Expression select Sum and click on the same,
Same as select Total Amount from Insert Field, from Group By select CustID using popup then click OK.
- Click pencil icon to rename calculation1 to mycalculation click Ok
- Click Ok from Calculated Filed step.
- From Groups step of BAM Data Control. Select all fields. And then click next.
- Skip Aggregates, click next.
- Skip Filters, click Finish.
- After Finishing BAM Data Control Wizard. You’re able to see BAM_Composite_DO in Data Control of JDeveloper.
Using Oracle BAM Data Controls in ADF Pages
Oracle BAM data controls can be used in all ADF Faces components. Only subsets of ADF Faces components are ADS (active data service) capable.
- Right Click on Test_bam project, select new from context menu.
- New Gallery opened one you click on. Select Current Project Technologies tab
Select JSF from Web Tier of Categories side and select JSF page from Items side then click OK.
- Now Create JSF Page Wizard will be shown as be low diagram.
Rename File Name as Test
Check create as XML Document (*.jspx)
From page template select oracle three column layouts
- After you done creation of JSF page, test.jspx page will be opened in Editor Mode in JDeveloper
- Remove End facet from test.jspx page, right click on End facet the from context menu click on Delete option
- From Component panel drag and drop Panel Splitter into test.jspx page of center facet.
- In Panel Splitter of Property Inspector change the Orientation as Vertical from Common.
- From Data controls expand BAM_Composite_DO select Query, drag and drop to first facet of the page.
- After drop Query component in to First facet, it show context menu select ADF Read-only table… from Table.
- This will be shown Edit Tables Columns Wizard check Enable sorting and enable Filtering then click ok.
- Read-only table will be shown in page as like below diagram.
- Same way drag and drop Query component on second facet of page and select Graph from context menu.
- It will show Component Gallery select Pie from categories the click OK.
- It will show Create Pie Graph Wizard, select id from pie and select _custID ,_orderID from Slices. Then click OK.
- After creating both the page should like as below diagram.
- Right Click on the test.jspx page or from application navigator Right click on test.jspx page click on RUN.
- After successfully run the application you can able to see the ADF UI page in Browse
This will show Data from BAM Data Objects like in BAM Active Studio reports.
- So that we can create web application from Oracle BAM Data Controls in JDeveloper
Using Oracle ADF.