Monday, May 31, 2021

#858 SOA Suite and OIC - how easy is it? Part 3 - co-existence


 












Many of our SOA Suite customers are in the process of "migrating" their software real estate to the cloud; think of folks moving from EBS to Fusion ERP, for example. These customers will have many EBS focused integrations, running on SOA Suite. 
These same integrations can now be leveraged from OIC. 

That same EBS customer may be adopting SFDC; her on premise SOA based integrations can now invoke OIC services to update SFDC Account details etc. 

Net, net - we have bidirectional interoperability. One can create SOA Suite connections in OIC, leveraging the SOA Suite adapter. One can also create OIC Connections in JDeveloper -


 








All one needs to enter for the OIC connection is the url and userid/password - 

The url format is simply https://yourOICinstance:443











Now back to the JDeveloper and my OIC connection - 








Note, you cannot browse the available services in the IDE connections panel. To do that we need to add a REST service to our SOA composite and then "browse" the available REST based OIC integrations - 
















I choose a very simple OIC integration - AA-Hello-World -















Note the padlock icon on OICHalloWorld - this is where I need to set the wsm policy which will allow me to pass the basic auth credentials to OIC.
















Naturally, the csf-map and key need to exist - csf map must be called oracle.wsm.security.
























So let's look at AA-Hello-World in OIC and check out the request body - 

























Very simple -  the request payload is of the format - 
{"name":"yourName"} - we will need to set this manually in JDeveloper.

Here is my BPEL process - 















Firstly, I add the following 2 process variables - one for the request and one for the response from OIC.

Note the type and QName - 








I edit InvokeOIC to use these variables - 












Now to the Javascript code, which will set the request variable - I am hardcoding it here.













note how I can address the input variable via the suffix - process.

Now all I need to do is deploy and test -













Ok, so test 1 was using a hardcoded value - let's use a value form the BPEL process request -


I use the customer value - as you can see, I have created an extra variable - v_customer - of type string.

Here is the amended BPEL process - 


The first Assign - assigns the customer value to v_customer.
Now to assignPayload


finally - the Javascript Activity - this will set the status field in the BPEL response to that from the OIC integration - 






So let's test again - 



 
Now to invoking SOA Suite from OIC - 

Calling SOA and Service Bus processes from OIC

Firstly, create the SOA Suite connection -
















Note the use of the Connectivity Agent - it needs to be installed locally to SOA Suite.


Invoking Service Bus Proxies from OIC

I begin with Service Bus - 

Here is a simple Proxy, deployed to my SOA instance - 









This is simply an Hello World example as Gaeilge - 














I create an app-driven orchestration and drop the SOA connection and configure as follows - 












Here is my integration - 














I just need to map a name to CallServiceBus. My request payload is a simple order, so I will map the customer name -





Here is the Target again - 







Finally, I map the response from Service Bus to the OIC process response -











Now to testing this - 



























great stuff - now I expose the Service Bus Proxy as a REST service - 






I test in JDeveloper -


 

Back in OIC, I edit the integration to invoke the REST service - 










Activate and test - 












Invoking BPEL Processes from OIC

Here is my sample order approval process - ProcessOrder1 - 










All it does is return the string - "Approved".















I go back to my OIC integration - and drop the SOA Suite connection again - 



this time I select the SOA option - 











I do the request / response mappings - 

Here is the response mapping - 





Activate and test - 














Please note - the schema for the BPEL process request/response is included inline in the BPEL WSDL -