Wednesday, August 10, 2022

#923 OCI Process Automation - Connectors

 Introduction


Connectors connect OPA to the outside world e.g. your enterprise systems of record. Going back to our simple order process, the business owner has now asked me to implement the following - store new customers in Netsuite. Remember, my order payload is as follows - 

{
   "customerName" : "Commiskey Antiques Ltd",
   "country":"Ireland",
   "orderNr":"1",
   "product":"iBike"
   "unitPrice":4899,
   "quantity":10
}  

My Netsuite Integration 


Should be easy enough, considering I have OIC and it's rich set of adapters at my disposal. By the way, the following screenshots are from the recently released Oracle Integration 3, just in case you're asking. I will create a separate set of posts on Oracle Integration 3, so watch this space.  

Here is the integration - it firstly checks whether the customer already exists in Netsuite - if not, it creates the customer - see Otherwise path in the Switch below - 







Here is the expanded SWITCH - 


Simple enough! I test this in Oracle Integration 3 - 



I now test with a new customer - 



I now execute the api from Postman - 



Perfect! now back to OPA - 

Creating a Connector in OPA





Note, my OIC endpoint url is - https://myOIC3/ic/api/integration/v1/flows/rest/AA_CREATECUSTOMERFR/1.0/cust

In defining the Connector, I set the base url to - i.e. minus the /cust
  e.g. https://myOIC3/ic/api/integration/v1/flows/rest/AA_CREATECUSTOMERFR/1.0  


Now to defining a resource and the create operation -












As you can see in the above screenshot, I have add /cust as the path. Next step is to define the request and response payloads -


I copy and paste from the OIC Endpoint definition -




Now to setting the Security Type





The connector is now fully configured, let's use it!



I drag and drop onto the canvas - 






I Activate and Test -




I open the process audit trail and check the input/output for the Connector invoke - 

I check out the instance in Oracle Integration 3 -

Let's check out Netsuite - 








No comments:

Post a Comment