' oicbasics: Development of Integration having Lookups
February 8, 2020

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)
       



- Advertisement -






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


- Advertisement -



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

   
   

- Advertisement -


           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 4 : Now Open the mapper 



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

         


          Enable the Tracking 


- Advertisement -



           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...

2 comments:

  1. Why we have used PUT operation here for Lookup while developing Integration. Can GET be used for this scenario?

    ReplyDelete
    Replies
    1. because we are triggering the integration with the input payload, that's why used HTTPS 'PUT' method

      The GET Method
      GET is used to request data from a specified resource

      The PUT Method
      PUT is used to send data to a server to create/update a resource.

      Delete

If you have any doubts, Please let me know.

Top