Wednesday, September 2, 2020

How to use Libraries in OIC for User Defined Functions

In this Blog, we are going to see how to use Libraries on OIC. We are taking an example of generating random password using JavaScript and expose it as a Function, so it can be used in our Integrations.

JavaScript libraries provide a means to create and organize JavaScript for use in integrations. Library functions are automatically available for you to drag into your orchestration integrations.

Create a JavaScript Library

In order for custom function calls to appear in the integration Actions palette, you must create the libraries that contain them.

In the left navigation pane, click Home > Integrations > Libraries.

Click Create in the banner.



In the Create Library dialog box, click Browse to select a JavaScript (.js) library file.
Specify a name, identifier, version number and optional description.

Note: I have created a JavaScript with one parameter(Length) as input and one parameter(Password) as output. You can get the .js file in this link.



Select the Input and Output type.




Now Click Save and our Custom Function is ready.

Create a new App Driven Integration


Select Rest Connection as Trigger.




Configure it as below.(to accept the request and respond back)


Define Input and Output Parameters as shown below, In our case its JSON sample.




After configuring the trigger you should be able to see the integration flow as below.
Click on Edit Map activity.
Click on Right Toggle functions icon on top-right corner. Under functions-> User Defined, you will be able to see the function we created in Library.


Drag and drop the function onto target field(Password). And configure the input as length from request-wrapper.


And we are done.!!! Save and Activate the Integration to test.

Test Result:



Friday, August 21, 2020

Salesforce adapter in OIC for Outbound Messages

Today we will look at a simple example of triggering OIC integration based on some business event within Salesforce application.

In our example, we will configure the integration to capture the event of "Order" creation from Salesforce.


Create Connection:



 In the latest version, we don't need to provide the Salesforce URL. SFDC adapter will figure out the environment based on API version, Username and Instance Type.


Configure Outbound Message:

Before Creating the integration, we first need to configure the Outbound Messages in SFDC which will generate a WSDL.

Login to Salesforce.
Click on Service Setup.


Search for Outbound Messages


Click New Outbound Message.


Select the Object as Order.

Select the Fields you want to capture on the event. Keep it minimal, since we can query the remaining information later.

Enter a dummy URL in Endpoint. This will be later changed to URL of OIC integration.


Click on WSDL and save it. Make sure to remove extra lines in the WSDL document.

Create Integration:


 Select SFDC connection as the trigger point.


Select the WSDL you saved earlier.


Disable "Send a response".



Configure tracking and activate the Integration.

Configure WorkFlow Rules:

Edit Outbound Message and update the Integration URL there and save it.


Search for Workflow Rules.


Click New Rule.


Select Order.


 You can choose when the event should be triggered on below page.


Select Existing action to assign the outbound message we created earlier.

 Save it and Don't forget to Activate the Workflow Rule.


Once activated, For every order created/updated our integration will be triggered.



Later we can update our Integration to query SFDC based the fields we received in the business event.

Tuesday, August 11, 2020

OIC Gen2 File Server

File Server - OIC Generation 2 Feature

File Server provides an embedded SFTP server within Oracle Integration, enabling organizations to focus on building integrations without needing to host and maintain a separate SFTP server.

Inbuilt OIC File server instance provides 500 GB of storage and is available on both Generation 2 Standard and Enterprise Editions .

The primary users of File Server include:
  • Oracle Integration administrators.
  • Oracle Integration developers.
  • Oracle Integration users.
  • File Server REST APIs.
Oracle Integration administrators, who use File Server to manage server settings and configure users, groups and folders, including permissions.
Note: You must be assigned the ServiceAdministrator role in Oracle Integration. 

Oracle Integration developers, who use File Server along with the FTP adapter in integrations to read and write files.

Oracle Integration users, who access File Server using an SFTP client. These users must be configured and enabled as users in File Server. Their access is controlled by their assigned folders and folder permissions.

File Server REST APIs, APIs are provided for File Server administration.
https://docs.oracle.com/en/cloud/paas/integration-cloud/rest-api-fs/rest-endpoints.html

How to Enable File Server


To begin using File Server in Oracle Integration, it must first be enabled for the Oracle Integration instance in the Oracle Cloud Infrastructure Console. Enabling File Server is a one-time activity.
  1. Select your instance in the Oracle Cloud Infrastructure Console.
  2. Click the Enable link for File Server on the Integration Instance Information tab



File Server Settings

We can use the Settings page on OIC console to monitor File Server’s overall health and change its main settings.
On Oracle Integration Home page, choose Settings -> File Server -> Settings.
Under Status settings, monitor the server's status, and stop or restart as needed.




Under Security, we can modify the authentication type which can be

  • Password
  • ssh key based
  • or both




Configure Users and Groups
We can use the Users page to enable SFTP access for selected users and groups, upload a public key for a user, and specify the user or group's folder type.
  • In Oracle Identity Cloud Service, create users or groups whom you want to enable as SFTP users to access File Server. Once added, you can enable their access to File Server.
  • Hover over a row and click Edit Configuration . A user side pane is displayed, where you can upload your Public key if key based security is configured on settings page. Also you can specify the Home folder for the specified user.


Configure Folders

Use the Folders page to create and manage folders and set their permissions. A user’s permissions are a combination of individual assigned permissions and those of any groups the user is a member of. 

Once folders are configured, users with the appropriate permissions can add files to folders using an external SFTP client.


Click a folder's Permissions icon. The Folders Permissions page is displayed, showing a list of users or groups with permissions configured for the current folder.

FAQ

Cost/Billing:

There are no extra cost associated with File Server.

However while using to FTP adapter to read/write files from/to OIC File Server, the standard pricing of FTP adapter applies.

Any file read or write 50kb will be a considered a message. Any message over 50KB in size must be counted as multiple messages, with each 50KB or portion thereof counting as equivalent to one message (e.g., 210KB would be counted as 5 messages).

 

What is the total amount of storage allowed?

Each File Server service instance provides 500 GB of free storage. We can’t increase the storage size.

 

What is the size limit on files uploaded or downloaded?

File size is not limited when uploading or downloading files from an SFTP client, although it is subject to allocated storage limits.

In integrations, inline message payloads (such an XML string or a JSON string) are limited to 10MB, and files and attachments (such as SOAP attachments) can be up to 1GB.

 

What encryption options are available when reading files from and writing files to File Server?

When accessing files from OIC File Server, you can leverage the encryption/decryption features supported by the FTP Adapter. The FTP Adapter supports Pretty Good Privacy (PGP) encryption, which:

·Enables you to encrypt a file that is being uploaded to remote FTP/SFTP servers using Pretty Good Privacy (PGP) cryptography.
·Enables you to decrypt a file that is being read or downloaded from a remote FTP/SFTP server using Pretty Good Privacy (PGP) cryptography.

 

In Latest OIC versions, we can also use Stage Action to encrypt/decrypt the files.