Wednesday 31 October 2018

Create and Activate Agent in Oracle Integration Cloud

In this blog we are going to learn how to create and activate an Agent in Oracle Integration Cloud (OIC).

Login to Oracle Cloud home page and navigate to Integration ==> Designer ==> Agents.


Click on "Create Agent Group" to create a new Agent.


Provide Agent Group Name, Identifier and Description as below. Click Ok.



Select the Agent which we created and download the connectivity agent zip file to your machine.


Unzip the file and check for connectivityagent.jar file as shown below.

Execute the below command in command prompt to activate connectivity agent.

java -jar connectivityagent.jar

Provide OIC username and password to activate agent.
Once the agent changed to running state, we can check the status OIC console as below.


To connect OIC to on-premise environment, we need to execute this connectivityagent.jar file in on-premise environment and make the agent activate.

Once Connectivityagent is active, we can integrate on-premise application to OIC like Database, File, FTP etc..

Cheers...

Thursday 22 September 2016

Data Masking Using XSLT

Requirement :

I have a requirement for data masking as we receive request data like 2.1, 32.2 and response should be in decimal (4.2) like 0002.10, 0032.20.

Solution :

We have masking function in XSLT But as per the above requirement we have function format-number (). 

Syntax :

format-number ($RequestXpath, '0000.00' )


 <processResponse>
         <result>
            <xsl:value-of select="format-number (/process/input, &quot;0000.0&quot; )"/>
         </result>

   </processResponse>

Request :

<process>
   <input>2.1</input>
</process>

Response :

<processResponse>
   <result>0002.10</result>
</processResponse>

Thanks!! 

Thursday 30 June 2016

UNSUPPORTED_CLIENT: TLS 1.0 has been disabled in this organization

In this post, i am going to explain about an issue and solution which i faced while integrating salesforce in SOA 12c.

Issue :

To integrate salesforce in SOA 12c, we need to configure Salesforce adapter which required credentials like username, password & security token. But i am not able to get the metadata of salesforce and got an error like UNSUPPORTED_CLIENT:


Solution :

The problem for this issue is salesforce has disabled TLS 1.0 version in their organization. So it will support for TLS 1.1 or higher version. we have to update the TLS security level to TLS 1.1 or higher version in 12c Jdeveloper and weblogic.

Add below property in jdev.conf for get access for salesforce integration in Jdeveloper 12c.

AddVMOption -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2

Add the same property in setDomainEnv.cmd file to get access for salesforce integration in weblogic 12c.

Restart Jdeveloper and SOA server.

Thanks !!


Thursday 31 March 2016

File Transfer Based On File Size in SOA 11g



This project is used to transfer large number of files from source directory to destination directory with their same name and format of the files and based upon their file size.

Steps to create the composite are as follows:
1. Create three File adapters. One for read operation and remaining two for Write operation.
2. Configure these File adapters with proper File path location.
3. While Configuring File adapters make sure to check the Native format Translation is not required (Schema is opaque).
When that is checked, Any file(.txt,.xm,.csv) can be passed between directories.




4. Create a BPEL component with Define Service later template and connect the File adapters to BPEL.




5. Double click on BPEL process. Drag and drop receive activity and create instance with proper names for the input and output variables in receive activity.
6. Create a two more variables with string data type and name it as FileName_Variable and  FileSize_Variable.
7. Double click on receive activity and go to properties.
8. Add these variables as the adapter property values for jca.file.filename and jca.file.size.


9. After receive activity, Drag and drop switch activity and configure the switch with scenario like
If the file size is equal or more than 2000 bytes then, the file should transfer to one location.
Otherwise the file should transfer to another location.
10. Drag and drop the invoke activity for both the scenarios and invoke the file adapters to write the files.
11. Drag and drop the assign activity for both the scenarios and map the opaque elements from receive  output variable to file adapter input variables.




12. Double click on invoke activity and go to properties then, add the FileName_Variable variable as the  value for the jca.file.name property name and click on apply button.



13. Deploy and test it by moving some files into file reader path location.

Thank you.. !! 

Wednesday 23 December 2015

Creating Reports in BAM 12C

Please follow below steps to configure and integrating with oracle BAM 12c:

1. We need to create a simple data object in BAM with column name and datatype as shown below.  
     

2. In BAM 12c, the integration process was changed and one of the process by using a Topic/queue we can integrate BAM data object. For this process, we need to configure Enterprise Message Source (EMS) in BAM console.

Below screen shots shows the step wise indications.


3. Step to create EMS 

·         Create a SalesOrder EMS.
·         Configure EMS with a Topic/Queue.
·         Configure TargetNamespace of XSD schema of a Topic/Queue in XML Message Formatting        session.
·         Configure Dataobject and select “Insert” operation.
·         Configure element names of XSD and Dataobject.
·         Click on Start button.

 4. We can see Green light shows that EMS is started to poll the data from a Topic/Queue to BAM DataObject.




5. We need to create a SOA project to send data to JMS Topic/Queue and below screen shot shows the operation of JMS Adapter.


6. Configure the JMS adapter with a Topic/Queue details shown below.


7. Configure the SalesOrder.xsd file in JMS adapter.


8. Start SOA project to send data to JMS Topic/Queue which initiate to send data from JMS Topic/Queue to BAM Dataobject shown below.


9. Create project in Oracle BAM console and add SalesOrder Dataobject to BAM project. 


10. Create Business Queries and select SalesOrder Dataobject.
11. Check required field in X-axis and Y-axis to show the result in graphical view and Click on SAVE.


12. Create a Business View and Select SalesOrder Business Query as shown below.
 If we need an auto refresh option, click on Runtime-Interaction.


13. Check below options and provide the interval frequency value.
Click on Apply and Close.


14. Create a Dashboard and drag and drop SalesOrder from project view to dashboard.
Click On SAVE.

15. Go to Home and Click on Open Project.


16. Select OracleBAM project as shown below.

17. We can see SalesOrder dashboard in OracleBAM project and Click on SalesOrder dashboard.


18. We can see the graphical view of SalesOrder dashboards in new tab.


 19. SalesOrder dashboard will refresh automatically as per the frequency interval we mentioned.

Thank you.. !!

Monday 23 November 2015

String To Time Stamp Conversion using XSLT


            This post shows about String To Time Stamp Conversion using XSLT /Transformation in BPEL process which i have done in my real time experience.
     
            The requirement looks like we are getting time as a string from source and we need to convert to time stamp (hh:mm:ss). for example, from source the value will be "102530" and the response should be "10:25:30". This can be done by using substring() function. But after 12:00 AM, the request value will be like "30" or "525" and response should be like "00:00:30" or "00:05:25".

            In order to get this type of response i wrote a logic in XSLT as below.

XSLT code :

<xsl:variable name="StringToTime">
      <xsl:choose>
        <xsl:when test="/ns0:process/ns0:input">
          <xsl:variable name="Temp">
            <xsl:value-of select="substring(concat('000000', /ns0:process/ns0:input), string-length(/ns0:process/ns0:input)+1)"/>
          </xsl:variable>
          <xsl:value-of select="concat(substring($Temp,1,2),':',substring($Temp,3,2),':',substring($Temp,5,2))"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="/ns0:process/ns0:input"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>


Request :

<?xml version="1.0" encoding="UTF-8" ?>
<process xmlns="http://xmlns.oracle.com/DemoApplication/StringtoTimeConversion/BPELProcess">
   <input>525</input>
</process>

Response :

<?xml version = '1.0' encoding = 'UTF-8'?>
<ns0:processResponse xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:ns0="http://xmlns.oracle.com/DemoApplication/StringtoTimeConversion/BPELProcess">
   <ns0:result>00:5:25</ns0:result>
</ns0:processResponse>


Thanks!!

Friday 10 July 2015


Coherence Adapter in SOA 12c


Coherence adapter is one of the new features in Oracle SOA 12c. Coherence cache is act like a store where we can put database data and made it available for different application, Coherence cache serves as intermediary between database and client application.
The operations that we can perform using coherence adapter are:
  1. Put
  2. Get
  3. Remove
  4. Query

In this post, I am going to explain how to configure coherence adapter in oracle soa 12c for Put and Get operations. I have create a database table contains header details and this sample need to fetch the header details from database table by passing some parameter value. In this process, we will implement coherence adapter with Get and Put operations. Get operation is used fetch the values that are available in coherence and Put operation is to insert values into coherence if the values are not available.  
Firstly, drag and drop a BPEL process and configure it with one way template and default request schema.
XSD schema for this sample is shown below.







Overview of the project looks like below.

Next, Drag a DB adapter and configure it with proper database details.


Check with Select operation type and complete the configuration with table selection.

Add a parameter for the query to fetch the values based on parameter value as show below.


Next, drag the Coherence Adapter to configuration with Get operation.
Give the coherence connection JNDI name as per below and click on Next.



Check the Get operation and click on Next.


We use the default catch name as “adapter-local” for this sample.
Key value is “input”. This is the request schema element name and click on Next.


Choose the schema QueryHeaderInfo_table.xsd, which is generated from DB adapter table and click on Next.

Click Finish.





Next, drag the Coherence Adapter to configuration with Get operation.
Give the coherence connection JNDI name as per below and click on Next.




Check the Put operation and click on Next.


We use the default catch name as “adapter-local” for this sample.
Key value is “input”. This is the request schema element name and click on Next.


Choose the schema QueryHeaderInfo_table.xsd, which is generated from DB adapter table and click on Next.


Click Finish.


Overview of the BPEL is show below.

Drag an invoke activity to integrate with Query Coherence adapter to get the header details from coherence catch.
Add assign activity to map parameter value to get operation coherence adapter as shown below.

Add a property jca.coherence.Key with value from $inputVaiable in invoke activity.


Drag IF condition after invoke activity to verify the values for the parameter are available on not in coherence catch.
By using below count condition for coherence adapter response, we can verify.

If we get values, then flow will exit with empty activity and if we don’t have any values in coherence cache, we can continue the flow in else condition as show below.

Invoke DB adapter to get the values from database by mapping request value to parameter using assign activity as shown below.

Drag another invoke to integrate Put Coherence Adapter and add the property jca.coherence.Key with value form $inputvariable.

Deploy the project and test it.
First time testing with above value.

                                


Second time testing with same value.
                                   


Good Luck  JJ