Thursday, 23 November 2017

Using Preferance Variables in SOA composites

Hi,

Oracle SOA suite has provided the facility to add preferences in your composite process.
These preferences are worked as variables which we can change at runtime from EM console.

Ex: We can use preference variable when we need to define which environment we are working in, preference variables for certain values which do not want to hard code, for certain usernames which are unaware for some other components while invoke our service etc.

So each time there is no need to go to our composite and change the value manually and then redeploy and test.
Instead we can define preference variables and change its values in run time from em console.

Steps to create preference variable:
1. Go to your composite.xml and under implementation.bpel define the property:


like ex2: <property name="bpel.preference.EnvName">DEV</property>

2. Go to your .bpel and use this preference variable.

Here I am mapping my output variable to num1 x  num2 which are defined as pref variables.

3. Deploy and test your multiplication service:

We are now able to see the multiplied value of num1 and num2 .

4. Now if you want to change the value of the fields then we can directly follow this path:

Right click on SOA-Infra –> Administration –> System MBean Browser


under System Mbean Browser follow the below navigation:

oracle.soa.config–>soa_server -->SCAComposite–>(yourCompositeName) ->
SCAcomponent.SCAComposite

This opens up a table, in that

Click on the properties tab and expand properties tab to find out element that contains your defined preference variable.

Here we can change the value field to any.

So after changing its value and click “Apply”.


So thats all! 
We can now test with different inputs to defined preference variable from em.

Keep exploring SOA! :) 
Cheers - Krithika G

Monday, 20 November 2017

Converting Synchronous bpel process to asynchronous

Hi,

This is aslo little tricky, where we cannot just delete reply activity from .bpel to make it asynchronous process.

To make the developed synchronous bpel process to asynchronous we need to make changes in .bpel and .wsdl files generated.

Steps: {Marked in RED are the changes to be carried out.}

1. In .bpel File:

    a) In Partner link tag we need to add partner role

<partnerLink name="multiplicationprocess_client" partnerLinkType="client:MultiplicationProcess" myRole="MultiplicationProcessProvider" partnerRole="MultiplicationProcessRequestor"/>

    b) In Recieve tag change operation from Process to Initiate

<receive name="receiveInput" partnerLink="multiplicationprocess_client" portType="client:MultiplicationProcess" operation="Initiate" variable="inputVariable" createInstance="yes"/>

    c) In Reply activity
we have: <reply name="replyOutput" partnerLink="multiplicationprocess_client" portType="client:MultiplicationProcess" operation="process" variable="outputVariable"/>

Do the following Changes:

<Invokename="callbackClient" partnerLink="multiplicationprocess_client" portType="client:MultiplicationProcessCallback" operation="onResult" variable="outputVariable"/>

2. In .wsdl file

    a) Port type
For synchronous we have  Port type defined as below:
<wsdl:portType name="MultiplicationProcess">
<wsdl:operation name="process">
<wsdl:input  message="client:MultiplicationProcessRequestMessage" />
<wsdl:output message="client:MultiplicationProcessResponseMessage"/>
</wsdl:operation>
</wsdl:portType>

Copy paste it twice and do the required changes, and we can comment or delete the sync port typ tag defined above.

<wsdl:portType name="MultiplicationProcess">
<wsdl:operation name="Initiate">
<wsdl:input  message="client:MultiplicationProcessRequestMessage" />
<!--<wsdl:output message="client:MultiplicationProcessResponseMessage"/>-->
</wsdl:operation>

</wsdl:portType>
        <wsdl:portType name="MultiplicationProcessCallback">
<wsdl:operation name="onResult">
<wsdl:input  message="client:MultiplicationProcessRequestMessage" />
<!--<wsdl:output message="client:MultiplicationProcessResponseMessage"/>-->
</wsdl:operation>
(Delete or comment wsdl:output message)

    b) In PartnerLink
For sync we have:
<plnk:partnerLinkType name="MultiplicationProcess">
<plnk:role name="MultiplicationProcessProvider">
<plnk:portType name="client:MultiplicationProcess"/>
</plnk:role>
</plnk:partnerLinkType>

For async we need to add one more role and port type within partnerlink definition:
<plnk:partnerLinkType name="MultiplicationProcess">
<plnk:role name="MultiplicationProcessProvider">
<plnk:portType name="client:MultiplicationProcess"/>
</plnk:role>
                <plnk:role name="MultiplicationProcessRequestor">
<plnk:portType name="client:MultiplicationProcessCallback"/>
</plnk:role>
</plnk:partnerLinkType>

Thats it! now synchronous becomes Asynchronous process.

Let's explore SOA


Challenging task: Changing Soa Suite Project Name and Composite name after deployment

Hi All,

Had faced this difficulty to change Project name after the composite is deployed in server.

Below are the steps to do it in ease:

1. On Jdev select your project then click on the upper menu File -> Rename
2. On the Rename screen change the .jpr name on the File name field then OK
3. Now that only changes the name of the project,
4. Now you have to change the name of your composite, to do that open your composite.xml file Click on the Source tab
5. On the <composite/> tag change the name attribute to your new project name and save it
6. We will have to create a new deployment profile too, to do that right click on your project then select Project Properties -->Select Deployment -->Delete the deployment profile that has your old project name.
7. Click on the New button
8. On the Archive type select the SOA-SAR File
9. Type a name for your new profile an click OK.

That´s all!
Close the application and re open it again, we should now be able to see renamed project name and composite name!

Let's explore SOA!


Wednesday, 8 November 2017

DB Adapter - Poll for new/changed records Settings (Limit rows)

Hi,

Database adapter is used to poll/retrieve diferent kind of records from datatbase.

Consider a case:
 We are polling a table, which is rapidly updated by another process. 
 So now every polling cycle , the eligible records for the DB poller , will be huge in number.

And in cases where the data retrieved is metadeta related to some other information like Batch id or OrderId , which are used to retrieve more information , then the server will not be able to handle such amount of data, even in case it handles there will be a huge performance impact.

How to restrict this kind of behaviour ?

During configuring our DB poller, we have few performance parameteres:



  1. Database rows per XML document
  2. Database rows per Transaction 
If we want to pick only 10 rows at a time i.e., only 10 rows per one instance , then we need to give the value 10 for the property called "database rows per XML document"

This creates an xml with 10 elements and is passed through a single Oracle BPEL Process Manager instance.

Assume that there are 100 rows at the start of a polling interval and that "Database rows per Transaction" is 10. 
In standalone mode, a cursor is used to iteratively read and process 10 rows at a time until all 100 have been processed, dividing the work into 100 / 10 = 10 sequential transactional units. 

Note: "Database rows per Transaction" value must be equal or greater than "database rows per XML document"

Example:
lets say 100 records to process in DB.
"database rows per XML document" as 10
"database rows per transaction" as 20
This is how it behaves at runtime:
First the database adapter gets 20 rows from database and now 2 instances will be created with 10 records in each.

then the next 20 records will be retrieved and creates 2 instances with 10 records each....
and this process continues until all records are processed with the appropriate read value.



Hope the concept has clarity!

Let's explore SOA!
Krithika g



Tuesday, 7 November 2017

Installing Oracle SOA Suite 12c - windows 64bit system

With the new feature of 12c, we have a single

Steps:

* Downlaod Jdk 8 or above version 
  (we need to download supported JDK, you will not be able to run Oracle SOA 12c installer if        we don’t have supported JDK)

You can download latest jdk from: https://edelivery.oracle.com - serach for releases - jdk - ver 

* Save JDK in C:/Java
* Download below files from Oracle downloads: 
  • fmw_12.1.3.0.0_soa_quickstart
  • fmw_12.1.3.0.0_soa_quickstart2
* Extract 2 folders of Oracle soa suite 12c and save it in C:\12c\fmw_12.2.1.0.0_soa
* Run CMD as administrator

* We need to go to java bin folder where you have installed latest JDK in cmd
   ( C:\sys32>cd {Path of jdk\bin} )

   C:\Windows\system32>cd C:\Java\jdk1.8.0_121\bin

*Oracle SOA 12c is an executable jar file so we need to run it from command prompt in the next line, we need to provide extracted jar file name 
(C:sys32>jdk bin>java.exe -jar {path of executable jar file}\execuatble jarfile name )

C:\Java\jdk1.8.0_121\bin> java.exe -jar C:\12c\fmw_12.2.1.0.0_soa\fmw_12.2.1.0.0_
soa_quickstart.jar


With this installation takes progess:

Provide a proper path for Oracle Home

Installation takes little time once 100% click on Finish

Oracle jdeveloper Jdev12c opens up after this last step.

Thanks! keep exploring Soa! 
Krithika G



Monday, 6 November 2017

Creating file Based MDS SOA connection in JDev 12c

As we know MDS is used to store artifacts like WSDL, XSD, XSLT etc.
For example, if a two SOA application uses a common WSDL, then we simply place the file in the MDS repository
We have two types of MDS - File based MDS and DB based MDS.

In Oracle SOA 12c, when we use default server which is integrated with Jdeveloper then we can use only Design Time MDS (File Based MDS), Run Time MDS (DB Based MDS) is not supported.

Usually, File-based is used for the development environment and Database-based  is used for the production environment.

The MDS repository (File/DB) must be registered in the WL server before deploying an application that uses the MDS repository.

Steps to create File based MDS in JDev 12c:

1. Click on resource pallete to create new MDS connection
    New IDE Connections --> SOA MDS
2. Wizard opens:
    Fill in the details such as : connection Name (any)
                                               connection Type ( file based MDS)
                                               MDS root folder ( give physical local location )
3. Test the connection. Status should be 'sucess'.
4. Click 'ok' and then we can see the File based MDS created on the right side under IDE connections     tab.