Thursday, May 12, 2022

OIC - Rest Path Or Template parameters vs Query Paramters | How to create Path or template Parameters and Query Parameters

Differences:

  • The first difference between query and path parameters is their position in the URL. While the query parameters appear on the right side of the ‘?’ in the URL, path parameters come before the question mark sign.
  • Secondly, the query parameters are used to sort/filter resources. On the other hand, path parameters are used to identify a specific resource or resources.
  • You can’t omit values in path parameters since they are part of the URL. On the other hand, query parameters are added at the end of the URL, and thus can allow omission of some values as long as the serializing standards are followed.
  • Query parameters have unique attributes which help to define resources in a better way. Path parameters, on the other hand, have dynamic resources, which act upon more granular objects of the resource.
How to create Template Parameters in OIC:



How to create Query parameters in OIC:




How the path and Query Parameters URLs look:

For Path or Template parameters:
https:/oic_instance/ic/api/integration/v1/flows/rest/Hello_World_Rest_Service/2.0/sayHello/Sanddy

For Query Parameters:
https:/oic_instance/ic/api/integration/v1/flows/rest/Hello_World_Rest_Service/2.0/sayHello?name=Sanddy


OIC - Understand of FBDI properties file | How to create a .properties file | How to get properties values from ERP

Why we need Properties file?

In Oracle Cloud ERP, In order to import data in bulk using FBDI based integration, importBulkData operation of ERPIntegration Service is used . The entire load process includes following steps:

  1. Upload files to UCM
  2. Submit Load Interface file for import
  3. Submit respective import jobs

Now to submit import job along with parameters, a properties/manifest file is created and embedded within the FBDI zip(Dynamic way) or can be uploaded in UCM and reused(Static way).

Structure of .properties file:

<Import Job Package Name>,<Import Job Name>,<ZIP file prefix>,<Param1>,...<ParamN>

Notes:

  1. Properites file must have .properties extension.
  2. All the fields in the .properties file should be comma separated
  3. Suppose you have zip file like ImportJournal_05122022.zip, then the zip file prefix will be as "ImportJournal".


How to get Job Package name and import job name from ERP:

Go to Setup and Maintenance


Search with Manage Enterprise and select


Search with the import job name in the display name section >> select the job, here showing Import Payables Invoices >> Edit


See the Path(Job Package Name) and Name (Job Name).


Now the .properties file look as below:

/oracle/apps/ess/financials/payables/invoices/transactions/,APXIIMPT,<ZIP file prefix>,<Param1>,...<ParamN>


How to get all the Parameters of the properties file:

Go to Scheduled Processes


Click on Schedule new Process
 

Search with Import job name . Herr job name we use Import Payables Invoives.


Select Import Payables Invoices.


Click ok.


Submit


Refresh >> Select Impory Payables Invoices >> Expand Parameters >> take the values under all Parameter values.



Now the final .properties file looks like as below:

oracle/apps/ess/financials/payables/invoices/transactions/,APXIIMPT,ImportInvoice,#NULL,300000026XXX,"N",#NULL,#NULL,#NULL,1000,"INVOICE GATEWAY","TEST","N","N",30000000241XXX,#NULL,1

Where ImportInvoice is the Zip file prefix.


Monday, May 9, 2022

OIC - Generate Random number using Javascript function in Oracle integrations

Use Case: We will generate Random number based on number of digits required using Javascript function.

Example, if we put input digit = 3 that means it will generate a random number between 1 and 1000.

Javascript function:

RandomNumber.js

function generateRandomNumber(digit){

var RandomNum=Math.floor((Math.random() * digit) + 1);

return RandomNum;

}

Steps in detail(With Screenshots):

Upload the Javascript code to OIC Libraries




Create a lookup for random digit 


Create App driven Integration


Call Rest Trigger and configure







Call Javascript action and select the created randomNumber function.




Provide the digit value with LookupValue









Map the js response to trigger reply.



Test



Monday, May 2, 2022

VBCS - Call OIC Integration from Visual Builder Cloud Service

Use Case:

  • Create a Service connection of the OIC integration Rest service.
  • Create a Web application.
  • Create a web page and take input text or number as required and a button.
  • Create a Rest service request Type and variable.
  • Using the variable  fields map to the input text fields.
  • From the button event, we will call the OIC rest service and assign the above variable to feed the customer data.

Steps in detail:

Create a service connection






We can now test the created connection.





Create a web application


Drop Input text or Number and Button


Rename the input components.




Create a Type




Create a variable 




Map the variable fields to the input components





Create a event on button


Drop call rest component


Assign endpoint service.



Map the variable to body of the rest service.



Drop a Fire Notification


Provide needed info




Preview and provide field test info and click submit.



We can see test data successfully posted to OIC.



Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...