Sunday, June 30, 2013

Using Oracle BAM web Services


The Oracle BAM web services are part of the Oracle BAM technologies that feeds data to the Oracle BAM Server. This chapter provides information about using the Oracle BAM web services.
The Oracle BAM web services allow users to build applications that publish data to the Oracle BAM Server for use in real-time charts and dashboards. Any client that can talk to standard web services can use these APIs to publish data to Oracle BAM. The Oracle BAM web services interfaces allow integration of Oracle BAM with other components such as Oracle BPEL Process Manager and Oracle Mediator, and they facilitate SOA composite application development.
The data objects in the Oracle BAM Server are available using the Oracle BAM web services.

Using the DataObjectOperations Web Services


The DataObjectOperations web service allows users to manipulate the Data Objects in the Oracle BAM Server by inserting, updating, deleting and upserting rows into the Data Objects.
  • Batch performs batch operations on a data object. Batch is not supported for DataObjectOperationsByName web service.

  • Delete removes a row from the data object.

  • Get fetches the details from a data object per the specifications in the XML payload. Get is only available in DataObjectOperationsByName web service.

  • Insert adds a row to the data object.

  • Upsert inserts new data into an existing row in a data object if the row exists. If the row does not exist a new row is created.

  • Update inserts new data into an existing row in a data object.






How Use the DataObjectOperations web service

To use the DataObjectOperations web service, create a web service proxy in your application in Oracle JDeveloper.
  1. Start JDeveloper id it’s not running.

  1. Create New Application. Create ADF Application name it as BAMwebservice
  1. The Web Services Description Language (WSDL) files for the DataObjectOperations web services are available at the following URLs on the system where Oracle BAM web services are installed.
http://localhost:9001/OracleBAMWS/Services/DataObject/DataObjectOperations.asmx?WSDL

http://host_name:9001/OracleBAMWS/WebServices/DataObjectOperationsByID?WSDL


http://host_name:9001/OracleBAMWS/WebServices/DataObjectOperationsByName?WSDL
  1. Create the web service proxy in application.
  2. Right click on Model  project of BAMwebservice


  1. From New Gallery from Categories   select Web Services   and from Items select   web service Proxy   and click OK.  


  1. Create Web Service Proxy wizard will be open click Next.
  2. Select JAX-WS Style from select client style and click Next.


  1. Past WSDL Document URL and lick Next.

  1. Click next from specify default mapping options.

  1. Click next from End points.

  1. Select Generate asynchronous methods where specified by JAX-WS binding and click Next.
  1. Click Next from Policy.

  1. Click Next from Defined Handlers.

  1. Click Finish to complete Create Web Service Proxy   Wizard.


  

  1. Once you web service proxy is created, you see it in the Application Navigator under the Application Sources folder in your project



Using the DataObjectDefinition Web Service


The DataObjectDefinition web service allows a web service client to create, update, delete, and get data object definitions.
The following operations are supported by DataObjectDefinition web service.
  • Create creates a data object.
  • Delete removes a data object from the server.
  • Get returns the definition of an existing data object.
  • Update changes the definition of a data object
The request and response messages vary depending on the operation used.

How to Use the DataObjectDefinition Web Service


  1. To use the DataObjectDefinition web service you create a web service proxy in your application in Oracle JDeveloper.

  1. The WSDL file for the DataObjectDefinition web service is available at the following URL on the system where Oracle BAM web services are installed.

http://localhost:9001/OracleBAMWS/WebServices/DataObjectDefinition?WSDL



  1. When the web service proxy is created, you see it in the Application Navigator under the Application Sources folder in your project


Using the ManualRuleFire Web Service

The ManualRuleFire web service allows users to launch rules in the Oracle BAM Server. FireRuleByName is the available operation.

How to Use the ManualRuleFire Web Service


  1. To use the ManualRuleFire web service, you create a web service proxy in your application in Oracle JDeveloper.

  1. The WSDL file for the ManualRuleFire web service is available at the following URL on the system where Oracle BAM web services are installed.
 http://localhost:9001/OracleBAMWS/WebServices/ManualRuleFire?WSDL
  1. When the web service proxy is created, you see it in the Application Navigator under the Application Sources folder in your project.
  

Using the ICommand Web Service

ICommand is available as a web service for application developers who want to interact with ICommand features over HTTP.
The ICommand web service includes most of the same features as the command-line utility. For example, you can use it to:
  • Delete a data object
  • Import rows into a data object
  • Export a report
The key differences revolve around the fact that the web service cannot access files on the remote system. Therefore, you cannot pass in a file name when using the import command or the export command.
Instead, you must pass in the import content inline. Similarly, you receive the export content inline.
Commands other than import and export generally work the same as with the command-line utility.

How to Use the ICommand Web Service


The WSDL file for the ICommand web service is available on the system where Report Server has been installed. It is available at the following URL:

http://localhost:9001/OracleBAMWS/WebServices/ICommand?WSDL

Sunday, June 23, 2013

Integrating Oracle BAM with External Data Source

           An External Data Source (EDS) is a connection to an external database. An EDS usually contains data that does not change very much or data that is too large to bring into the Oracle BAM Active Data Cache (ADC).


The EDS definition in Oracle BAM acts as a pointer to the external data. For example, looking up the customer name based on a customer code in a customer management system. The customer name-code mapping is fairly static so that bringing that external data into Oracle BAM is not required.
EDS definitions can be exported and imported using ICommand, but you cannot import or edit the contents using ICommand or Oracle BAM Architect.
Passwords are entered in clear text. You cannot use DSNs (data source names).
To view the existing EDS:
In this I have used some example table from my local database.You can any sample table from you are database.
  • Select External Data Sources from the Oracle BAM Architect function list.

Creating External Data Sources

Oracle BAM external data sources are created, edited, and deleted using Oracle BAM Architect.
  1. Open OracleBAM console  using  IE(Internet explorer) ,example http://localhost:9001/oracleBAM
  2. Enter Credentials of Oracle BAM Server
User name as webloigc (or match with your server configuration)
Password as welcome1 (or match with your server configuration)


  1. After successfully logged in below BAM server start page.


 
  1. Click on  Architect  button from OracleBAM server Start page, it navigates to  Architect home page.


 
  1. Select External Data Sources from the Oracle BAM Architect function list.




  1. Click Create for creating External Data Source.


  1. It will show the Creating new External Data Source of type JDBC, Enter a name and a description for the EDS.


Note: Here creating EDS from use case of PO processing application, so take CreditCardInfo database table from soademo schema.  




  • EDS Name as: BAM_PO_CCINFO_EDS
  • Write some description (optional)
  • Driver: leave as default. (Oracle.jdbc.driver.OracleDriver for Oracle)
  • Enter database user credentials in the Login and Password fields, here soademo/soademo for CreditCardInfo table.
  • Enter Connection string/URL, (jdbc:oracle:thin:@localhost:1521:XE)


  1. Once you fill all the details of EDS click on test for EDS. If it successful you will get below popup.




  1. Click ok to confirm, then click Create button to create EDS and Click Continue to confirm.   




  1. Once creating of EDS is completed the page should like been displayed.     


  1. You can edit, delete or test EDS using Edit, Delete link.


Create a Data Object using the EDS

Creating a Data Object using out of EDS (which you created previously BAM_PO_CCINFO_EDS)


  1. Select Data Objects from the Oracle BAM Architect function list.




  1. Click Create Data Object.




  1. Once click on create Data Object you will be able to see fallowing page to creating Data object.


  1. Enter CreditCardInfo in the Name for new Data Object field.


  1. Leave the slash (/) in the Location for new Data Object field.
The data object appears in the top level Data Objects folder.


  1. Leave the Tip text field blank.


  1. Enter “Oracle Database Sample CreditCardInfo Table” in the Description field.


  1. Select the External Data Source checkbox.


  1. Select BAM_PO_CCINFO_EDS from the External Data Source list.


  1. Select CREDITCARDINFO in the External Table Name field.


  1. Fields in Data Objects: click on Add all  fields link to add all fields from the table
You can add or remove Fields using Add a field and remove links.


  1. One you added all the fields the Data Object will looking like as below.


   Keep default settings for field attributes.


  1. Click Create Data Object.


  1. Click Continue.




  1. Click Contents to view the contents of the data object.




  1. Once you click on Contents it will show data from EDS.