Tuesday, 15 July 2014

Fetch Number Of SOA Process Instances and Current State On Server

Execute the below query which fetch the number of process instances on the server and their current state.

SELECT 
decode (state,
         0 , 'Initiated',
         1 , 'Open and Running',
         2 , 'Open and Suspended',
         3 , 'Open and Faulted',
         4 , 'Closed and Pending',
         5 , 'Closed and Completed',
         6 , 'Closed and Faulted',
         7 , 'Closed and Cancelled',
         8 , 'Closed and Aborted',
         9 , 'Closed and Stale',
         'Unknown') "Process State",
COUNT (*) "Number Of Processes"
FROM dev_soainfra.cube_instance
WHERE creation_date < sysdate  AND creation_date > (sysdate-100)
GROUP BY state;

Output :











Happy Coding :)

Monday, 14 July 2014

Multiple End Point URI Set On partner Link

We can use endPointURI proporty to set multiple end points for a partner link. In case of any fail over of a uri it will invoke the other one. If all the endPOintURIs fail then default uri which is mentioned with wsdlLocation in the Reference tag will invoke.

For Example : 

Create a synchronous BPEL process and deploy it with 3 different versions which have return different output messages. Create another synchronous bpel process to test the multiple endpointURI. In the composite of this process create a partner link and set it with a BPEL process rev1.0. Go to source mode and add multiple endpointURI proporties in the reference tag. Follwo the below code snipet.

 <reference name="invkHelloworld"
             ui:wsdlLocation="http://localhost:8001/soa-infra/services/TESTING/HelloWorld!1.0/BPELProcess1.wsdl">
    <interface.wsdl         interface="http://xmlns.oracle.com/SOADemo/HelloWorld/BPELProcess1#wsdl.interface(BPELProcess1)"/>
    <binding.ws port="http://xmlns.oracle.com/SOADemo/HelloWorld/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)"
                location="http://localhoste:8001/soa-infra/services/TESTING/HelloWorld!1.0/bpelprocess1_client_ep?WSDL"
                soapVersion="1.1">
      <property name="endpointURI"> http://localhost:8001/soa-infra/services/TESTING/HelloWorld!2.0/bpelprocess1_client_ep?WSDL </property>
      <property name="endpointURI">http://localhost:8001/soa-infra/services/TESTING/HelloWorld!3.0/bpelprocess1_client_ep?WSDL</property>
      <property name="weblogic.wsee.wsat.transaction.flowOption"
                type="xs:string" many="false">WSDLDriven</property>
    </binding.ws>
  </reference>

Deploy and test the code. Check the following outputs

  • It will invoke the HelloWorld rev 3.0 by default if all the services are up.
  • If HelloWorld rev 3.0 is down then it invokes previous end point uri.
  • If all the end points are dow then it invokes default uri which is mentioned in location tag of <binding.ws>


Happy Coding :)



Wednesday, 9 July 2014

Create BAM Data Object Depending External DataBase Table

We can create a BAM Data Object bsed on a Data base Table structure. This data Object has all the data which are persist in the underlying data base table. We can link this table to BAM Data object through External Data Sources.

Follow the below steps

  • Login the BAM home -- Architect tab
  • Choose External Data Sources from the pop list top left corner. Click on Create link.












  • Give name, user, pasword, connection string of the Data source.


















  • Now create a BAM Data Object. On the screen choose the External Data Object check box.
  • Then choose the above created data source. It will populate all the tables present in the corresponding data base schema.
  • Choose the underlying table.

























  • Now add fields to the data Object one by one or we can also add all the fields at a time(it creates these field by mapping corresponding table columns).
  • Now click on Create Data Object.















  • Now Click on the created BAM Data Object and click on the contents link. It has all the values of the underlying table. Any data manipulation on the undelying table has also change the value of this BAM Data object automatically.












Also Check :



Give your comments on this post. Happy Coding :)
                    

BAM Adapter To Insert Values In BAM Data Object

Follow the below steps to populate values in a BAM Object from a BPEL process using BAM Adapter.


  • Create an One-way BPEL Process.
  • Drag a BAM adapter in the reference section in the BPEL Process.









  • Go through the BAM adapter wizard. Create a BAM server connection, Select the Data Object and  Operation type.





















  • We can do four type of operations i.e. insert, update, delete and upsert using a BAM adapter.











  • Invoke that BAM adapter partnerlink using an invoke activity and pass the values from input to the invoke activity variable.
















  • Deploy the process and test.
Input : 



BAM Data Object :

Go to BAM Architect -- Select Data Object -- Contents




















Check Also : Create BAM Data Object

Give your comments on this post. Happy Coding :)

Monday, 7 July 2014

Dynamic PartenerLink In BPEL Process

We can dynamically configure the WSDL on the partner link in BPEL process. Follow the below example.

Requirement: Depending upon input value of a BPEL process, will invoke a web service through the same partner link.

Note: For dynamic partner link all the invoking services should have same input message structure.
  • Create a Synchronous BPEL process TestProcess and deploy it with two different revision numbers, so that three WSDL will generate. The output of the BPEL process is as mentioned below.
    • TestProcess  rev1.0 : input String + process1
    • TestProcess  rev2.0 : input String + process1
  • Create another synch BPEL process CallTestProcess to invoke Testprocess depending upon input value i.e. if input value is 
    • process1 : invoke TestProcess  rev1.0
    • process2 : invoke TestProcess  rev2.0
  • Create a reference partnerlink in the CallTestProcess and configure it with the  TestProcess  rev1.0 process.
  • Create a variable of element type of WS-Addressing.xsd EndPointReference element which resides in the MDS shared repository.




































  • In BPEL take a switch activity and put condition as if the input string is process2 then assign the TestProcess  rev2.0 WSDLto the above created variable.









  • Assign the variable to the corresponding partner link in the assign activity copy rule.








  •  Now deploy the service and test. If you give process2 as input it will invoke the TestProcess  rev2.0 otherwise it will invoke TestProcess  rev1.0 process.


Give your comment on this post. Happy Coding :)


Create Oracle BAM DataObject

Business Activity Monitoring (BAM) is a SOA component used to monitor the SOA processes. Using BAM we can create various type of monitoring reports and  alerts to take a corresponding action such as sending a mail notification etc. .

In the BAM home we have the following artifacts.











  • Active Viewer: It is a graphical user interface used to view the reports.
  • Active Studio: It is used to create Reports, edit reports, share reports etc.
  • Architect: It is used to manage Data Objects.
  • Administrator: It is used for the user management of BAM.
BAM Data Object:  It is a table which contains the raw data for monitoring purpose.It has a combination of fields, lookup values and calculated fields. We can populate values to a BAM Object directly on BAM Architech, using a BAM Adapter in BPEL or creating the BAM Object based on an existing database table.

Below are the steps to create a BAM Data Object.
  • Click on Architect on the BAM Home screen.
  • Click on the Create Data Object link.
















  • Enter the name of the data object and fields as shown below.



















  • After the data object creation we can insert contents, give permissions, rename or move to a different directory and delete the object.



Check Also : BAM Adapter To Manipulate Data Object From BPEL Process

Give your comments on this post. Happy Coding :)