The high level technical flow of my demo is as follows -
OCI Object Storage - OCI Events - OCI Notification Service - OIC Integration - OCI AI - OIC Process
OCI Object Storage is the document store.
OCI Events Service is used to create a rule to publish new object events from Object Storage
OCI Notification Service - has the Topic to which the event is published. It also has a topic subscriber, which will be configured to invoke an OIC integration.
OIC Integration A will be invoked by the subscriber, it will invoke Integration B. The latter will retrieve the document from Object Storage and then invoke OCI AI Vision to analyze the document. The response will contain document type e.g. Receipt or Invoice. It will also include key fields such as items ordered etc.
OIC Process will be used to implement the Approval workflow.
Now alternative flows are possible, for example -
Document is stored in Content & Experience Cloud (CECS) - this triggers OIC Process (Process is bound to a CECS folder) - Process invokes OIC Integration - Integration retrieves the document from CECS and invokes OCI AI to analyze the document - result is returned to Process, which visualises the salient document data in a Process form for Approval. The process also has access to the original doc (as Process attachment).
However, this post will focus on OIC and the OCI Services mentioned above and, as regular readers of my blog know, my examples are always simple; I show you how to do it, and you can extrapolate. This post is no exception.
Here is the demo receipt I will be using -
No Irish Coffees here, unfortunately.
First stop is OCI Object Storage.
OCI Object Storage - create Bucket
OCI Notification Service - create Topic
Create a Topic for the new doc event.
OCI Events Service - create Rule
Create a rule for the new doc event - this defines what happens when a doc is uploaded to my OCI Object Storage bucket.
I can add more conditions to specify the compartment and bucket name.
I then specify the action to be executed, once the rule conditions have been met.
So that's clear enough I hope. We created a bucket for our documents, also a topic for publishing the event - new doc uploaded. We then created a rule joining the 2.
We can also view the payload that will be published to the topic -
Next step is to create a REST based integration to process the new doc event -
Oracle Integration - create Integration
Note, the Request payload is set to the example even payload above.
I simply log the event type -
All that's missing now is the Topic Subscription. This subscription will subscribe to the topic and then invoke the OIC integration we just created.
I copy the integration endpoint and return to OCI Notifications Service -