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...