October 7, 2020

Configure OTM connection in OIC


In this blog I have described the steps to configure the OTM connection in OIC.


Steps Overview : -

STEP 1 : Configure OTM Connection 
STEP 2 : Upload OTM SSL Certificates into oracle integration cloud instance.


Knowledge :👀
Certificates are used to validate outbound SSL connections.A certificate enables Oracle Integration to connect with external services.If the external endpoint requires a specific certificate, request the certificate and then upload it into oracle integration.




Steps in detail : 

STEP 1: Steps to Configure OTM Connection: 


  • Go to Connection Tab and create New Connection

  • Search for LOGISTICS adapter and select it

  • Give connection a meaningful name and click create

  • Fill the below details :
    • *WSDL URL : Enter the OTM Transmission Service WSDL URL or you can upload its WSDL file also.
    • SECURITY : Enter the OTM user credentials. Make sure the user has the required roles assigned. Otherwise you may receive Authentication Error.

  • Click Save and Test the connection. Your OTM connection configuration completed.


STEP 2: Steps to upload SSL certificate:

  • In the left navigation pane, click Home > Settings >Certificates



  • Click Upload at the top of the page
  • Enter an alias name and optional description
  • In the Type field, select the certificate type = X.509 (SSL transport) and Category = TRUST




Knowledge :👀
X.509 (SSL transport ) - Select a certificate category :

Trust: Use this option to upload a trust certificate. Click Browse, then select the trust file(example - .cer or .crt) to upload.

Identity: Use this option to upload a certificate for two -way SSL communication.
1. Click Browse, then select the keystone file (.jks) to upload.
2. Enter the comma-separated list of passwords corresponding to key aliases.
3. Enter the password of the keystore being imported.


October 6, 2020

Send attachment in OIC notification


In this post I have explained how to send Attachments along with notification's body in OIC Notification action.

Knowledge :👀
The total size limit on a notification email is 1 MB for Oracle Integration and 2 MB for Oracle Integration Generation 2.


Steps overview to send attachment in OIC notification action  :

  • Open the Notification action and click on Plus  icon "+" to add attachments. 
  • Select the Attachments ( 'Reference' )to add.You can edit or delete the attachment once added. Click save and close.That's it. Your configuration for sending attachment in email notification completed.

 [You can take reference from below image:- Fig -1, Fig -2, Fig-3]



Info 👉  File Reference are of different types.For example, in the below image the  integration includes three file reference attachments (highlighted in yellow) that are available for selection. You can select one or all as attachments.

  • An attachment from a REST Adapter connection
  • A file reference from a stage file write operation ⃕this case scenario I have covered in below hands-on practice.
  • A file reference from an FTP Adapter download operation






#Hand-On Practice : 


Use Case : Lets develop one simple APP DRIVEN ORCHESTRATION integration which can take some JSON inputs and that inputs will get send as an attachment in email notification in XML format.


Top view of integration which we are going to develop :



Lets see the steps in detail :

Step 1 : Crate one APP DRIVEN ORCHESTRATION by giving Integration a meaningful name. 

Select any REST Trigger connection and configure the adapter as shown below -



  • Enter a meaningful name and then click Next



  • Give a meaningful endpoint's Resource URI (I have given /employeeDetail), Select Action = POST, Select REQUEST , RESPONSE options to configure. Click Next
          [You can take reference from below image]



  • Configure the Request Sample JSON Payload window by entering below JSON and then click Ok.Click Next
{
  "Employee" : {
    "EmployeeDetail" : [ {
      "Name" : "Amit",
      "Id" : "01"
    }, {
      "Name" : "Rohit",
      "Id" : "02"
    } ]
  }
}


  • Configure the Response Sample JSON Payload window by entering below JSON and then click Ok.Click Next
{
"Message" : "Success"
}


  • REST adapter configuration completed.Click Done.


STEP 2 : Now add Stage File Action and configure the adapter as shown below 


  • Enter a meaningful name , click Next


  • Configure the Stage File Action parameters window as given below :
    • *Choose Stage File Operation : Write File
    • *Specify File Name : enter any meaningful name (I have given "Employee.xml")
    • *Specify Output Directory : enter any meaning directory path (I have given "/EmployeeDetail")

  • In this window select XML Schema (XSD) Document.Click Next


  • Download the below schema file and choose the same file 


  • Stage File Action configuration completed. Click Done.

  • Open the mapper to map the value


  • Do the one to one mapping as shown in below image. Make sure to add For Each in mapper.Click Validate and close the mapper.




STEP 3 : Add Notification Action in the flow and configure it as shown in below steps


  • Enter the basic details -- *FROM, *TO EMAIL ids, *Subject , *Body and then click "+" icon of attachments 
Knowledge :👀
You can configure the approval email address to use in the FROM field on the notifications page that is accessible from Settings → Notifications.




  • Drag and drop the *FileReference element inside the expression box. Click Validate and Close.


  • Again click Validate and Close.


STEP 4 : Edit the response mapper of integration and just hardcode "Success" message as a final integration response.

[as shown in below image]

  • Click Validate and close.



STEP 5 : Enable Tracking for the integration



  • Click Save and Close the integration . Integration is ready to TEST.



UNIT TESTING : - 

  • Activate the Integration

  • Click RUN icon (as shown in below image)

  • Pass the below JSON as Input Payload and then Click TEST
{
  "Employee" : {
    "EmployeeDetail" : [ {
      "Name" : "Ramlal",
      "Id" : "01"
    }, {
      "Name" : "ShyamLal",
      "Id" : "02"
    },{
      "Name":"Ramabai",
      "Id":"03"
    } ]
  }
}


  • You can see "Success" response in downward response window.
  • Now check your email. You have received one email notification with payload as shown below :
    • Email Notification along with attachment


    • Attachment payload with the data which we have sent as input



Thank you :)


September 21, 2020

Replace Existing Connection with New Connection in OIC Integration

 

New update in OIC allow us to replace any connection used in an integration with another connection of same Type and Role. Earlier if you want to replace any existing connection of an integration for that you had to delete the existing connection and then configure a new connection in place of that .This action affect the downstream flow and you had to reconfigure most of the thing. It was totally a REWORK.


Knowledge :  👀 
Connection ? :  A connection is based on an adapter. For example, to create a connection to a specific RightNow Cloud application instance, you must select the Oracle RightNow and then specify the WSDL URL, security Policy and security to connect to it.


How this new update can help you ? 

One case scenario - suppose you want to change the connection name of a connection that you have used in your integration. You can achieve this using this new feature ' #Replace '. Just replace the older connection with new connection having new name. It will not affect your downstream flow. NO REWORK:)



Steps Overview to replace older connection with new connection from an Integration :

  • Deactivate the integration.
  • Click on Actions(hamburger sign) and then click Configure.


  • Replace the connection with new connection. Make sure that new connection is of same Role and Type as existing. For Ex- If your older connection was REST Type and Role is TRIGGER then it will get replace by REST TRIGGER only. 

  • Done. Click save and close. Your connection replaced with new connection. Activate and test the integration.





#Hands-on Practice :


Lets do one end to end hands-on practice by replacing one connection name from one integration that was already developed in one previous blog.



Step 1 : Follow this blog and develop the 'SAMPLE ECHO INTEGRATION'.



Step 2 : Once you develop the integration, save and close. Click on Actions(Hamburger Sign) and then click Configure.






Step 3 : click 'REPLACE' icon, as shown in below image.



Step 4 : Replace it with new connection having new name. In this case I am replacing my existing REST TRIGGER connection named-'Sample REST Endpoint' with new connection name as 'REST_Conn' of same Role:REST and Type: Trigger.


  • Connection replaced with new connection having new name.

Step 5 : click save and then click on arrow sign to exit configuration window.



Step 6 : Connection replaced successfully. Now you can activate and test the integration. You can access this blog for testing.





Thank You :)