Monday, November 21, 2022
#938 OIC -> Working with the Adobe Sign Adapter Part I
Monday, November 14, 2022
#937 OIC Error Handling
Error handling is a big part of integration design. OIC allows one to catch faults at scope and global(integration) level. So when do we use what?
Let's look at a simple example - I have a synchronous integration with 2 scopes -
Finally, we look at the Global Fault handler - as the name suggests, this is at the integration level. Again, simple logic here -
Now I test with an order for Ireland -
The order is processed successfully -
I check out the activity stream -
As you can see, the fault was thrown within the scope and caught the scope fault handler. Processing continues to the next scope - checkProduct.
Takeaway 1
Takeaway 2
If you throw a fault in a scope without fault handler, it automatically bubbles up to the Global Fault Handler.
Sometimes you might want both fault handlers to execute- the scope fault handler does some scope specific stuff, while the global fault handler may invoke a generic error handler.
This is easy - let's go back to the country scope and add a Re-throw fault action. Then test -
Takeaway 3
Rethrowing faults is a good idea if you have your generic fault/error processing defined in the Global Fault Handler.
Some Best Practices
Capturing and Processing Errors
- Check for Netsuite error
- Businessify the error message
- Set fields in fault structure
- Bubble up the error to the global fault handler
Friday, November 4, 2022
Thursday, October 27, 2022
#935 - Oracle Integration 3 invoking OCI Process Automation
We've already met the ubiquitous OrderProcess in previous OPA posts. Now to invoking that very same process from Oracle Integration 3. In OIC Gen 2, Process is part of the toolkit, this will also be the case in Oracle Integration 3, however, this post concerns itself with the standalone version of OPA.
Step 1 is to create an app in IDCS
Redirect URL is set to - https://my OIC3.ocp.oraclecloud.com/icsapis/agent/oauth/callback
Set Scopes as follows - note one for process and one for decisions.
Step 2 - Create REST Connection in OIC 3
The Connection URL - Let's begin with the full URL -
https://myOPA.oci.oraclecloud.com/process/api/v1/process-instances?applicationName=OrderApprovals&version=1.0&processName=OrderProcess
Simply remove all after /v1.
Client Id/Secret are from the IDCS app -
Username / password are required for OPA - I need to specify a user assigned to the relevant OPA role(s).
Note the Scope setting - I specify that for process as well as offline_access (enables token refresh).
Step 3 - Create the Integration in OIC 3
The integration is very simple, a REST trigger, with an <Order> payload, then an invoke leveraging the REST connection I just created. The invoke is configured as follows -
