Introduction
This is a simple demo on leveraging OIC Agents to monitor and resubmit errors. The setup is as follows -
The entry point is the ASYNC_MAIN integration, which invokes 2 sync integrations, SYNC1 and SYNC2.
I need to monitor errors in ASYNC_MAIN, I also need the ability to resubmit failed instances.
Note the WAIT action after the invoke of SYNC1. This will ensure flow state dehydration. Our use case will involve generating an error in SYNC2. By resubmit, we do not want SYNC1 to be invoked a second time.
The error will be generated, when I process an invalid product, iCar. The map action for the SYNC2 invoke will take the product value from an OIC lookup -
The next component is a DB table on ATP -
CREATE TABLE "NIALLC"."ERRORED_FLOWS"
( "INSTANCEID" VARCHAR2(30 BYTE) COLLATE "USING_NLS_COMP",
"PROJECTNAME" VARCHAR2(50 BYTE) COLLATE "USING_NLS_COMP",
"INTEGRATIONNAME" VARCHAR2(50 BYTE) COLLATE "USING_NLS_COMP"
) DEFAULT COLLATION "USING_NLS_COMP" ;
ALTER TABLE "NIALLC"."ERRORED_FLOWS" MODIFY ("INSTANCEID" NOT NULL ENABLE);
ALTER TABLE "NIALLC"."ERRORED_FLOWS" MODIFY ("PROJECTNAME" NOT NULL ENABLE);
ALTER TABLE "NIALLC"."ERRORED_FLOWS" MODIFY ("INTEGRATIONNAME" NOT NULL ENABLE);
On error, a row will be written to this table -
The flow, with instance id,
2HVm-j8dEfG8Ab8Y-P4nAQ, errors out.
Let's run a second flow, with the same invalid product, iCar.
The flow, with instance id, O6f-Sj8eEfGQlVci_IGJCQ, errors out.
The result - 2 rows in my errors table -
Using the OIC Factory API to monitor errors
Here is the api call to monitor errors in this integration -
https://design.integration.yourRegion.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/errors?integrationInstance=yourOICInstance&q={timewindow: '1h', projectCode: 'AA_RESUBMIT_AGENT',code: 'ASYNC_MAIN'}
Here is an excerpt from the response -
{
"dataFetchTime": "2026-04-23T14:13:26.594+0000",
"items": [
{
"creationDate": "2026-04-23T14:10:50.525+0000",
"currentTraceLevel": "Debug",
"errorCode": "500",
"errorDetails": "<fault xmlns=\"http://xmlns.oracle.com/cloud/oic/gen3fault\"><traceId>05c9604058916bdfd251f9e87336055a</traceId><requestId>CVYW6UTM6SM9AV7EWAENG1KU1TUPPP6Z/29IPDW8CZUZS6R4C7GHTARVNN35NZBXB/IDJUBT7YVZ59ZT2ZN2DF384ODTFMPFU3</requestId><errorId>Td54bD8eEfGv9004aPKSdQ</errorId><flowId>O6f-Sj8eEfGQlVci_IGJCQ</flowId><errorType>CalledExternalServiceInternalError</errorType><origin>tech-adapters-5b6f967c4-hz976</origin><errorCode>500</errorCode><faultName>ns0:APIInvocationError</faultName><retriable>false</retriable><reason><![CDATA[{\n \"type\" : \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1\",\n \"title\" : \"ERR-001\",\n \"detail\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorCode\" : \"500\",\n \"errorDetails\" : [ {\n \"type\" : \"UnMappedFault:\",\n \"instance\" : \"NA\",\n \"title\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorPath\" : \"<![CDATA[<location xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">mcube</location>\\n]]>\",\n \"errorCode\" : \"ERR-001\"\n } ]\n}.The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the server side, but the target service could not be more specific on what the exact problem is. Try invoking the target service using cURL. If the problem persists, contact the target service admin.]]></reason><details><ns0:APIInvocationError xmlns:ns0=\"http://xmlns.oracle.com/cloud/generic/rest/fault/collocatedics/invokeSync2\"><ns0:type/><ns0:title/><ns0:detail/><ns0:errorCode/><ns0:errorDetails><ns0:type>http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1</ns0:type><ns0:title>Internal Server Error</ns0:title><ns0:errorCode>500</ns0:errorCode><ns0:errorPath><![CDATA[InboundJaxrsResponse{context=ClientResponse{method=POST, uri=http://rest-adapter:8080/ic/api/integration/v2/flows/rest/project/AA_RESUBMIT_AGENT/SYNC_2/1.0/sync2, status=500, reason=Internal Server Error}}]]></ns0:errorPath><ns0:instance><![CDATA[{\n \"type\" : \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1\",\n \"title\" : \"ERR-001\",\n \"detail\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorCode\" : \"500\",\n \"errorDetails\" : [ {\n \"type\" : \"UnMappedFault:\",\n \"instance\" : \"NA\",\n \"title\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorPath\" : \"<![CDATA[<location xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">mcube</location>\\n]]>\",\n \"errorCode\" : \"ERR-001\"\n } ]\n}.The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the server side, but the target service could not be more specific on what the exact problem is. Try invoking the target service using cURL. If the problem persists, contact the target service admin.]]></ns0:instance></ns0:errorDetails></ns0:APIInvocationError></details></fault>",
"errorItems": [
{
"detailErrorMessage": "<fault xmlns=\"http://xmlns.oracle.com/cloud/oic/gen3fault\"><traceId>05c9604058916bdfd251f9e87336055a</traceId><requestId>CVYW6UTM6SM9AV7EWAENG1KU1TUPPP6Z/29IPDW8CZUZS6R4C7GHTARVNN35NZBXB/IDJUBT7YVZ59ZT2ZN2DF384ODTFMPFU3</requestId><errorId>Td54bD8eEfGv9004aPKSdQ</errorId><flowId>O6f-Sj8eEfGQlVci_IGJCQ</flowId><errorType>CalledExternalServiceInternalError</errorType><origin>tech-adapters-5b6f967c4-hz976</origin><errorCode>500</errorCode><faultName>ns0:APIInvocationError</faultName><retriable>false</retriable><reason><![CDATA[{\n \"type\" : \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1\",\n \"title\" : \"ERR-001\",\n \"detail\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorCode\" : \"500\",\n \"errorDetails\" : [ {\n \"type\" : \"UnMappedFault:\",\n \"instance\" : \"NA\",\n \"title\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorPath\" : \"<![CDATA[<location xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">mcube</location>\\n]]>\",\n \"errorCode\" : \"ERR-001\"\n } ]\n}.The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the server side, but the target service could not be more specific on what the exact problem is. Try invoking the target service using cURL. If the problem persists, contact the target service admin.]]></reason><details><ns0:APIInvocationError xmlns:ns0=\"http://xmlns.oracle.com/cloud/generic/rest/fault/collocatedics/invokeSync2\"><ns0:type/><ns0:title/><ns0:detail/><ns0:errorCode/><ns0:errorDetails><ns0:type>http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1</ns0:type><ns0:title>Internal Server Error</ns0:title><ns0:errorCode>500</ns0:errorCode><ns0:errorPath><![CDATA[InboundJaxrsResponse{context=ClientResponse{method=POST, uri=http://rest-adapter:8080/ic/api/integration/v2/flows/rest/project/AA_RESUBMIT_AGENT/SYNC_2/1.0/sync2, status=500, reason=Internal Server Error}}]]></ns0:errorPath><ns0:instance><![CDATA[{\n \"type\" : \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1\",\n \"title\" : \"ERR-001\",\n \"detail\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorCode\" : \"500\",\n \"errorDetails\" : [ {\n \"type\" : \"UnMappedFault:\",\n \"instance\" : \"NA\",\n \"title\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorPath\" : \"<![CDATA[<location xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">mcube</location>\\n]]>\",\n \"errorCode\" : \"ERR-001\"\n } ]\n}.The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the server side, but the target service could not be more specific on what the exact problem is. Try invoking the target service using cURL. If the problem persists, contact the target service admin.]]></ns0:instance></ns0:errorDetails></ns0:APIInvocationError></details></fault>",
"errorCode": "500",
"errorLocation": "Re-throw Fault",
"errorMessage": "<![CDATA[{\n \"type\" : \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1\",\n \"title\" : \"ERR-001\",\n \"detail\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorCode\" : \"500\",\n \"errorDetails\" : [ {\n \"type\" : \"UnMappedFault:\",\n \"instance\" : \"NA\",\n \"title\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorPath\" : \"<![CDATA[<location xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">mcube</location>\\n]]>\",\n \"errorCode\" : \"ERR-001\"\n } ]\n}.The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the server side, but the target service could not be more specific on what the exact problem is. Try invoking the target service using cURL. If the problem persists, contact the target service admin.]]>",
"faultId": "TfJ0sj8eEfGmnJ2vua-GOA",
"milestone": "eh0",
"recoverable": true,
"retryCount": 0,
"state": "MCUBE_ACTIVITY_RECOVERY_REQUIRED",
"status": "FAILED"
}
],
"errorLocation": "Re-throw Fault",
"errorMessage": "<![CDATA[{\n \"type\" : \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1\",\n \"title\" : \"ERR-001\",\n \"detail\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorCode\" : \"500\",\n \"errorDetails\" : [ {\n \"type\" : \"UnMappedFault:\",\n \"instance\" : \"NA\",\n \"title\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorPath\" : \"<![CDATA[<location xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">mcube</location>\\n]]>\",\n \"errorCode\" : \"ERR-001\"\n } ]\n}.The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the server side, but the target service could not be more specific on what the exact problem is. Try invoking the target service using cURL. If the problem persists, contact the target service admin.]]>",
"faultId": "TfJ0sj8eEfGmnJ2vua-GOA",
"id": "O6f-Sj8eEfGQlVci_IGJCQ",
"instanceId": "O6f-Sj8eEfGQlVci_IGJCQ",
"instanceReportingLevel": "Debug",
"integrationDeleted": false,
"invokedBy": "niall.commiskey@oracle.com",
"isDataAccurate": true,
...
"primaryName": "orderNr",
"primaryValue": "2113",
"projectCode": "AA_RESUBMIT_AGENT",
"projectName": "AA-Resubmit-Agent",
"recoverable": true,
"replayable": false,
"replayed": false,
"retryCount": 0
},
{
"creationDate": "2026-04-23T14:08:04.154+0000",
"currentTraceLevel": "Debug",
"errorCode": "500",
"errorDetails": "...
16-sec10.html#sec10.5.1\",\n \"title\" : \"ERR-001\",\n \"detail\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorCode\" : \"500\",\n \"errorDetails\" : [ {\n \"type\" : \"UnMappedFault:\",\n \"instance\" : \"NA\",\n \"title\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorPath\" : \"<![CDATA[<location xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">mcube</location>\\n]]>\",\n \"errorCode\" : \"ERR-001\"\n } ]\n}
...
"errorItems": [
{
"detailErrorMessage": "
... \"ERR-001\",\n \"detail\" : \"faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorCode\" : \"500\",\n \"errorDetails\" : [ {\n \"type\" : \"UnMappedFault:\",\n \"instance\" : \"NA\",\n \"title\" : \"faultName:
...
{{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorPath\" : \"<![CDATA[<location xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">mcube</location>\\n]]>\",\n \"errorCode\" : \"ERR-001\"\n } ]\n}.The 500 Internal Server Error is a very general HTTP status code
...
"recoverable": true,
"retryCount": 0,
"state": "MCUBE_ACTIVITY_RECOVERY_REQUIRED",
"status": "FAILED"
}
],
...
faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}\",\n \"errorPath\" : \"<![CDATA[<location xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">mcube</location>\\n]]>\",\n \"errorCode\" : \"ERR-001\"\n } ]\n}.
...
"faultId": "6tIF0D8dEfGez3_SZkbBOA",
"id": "2HVm-j8dEfG8Ab8Y-P4nAQ",
"instanceId": "2HVm-j8dEfG8Ab8Y-P4nAQ",
...
"primaryName": "orderNr",
"primaryValue": "2112",
"projectCode": "AA_RESUBMIT_AGENT",
"projectName": "AA-Resubmit-Agent",
...
}
],
...
"timeWindow": "1",
"totalRecordsCount": 2,
"totalResults": 2
}
Interesting fields in red.
Using the OIC Factory API to resubmit errors
Here is the api call I use -
Now to my integrations, which will leverage the factory api -
I expose these as tools to my agent -
Let's try out the agent -
In the last hour, there were 2 errors for the integration ASYNC_MAIN in the project AA_RESUBMIT_AGENT.
What caused these errors?
The errors were caused by an internal server error with HTTP status code 500. Specifically, the faultName is "ns0:APIInvocationError," and the reason provided is related to an internal server problem with the message: "faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} cause: {Invalid Product: iCar}."
This indicates that the underlying issue causing the errors was invoking an external service that encountered an internal error related to an invalid product identified as "iCar."
Was order number 2112 affected?
Yes, the order number 2112 was affected. It is associated with one of the errored instances in the last hour for the integration ASYNC_MAIN in the project AA_RESUBMIT_AGENT.
"The best revenge is to be unlike him who performed the injury." - Marcus Aurelius
Let's resubmit, but, before we do so, let's set the lookup value to iBike.
I resubmit via the agent -
The database table no longer has any rows; the delete being done in the RESUBMIT integration -
I validate in
OIC Observability -
Naturally, we could have a scheduled integration that uses the new OIC AI Agent native action to ensure these resubmits are done on a regular basis.
Summa Summarum
This is a simple use case for an agent, but it does save lots of time and manual effort.
Please ping me, if you want the project export.