Tuesday, 5 March 2019

Expose Web Service as REST API using Oracle Integration Cloud

Exposing Web Service as REST API

Oracle Fusion ERP Cloud provides numerous Web / REST Services for integration and with each release Oracle is adding more and more services.  I have come across scenarios where you have a Web Service available for integration but don't have the equivalent REST Service available.

This might be a problem when you are developing custom applications in VBCS as VBCS can only work with REST Services at this point of time. To overcome this problem, we can leverage Integration Cloud and expose the Web Service as REST API.

In this post I will provide details around how to expose Web Services as REST API using OIC.

Create a REST Connector and Configure the Connection / Security details.



Create an Oracle ERP Cloud adapter and Configure the Connection / Security details.


Create a new Integration and Select Basic Routing Style.


Enter the relevant integration details after selecting the style (Integration Name, Identifier, Description and Package Details)

Select the REST Connector and drop it on the Trigger Section and Enter the details as shown below.


Click on next to configure the Request details of the service.


I have used the below JSON data to configure request.

{ "OrganizationCode" : "XX", "ItemClass" : "Root Item Class", "ItemNumber" : "Test Demo Item - 001", "ItemDescription" : "Test Demo Item - 001", "ItemStatusValue" : "Active", "LifecyclePhaseValue" : "Production", "PrimaryUOMValue" : "Each" }

Click on Next to configure the Response details.



I have used the below JSON data for configuring the response.

{  "ItemId" : 999994000402981,     "OrganizationId" : 111,     "OrganizationCode" : "XX",     "ItemCatalogGroupId" : 100000011369001,     "ItemClass" : "Root Item Class",
..................}

Now select the Oracle ERP Cloud adapter and drop it in the Invoke section and add the details as shown below.





Now add the mapping for request (mapping data between REST and ERP Cloud connector) and response (mapping data from ERP Cloud to REST Connector) as shown below.



Add the business identifier details for tracking.


Save the changes and activate the application.
Copy the Endpoint details as shown below (this endpoint will provide the metadata details).


Open the browser and enter the copied end point from previous step. The Endpoint will display the details below.

Copy the details under Endpoint URL.

Open SOAP UI and copy the Endpoint URL.
Select the method as POST and enter the details of the item to be created in the Request section.
Submit the request and the item will be created successfully in Oracle ERP Cloud.




The details of the item created in Oracle ERP Cloud are as shown below.






Saturday, 2 March 2019

Create RESTful services with Oracle DBCS

In this post I will provide an overview of how to expose the data from Oracle DBCS via RESTful services. This is a common scenario where the customer would like to store large volumes of data in DBCS and leverage other Oracle PaaS products to build custom applications (ex : VBCS comes with a limited internal storage capacity to overcome this limitation we can leverage DBCS and expose the data via RESTful services)



I have created a schema and added the EMP table for the table as shown below.

EMP
===
create table emp(  
  empno    number(4,0),  
  ename    varchar2(10),  
  job      varchar2(9),  
  mgr      number(4,0),  
  hiredate date,  
  sal      number(7,2),  
  comm     number(7,2),  
  deptno   number(2,0),  
  constraint pk_emp primary key (empno),  
  constraint fk_deptno foreign key (deptno) references dept (deptno)  
);

Populate the EMP table with some sample data.

Now navigate to APEX and select SQL Workshop > RESTful Services



Create a new module by providing the relevant details.


After the module is created click on the Create Template button at the bottom of the page.


Enter the details as shown below and create the template

After the template has been created, click on Create Handler.



Under Handler section specify the method, source type, format and source options and click on create handler.



Now copy the Full URL Path and navigate to a browser and place the copied path.

The GET method will query the underlying EMP Table exposes the data in JSON format.
Similarly, we can created handlers for other methods as well.


By default authentication is not enabled in ORDS. Do refer the Authentication section for the options available.

Thursday, 28 February 2019

Visual Builder Cloud Service - Web Application Design

Designing Forms in Visual Builder Cloud Service

In this post I will give you an overview of how to design a form in VBCS and make use of the available REST services in Fusion ERP Cloud to view the data.

VBCS can only work with REST services as of now but we can leverage Integration cloud to convert web services into REST services and make them available to VBCS.

The example provided below designs a simple form with a table and connect to ERP Cloud to get the inventory item details.

Create a new application and add the relevant details and click on Finish.


Now click on Service Connections and add the relevant details.

Create a new Service Connection and select the source as Define by Specification

Enter the relevant details and click on next

select the items end point and click on create

Now navigate to Web Applications and create a new Web Application as shown below.

Design the form and add the table component to the form as shown below.

Click on the Add Data property to map the underlying source data for the table. Select the item end point and click on next.


Select the columns which are to be displayed on the form.


Click on Next and associate any query parameters if required. In this example we don't have any query parameters to add so click on Finish.

We can now view the data in the Design View as shown below.


We can also change the column name by editing the headerText tag as shown below.




Click on Run icon to run the application.


The form would be displayed in a new window.









Sunday, 24 February 2019

Subscribing to Oracle Fusion ERP Events in OIC


Oracle Integration Cloud enables us to subscribe for the Events in ERP Cloud. In this example I will showcase how you can use item creation event and populate the data into VBCS business objects.

In order to enable ERP Cloud to send across the events to OIC we need to create a csf key as shown below.



Enter the details for enabling the business events notifications from ERP Cloud by configuring the below.


Csf-key – fill in identitydomain and service details
User name – OIC Username
Password – OIC Password



Create a business object in VBCS to store the item data as shown below.




Create an ERP Cloud Adapter in OIC and enter the relevant details





Create a REST Adapter to insert data into the Business Object create in VBCS



Create a new App Driven Orchestration integration





Add the ERP Cloud Adapter and configure it as shown below.





Now add the REST Adapter and configure it as shown below.



The sample json data which I have used is as given below

Json Sample :

{ "id" : 123, "itemNumber" : "abcd", "description" : "abcd", "organizationId" : 2345  }

Now Map the data as shown below.



Validate the mappings and save the changes.

Add the business identifier for tracking’s.



Save the changes and activate the integration.




Now create the item via a web service call in SOAP UI.


In the monitoring dashboard you could see the message being received in OIC.


Now navigate to VBCS and check for the data created.


A form can be designed in VBCS to view this information.