February 11, 2020

Lookup integration testing

Please access the previous blog to see integration development steps.

Step 1 :  
Activate the integration and click on endpoint.



Copy the Endpoint URL.
               

Step 2 : 
Open SoapUI tool and click on REST and paste the above copied endpoint URL and click ok.


Add basic Authentication

       
Enter your OIC instance username & password for basic authentication


Select below details :

             Method : PUT
             Media Type : application/XML
           
            Paste below input XML payload inside request box :

           <?xml version="1.0" encoding="utf-8"?>
           <IntegrationRequest>
           <Input>
          <CountryCode>US</CountryCode>
          </Input>
          </IntegrationRequest>
       

Hit the RUN button. You will find "United States of America" as output.Because in Lookup table 'US' country code is mapped to "Unites States of America" as Country Name.


Similarly this time change the CountryCode value to "IS" in input XML payload and hit the RUN button. This time Output will be "ISRAEL"

February 8, 2020

Lookups in Oracle Integration Cloud

We use lookups in the integrations to create reusable tables that map the different terms used to describe the same item across your applications. Lookups are exact same as Data Value Map(DVM) in SOA.


Lets see how to define a Lookup in OIC  with an example :

Use Case :-

Inside this blog, we see will define a lookup for Country Code & Country Name. For a specific Country Code we will assign one unique Country Name.


Country_Code
Country_Name
USA
United States of America
IS
Israel


development Steps in detail :

STEP 1 : Click at Lookups present inside Designer tab and then click CREATE 


   


               Enter the below details and click CREATE :
           *Lookup Name : CountryLookup ( you can write any meaning full name)
             Description    : write small description


         
STEP 2 : Click on Domain_Name_1 and then click Edit Domain Name
              and enter the below detail and click Ok
  

              *Domain Name : Country_Code





STEP 3 : Similarly click Domain_Name_2 and then click Edit Domain Name
              and enter the below detail and click Ok

             *Domain Name Country_Name


             
STEP 4 : Now add the values in lookup table. Click the "+" icon and add the
             below values (as shown in below image)
             
             In Country_Code column write IN & in Country_Name write INDIA


            Similarly add two more values (as shown in below image )

         Country_Code  Column  : add  USA , IS
                Country_Name  Column  : add UNITED STATES of AMERICA , ISRAEL 

              After adding above two values click Save and then click Close.



STEP 5 : Your Lookups is ready to use in Integration. Please access the Next
             blog to know how to implement this Lookups in an Integration.

                     

Development of Integration having Lookups


In the previous blog we have seen how to define Lookups in OIC. In this blog we will use that defined lookups in an Integration.



STEP 1 : create a App Driven Orchestration



                 
                 Enter Below details and click Create :

            *what do you want to call your Integration : Country code to 
              Country Name (you can give any meaningful name)
       






STEP 2 : Search for the connection name RESTConnection and click on it.
              (you can access this blog to configure this REST connection)



                   Enter the below details and click NEXT (as shown in below image )
          



                  Save the below schema as Input.xsd to your desktop


<?xml version = '1.0' encoding = 'UTF-8'?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"  xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="IntegrationRequest">
  <xs:complexType>
   <xs:sequence>
      <xs:element name="Input" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="CountryCode" type="xs:string" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
   </xs:sequence>
  </xs:complexType>
</xs:element>
</xs:schema>
                                   
                                   
                                   
                 choose the above schema file at Schema Location and click NEXT       
                                   

                 Similarly save the below schema as Output.xsd

<?xml version = '1.0' encoding = 'UTF-8'?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"  xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="IntegrationResponse">
  <xs:complexType>
   <xs:sequence>
      <xs:element name="Output" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="CountryName" type="xs:string" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
   </xs:sequence>
  </xs:complexType>
</xs:element>
</xs:schema>
                                   
                                   
                                   
                 choose the above schema file at Schema Location and click NEXT         



                  Click Done



STEP 3 : Now add one Assign Activity (as shown in below image )



           Enter below details and click Create
           *Name : TempVariable


           
              Click on "+" icon to add variable 



         
               Enter Variable Name as   "vCountryCode" and click EDIT 
           (as shown in below image )



               Drag and Drop the Lookup Value function in Expression window


           Select your Lookup (CountryLookup) which was created in previous blog

     
           click Select Source Column and then select Country code

   
   
           similarly Select Target Column and click Country Name


         
           Click NEXT 



          Enter some default value and click Next


         Click Done


         Replace the SrcValue with your Input parameter (as shown in below
     image )




           Click Save and click Close.




STEP 3 : Now Open the mapper 



           Map the $vCountryCode (at source side )  to CountryName (at target
           side ). Validate the mapper & then close.

         


          Enable the Tracking 



           Map the CountryCode column & then click Save, cancel.



          Save the integration and then click Close development window.




          Integration development is completed 
          Please see the Next blog for its testing...