Thursday, June 16, 2016

#510 CORS support in ICS

Firstly what is CORS?

Cross
Origin
Resource
Sharing

I'm sure everyone is wise now!

According to the ORCL docs -

CORS defines a way in which a browser and server can interact to determine safely whether or not to allow the cross-origin request. CORS provides for more flexibility than same-origin requests, but is more secure than simply permitting all cross-origin requests.

When creating an integration in ICS, you can now configure the REST connection for CORS.

























Note the last checkbox in the screenshot above.

Here is the CORS configuration page -


































I add the following -


















As you can see, I cannot select any other methods apart from GET, as that is all
I have defined.

Here is the completed integration -








As you can see, I create an Organization in Service Cloud.

Now to the testing ...

I activate the Integration and try the /metadata url in my browser -























Now I execute the rest request, replacing /metadata with /organization and the required parameters -

https://myICS/integration/flowapi/rest/NC_CORS_EXAMPLE/v01/organization?orgName=IrishCuisine&contactFirstName=Niall&contactLastName=Commiskey

and this validate the CORS settings.



Monday, June 13, 2016

#509 ICS --> Orchestration example

Here is a simple example of using the Orchestration pattern in ICS.

In this scenario, before creating a new organization in Service Cloud, I first check whether it already exists. The processing logic is very simple -

IF the organization exists

THEN
Mark created status as ‘false’
Return the existing Org ID and name.

ELSE
Create the account in Service Cloud (RightNow),
Return the newly created Org ID and name.


Here is my connection in ICS -









I also create a REST connection for Inbound.











As this is being used for inbound, Connection URL can be set to any value.

Test the connection -









Create the Integration




























The integration is created -



















Note the Triggers panel on the left - We define what triggers the integration.
In our case, it is the REST connection.

I drop my REST connection on to the Start area.




















































On the next page, I provide the query parameters -














In my case, just one - the Organization name.

The Response will be based on the following file -











































































Now I add a Lookup Organization Call by selecting my Service Cloud (RightNow) connection from the Invokes list.

When dragging it onto the canvas, blue + icons appear.
I drop it on the first of these and configure as follows -











































Now I need to Map the data for the LookupOrganization callout.


















































Now, I need to add some conditional logic after the Invoke of LookupOrganization.

I will use the Switch action for this.













































I configure as follows -

First, the Undefined path -


















The above screenshots should be self explanatory.

If the Org already exists, I want to return its ID and name.
So I add a Map Action after the condition.

















This is the Target -















I will set Created to 'false', as it already exists.










Then I map the ID and NAME.







































Now I need to add the Create Organization call to the Otherwise path.

I select the connection from the Invoke list and drop after Otherwise.


























Do the Mapping - CreateNewOrg.











Note: I have filtered to show only mapped fields on the Target.











Nearly finished, just need to set the reply, if the Organization has been created.
To do this, I drop a Map action after the CreateNewOrg invoke on the Otherwise path.

















Map as follows -
















Last step is to delete the now unnecessary map action -































































I add Tracking, based on the Org name.

I then Activate the Integration.
















The URL is in the following format -

https://YourICSEnv/integration/flowapi/rest/YourIntegration/v01/metadata

I now try this out in a browser -












All I need to do is replace metadata with my OrgName
e.g.
https://YourICSEnv/integration/flowapi/rest/YourIntegration/v01/organization?name=HarmonstownInc.

Here is my response -










I check for the Org in Service Cloud -















I execute the request again -









Wednesday, June 8, 2016

#508 E-Business Suite Business Event processing in ICS

Great video on YouTube, covering ICS responding to EBS Business Events.
The example shown leverages the new Orchestration pattern in ICS and shows how powerful this actually is. I mean, not only in respect of EBS but also Fusion ERP and HCM.

Business events are not yet enabled in Oracle Financial Cloud. But you will be able to discover the events via the ERP Cloud Adapter once they have been enabled and published.

Until then, what can you do?
Let's take a simple scenario where you need to extract invoices from Fusion ERP -
You could create an ESS job to periodically send SOAP requests invoking a BI Publisher based report to extract those invoices created since the last run.

EBS business events vidoe available here