Integrating with IBM App Connect Enterprise
You can create an integration flow with IBM® App Connect Enterprise to direct the annotation content from a finalized document to an appropriate output location or application.
App Connect Enterprise enables information that is packaged as messages to flow between a range of business applications. App Connect Enterprise routes messages from one location to any other location, based on the content of the message. Messages can also be transformed and enriched before they are delivered. You use the App Connect Enterprise Toolkit to create a message flow, which you deploy to an integration server. The integration server does the work of routing and transforming messages.
Use case
Sample code enables an integration flow between Automation Document Processing and the App Connect Enterprise.
When a document is finalized by IBM Automation Document Processing, a Document Processing Webhook event action, which is configured in the Content Platform Engine, makes an HTTP POST request to an App Connect Enterprise project’s HTTP POST receiver. The receiver processes the finalization Webhook event data and then retrieves the finalized document’s annotation JSON content from Content Platform Engine. The annotation JSON content can then be processed by the App Connect Enterprise project or send forward to other applications. With IBM App Connect Enterprise managing the integration flow, a custom integration of the document processing environment with each application isn't required.
Sample code
- Processing the HMAC header included in the Webhook event action’s HTTP POST call.
- Extracting the source document information from the Webhook event payload.
- Using the Content Services GraphQL API through Identity Access Management (IAM) authentication to retrieve the latest annotation content of the finalized document from the Content Platform Engine.
- Extracting the table of key-value pairs (KVP) from the annotation JSON content and write out to an external file.
In this sample App Connect Enterprise project, the key-value pair (KVP) table of the finalized document is extracted from the annotation JSON and written to a text file. You can enhance the code to forward the content to other applications.
Prerequisites
To create this sample integration flow, you must have access to a document processing environment that can process and finalize documents.
- The URL for IAM authentication
- The URL of the Cloud Pak Platform UI (Zen) front door
- The GraphQL API endpoint and the URL of the GraphQL content download endpoint for Content Services
- User credentials to the Content Platform Engine service and to tje Content Platform Engine client
To initiate the integration flow, you also need a document processing client application, which can submit documents to the document processing environment for processing. You can use one of the capture applications that are deployed in your document processing environment. Or you can use other custom document processing client applications that are available to you.
Roadmap
- Install App Connect Enterprise and create an integration server.
- Configure the App Connect Enterprise environment for IAM authentication.
- Create a REST API project in App Connect Enterprise to enable the integration flow between document processing and the integration project.
- Deploy the integration project to the App Connect Enterprise integration server.
- Create a Webhook event action and subscription in the Content Platform Engine that can initiate the integration flow.
- (Optional) Finalize documents to initiate the integration flow.