Search This Blog

Saturday, May 13, 2023

API Gateways, and Oracle FA, with Examples!

API Gateways have gotten increased exposure over the past few years, as SaaS offerings from major vendors continue to accelerate in usage. SaaS in general provides many benefits to customers, but it does present several challenges relative to integrations and extensions, as you are restricted to public API's provided by the vendor, or native file loading capabilities, if you want to perform inbound and outbound data movement of any kind.

In Oracle FA specifically, the necessity of utilizing the API framework for your real time or near real time needs is paramount, and Oracle does a good job of documenting their API capabilities, which can be seen here for Financials, and just with a few clicks you can browse API support for other FA offerings.

Now, an API Gateway provides a layer between the caller and the target, let's say Oracle FA, where in you can perform several actions that will greatly benefit you at scale. With an API Gateway you get some of the following benefits, which are summarized in the graphic below in bullet #1, also, #2 talks to some of the capabilities that you would not want to perform in the gateway, and instead utilize a middleware tool for.



Let's take Oracle ERP as an example, and let's say you want to publish AP related API's to certain consumers but you want to distinguish the traffic generated among them, and you want to protect ERP from abuse. With the gateway you can create quota policies that will limit the usage of the consumer of the API that is proxied in the gateway, and after the user has utilized their quota, their access will be revoked. Similarly, you can create spike arrest policies that will prevent abnormal behavior from taking place, in the way of excessive amount of calls from a consumer that typically does not have that kind of volume. You can also create security policies that inspect incoming request payloads and look for malicious code, in the proxy execution flow, before the message can damage the target. In terms of usage metrics, you can direct results from the API interactions to an Enterprise Logging tool, such as Splunk, where you can build dashboards that will give you in depth analytics about who is making which calls, and what the errors are, etc. so you can discover trends and proactively resolve issues, and you will not be able to do this by just allowing users to call API's in FA directly, and troubleshooting will be labor intensive.

Let's discuss another use case, around simplifying consumer experience of your services. In ERP, oftentimes you need internal ID's from multiple API call's to ultimately perform an action, or just executing API's in sequence. Examples of this can be creating an AR Invoice for a new customer, creating a new customer, or creating a supplier, where multiple API calls have to be made in sequence to accomplish the task. In order to simplify the process and create developer friendly APIs, you can utilize your gateway to create API chains, where you can create a consolidated proxy endpoint with all the payload elements that the consumer will need to pass, and they can make that one call to create a new supplier, and your gateway will then orchestrate the chain of events to create the header, sites, addresses, locations, etc. without burdening the consumer who likely doesn't understand Oracle ERP. You can also hide away the complexity from the Gateway entirely, and proxy an application driven integration from OIC in the gateway instead (or another middleware), as shown in the below example, this is very useful if the actions in the gateway would require significant business logic or complexities beyond what is recommend as far as Gateway scope (see first graphic). Additionally, you can drive reusability and speed up adoption since consumers will just need to meet your payload requirements and understand their own data, and not build significant technical debt or have significant knowledge of Oracle ERP technically.

The above is exemplified in the following graphic, where the Apigee API Gateway is utilized to hide away the complexity of creating a Customer from the consumer. Here the consumer calls the gateway with a consolidated payload, and the gateway invokes OIC where the various API calls to accomplish the task are performed, without the consumer needing to take on this complexity.

Click on the image to expand it!



Lastly, in terms of options, Oracle has an API Gateway offering that integrates very well with FA and also the Oracle Integration Cloud, and if you don't have an enterprise wide gateway that you are required to use, this will be your best option, you can read more about it here. However, if you have your own gateway and want to use it to enhance FA in ways similar to those described here, then you can certainly proxy your API's in your gateway of choice, and you will just need to integrate your Gateway with Oracle IDCS to securely do auth with FA, unless you are willing to store basic authentication details in your gateway and bypass IDCS (which is not recommended).


Business Events in Oracle ERP - Is OIC the Only Option?

Event frameworks are popular in the industry for many use cases, particularly when an action occurring in the source system should trigger a real time response to an external system that wants to passively wait to be told that an action can take place. To this end, in the ERP world, Oracle had provided the business events framework in Oracle EBS, and now also in Cloud ERP there's a similar, although quite different alternative.

The event framework in Oracle EBS allowed you to create custom business events that could be invoked by a stored procedure, or trigger after a custom concurrent program executed, etc. and you had complete control around what the logic in the event was, and so much more.

However, in my experience, business events in ERP are nowhere near as useful as they were in Oracle EBS, yet, as they are not very flexible and you cannot customize them in any way. I personally haven't found a use case where with enough scale the events worked as I wanted them to exactly, but the framework continues to grow and evolve, so it will eventually become more viable. For example, I had several use cases around AP payment acks and acks in AR for various reasons, as well as projects when the workflow changes the status of a project, etc., but the events didn't include all the fields the downstream systems wanted to be in the payload (and you can't just add fields, you would have to make a lookahead call after catching the event to an API and merge the additional data into the payload, assuming the API's had those fields), and also if you want source specific data, sometimes you couldnt filter the payload enough with the event wizard in OIC, and you have to parse through a lot of data to get it to what the downstream system wants and not other systems data. We did successfully use events to build an email ack framework to let downstream systems know about the status of their FBDI files, once uploaded to ERP.

The other challenge is that you can only utilize Oracle Integration Cloud (OIC) to subscribe to business events from FA, so if you use another middleware solution like Biztalk or MuleSoft, etc. you won't be able to subscribe to the events framework without using OIC. This does force clients that have invested in Enterprise tools that would otherwise not want to utilize OIC, to jump on it. However, OIC is pretty inexpensive when compared to other competitors, and if you just want to use it for events, you can have OIC catch your event and pass the payload to your middleware of choice and do what you want there, it's not ideal but it's an option, and it doesn't require complex knowledge of OIC. Also, even if event listening was exposed to other consumers, OIC has a competitive advantage because the wizard to configure an integration that listens to an event, and the options it provides, would still be superior than just listening to a raw event.

If using OIC is completely out of the question, then consider building a message aggregation service with your middleware of choice that calls the REST or SOAP API's in FA in some near real time fashion, which are likely to have far more fields in their payloads than the events themselves anyway, allowing for more flexibility. You can have the middleware send the payloads to a topic using Oracle OCI streaming or your own implementation of Kafka, and then have whoever wants the information consume the topic.

Sunday, May 7, 2023

Oracle Visual Builder Backend ERP Service Connection - Loading Service Definition Error

Hello everyone,

Today we are going to cover a frequently asked question in Customer Connect, and other places, and it is regarding an error you may encounter when creating a backend connection in Oracle Visual Builder with Oracle ERP Cloud, so that you can inherit the API catalog and use the API's within VBCS.

The error occurs after successfully creating a backend connection, when you go to create a service connection and use "Select from Catalog" to select one of the options below, and then go into the service definition loading screen, and ultimately encounter an error. 

In this post we will cover the creation of a profile option in Oracle Fusion, that will resolve this issue.

First the error:

Select any of them, example highlighted.

Now the solution:

In Setup and Maintenance, open Task list and click Search. Enter 'Manage Profile Options' and click on the link.

Click on + to add a new profile option

Define a new profile option.

Profile Option Code: ORACLE.BC.REST.IGNORECATALOGERRORS
Profile Display Name: REST Describe Catalogue Profile
Application: Application Common Resources
Module: Application Common Resources
Description: If a catalog describe fails for a particular resource, log an error and proceed with other resources.

Save and close when done.


In the next screen in the Profile Option Levels section select Enabled and Updateable check boxes for Site & User. Save and Close



Then
1. Go to Fusion Apps Home page and navigate to Setup and Maintenance. Search for task “Manage Administrator Profile Values”.
2. Click on “Manage Administrator Profile Values” task and search for “ORACLE.BC.REST.IGNORECATALOGERRORS”
(enter this value in “Profile Option Code”).
3. To turn on the feature,(Under Profile Values)
a. Set the user and site level profile option ORACLE.BC.REST.IGNORECATALOGERRORS = "true";

 



You can now retry loading the service definitions in VBCS!