January 25, 2020

Development of integration using OIC Agent

Overview :

In the previous blog we have learned basics about OIC Connectivity Agent and the steps to install it in a local machine (personal laptop)

Now in this blog we will create an integration to insert records into a database using the installed connectivity Agent.



*Make sure your system is connected with open network.


Prerequisite :

  • Oracle database 11g XE(Express Edition)software. Access this blog to download the software and to know the steps to configure it in a local machine (your personal laptop).
  • Configure OIC connectivity Agent. ( You can Access this blog to configure it. )


High-Level development Steps :
  1. Create a connection to connect with oracle database.
  2. Create a scheduled integration.
  3. select the above database connection and configured it by selecting the operation name and table name.
  4. Hardcode one message which you want to insert in database.
  5. Run the integration & submit it.
  6. Open the SQL developer & verify the record get inserted into the database.


Let's see the steps in detail:

Create Connection :

STEP 1: 
Select Oracle Database Adapter in create connection panel.


Enter Connection Name & click Ok.


Now configure the connection properties by adding local database connection details which we configured in the previous blog.

                                *Host : localhost
                  *Port : 1522
                   SID  : xe
Click Ok.


Now add the local database credentials and then click Ok.

                           *Username : SYSTEM
                *Password : enter the local database password 
                 



Select Agent Group which we have configured in previous blog.


Click Save , Test and Close.


Connection is ready to use.


     

Create Integration : 

STEP 1:
Create new Schedule Integration having meaningful name and description. 



STEP 2:
Select the database connection which we have configured above.



select table "TEST_AGENT" which we have created in previous blog            

Click Import Tables


Select & declare primary key. Click Ok


Click Next.
Click Done.


STEP 3:
Click to Edit the mapper 


Right Click 'message' tag and click "Create Target Node"



Hard code any message (ex: "Agent007") & then click Validate and Close.



STEP 4:
Enable the Tracker 






STEP 5:
Save and Close the Integration.




 Activate integration and Submit it. 


STEP 6:
Open SQL developer and run the select query , you can see the message get inserted into your localhost database successfully.



Done.

Download Oracle Database 11g XE (Express Edition)


Basics about Oracle Database 11g XE (Express Edition) :

Free Oracle Database for Everyone
Whether you are a developer, a DBA, a data scientist, an educator, or just curious about databases, Oracle Database 18c Express Edition (XE) is the ideal way to get started. It is the same powerful Oracle Database that enterprises rely on worldwide, packaged for simple download, ease-of-use, and a full-featured experience. You get an Oracle Database to use in any environment, plus the ability to embed and redistribute – all completely free!


Steps to download and configure database in localhost (personal laptop) :

  • Download the Oracle database Xe 11g software by clicking on below link

                   Download Oracle Database XE 11g


  • Unzip the file and run setup.exe


  •  Click Next 


  •  Accept the license agreement and click Next


  • Make sure the destination folder is in ' C ' drive. Click Next


  • Configure the password for the database. Save this password because you need it to connect with databse.


  • Save the summary . This is the connection details to connect with the databse. We will use this to configuration details inSQL developer tool to connect with this database.



  •  Database installation is successful. Now the database is ready to use.



  • Mostly database get started automatically after installation. But as this is the first time let's start the database manually. 
      Search for the Oracle Database 11g XE and click on Start Database.







Now open SQL Developer tool to connect the above configured database.

(If you don't have SQL developer tool , you can download it from internet.)


  •  Open SQL Developer and create a new connection by clicking '+' icon 




             Enter below details :

             Connection Name : write any meaningful name
        Username : SYSTEM
        Password : enter the password which you created while
                   configuring oracle database in system.


        Hostname : localhost
        Port     : 1522 (or 1511)
        Host     : xe
   

            Click Save & then Test. If it's Status : Success, click to Connect


            Now create a Table name "test_agent" 

            SQL Query : CREATE TABLE test_agent(message VARCHAR2(20)); 






Now follow the Next blog to create an integration using the above database.








January 3, 2020

OIC Connectivity Agent Installation Steps


Knowledge :  👀 

Basics About OIC Connectivity Agent ?: 

The on-premises connectivity agent enables you to create integrations and exchange messages between on-premises applications and Oracle Integration Cloud Service. 
For example, sending requests from a cloud application to a on-premise database.

One case scenario describe through below diagram :


Example

OIC Connectivity Agent High-Level Installation Steps :

  1. Create an Agent Group in the OIC Console
  2. Download the Connectivity Agent zip file from the OIC Console
  3. Unzip the contents of the zip file on the on-premise agent machine
  4. Update the InstallerProfile.cfg with the details of the OIC environment and on-premise network
  5. Run the agent using java -jar connectivityagent.jar




Lets see the steps in detail :

STEP 1 : 
Login to your OIC instance and navigate to Agent by clicking on Integrations and then click Agents.





STEP 2 : Click Create Agent Group


 Enter below details and click Ok.

*Agent Group Name : write 'Test_Agent' (you can give any other meaningful name)
 Description : write meaningful description.

Note : Save the Identifier name as highlighted in above screenshot. We need this later in this blog.


STEP 3 : Agent group creation is completed.




STEP 4 : Download the Connectivity_Agent and save it on desktop of your system.


STEP 5 :Unzip the downloaded file & open InstallerProfile.cfg

Enter the below details :

oic_URL = enter your OIC instance URL in format of https://hostname:sslport 
                      (as shown in below image )

agent_GROUP_IDENTIFIER= enter the agent group identifier name which we have saved above  
(For my agent group it is TEST_AGENT)


  • Save the file and close it

STEP 7 :Set the JAVA_HOME property to the location of the JDK installation and PATH property.You can easily find on Internet the steps to set JAVA_HOME.


STEP 8 : 

  • Open CMD and open the directory where  connectivityagent.jar file is present.
  • Now run the connectivityagent.jar file by entering below command java -jar connectivityagent.jar and then press enter

  • Enter OIC username & Password and then press enter

 [*Note: Make sure your system is connected with open network(not 
    behind any firewall, you can use mobile data).

   You must have to provide proxy details of network inside

   InstallerProfile.cfg if you want agent to work inside company 
   network(behind firewall ]

  • Agent configuration is completed and your agent is UP and Running and ready to use.
           
Note : You can cross check Agent status in OIC instance by navigating to Monitoring tab and then click to Agents.



Access the next blog to develop  integration using the Agent .....


#Some Important Points about OIC Connectivity Agent :
  • Only one connectivity agent can be associated with an agent group. For a single Oracle Integration instance, you can create up to five agent groups

  • Restart the Agent  
 You can restart the on-premises connectivity agent if required by running the command java –jar connectivityagent.jar 

  • Stop the agent in either of the following ways:
  1. Enter ctrl+c on the host on which the agent is running. 
  2. Search for the connectivity agent process and kill it
Note:-
When you shut down the agent server, several minutes pass before the agent is displayed as down on the Agent Monitoring page (as indicated by a red thunderbolt)
Access the next blog to create integration using this Agent ...