Kofax integration
The kofax integration allows easy configuration of some advanced tasks that would otherwise require multiple calls and endpoints. + It is the only way to send documents to the raptor document warehouse from inside E-Platform.
Basic configuration
Configuration is done via a JSON object:
{
"SourceEndpoint": ,
"RaptorConfig":{
"ApiGatewayUrl": "",
"ExternalSystemId": "",
"Secret": "",
"RunAs": ""
},
"UploadStage": {
"ResponseEndpointId": ,
"": [
"",
...
]
},
"EnrichStage": {
"ResponseEndpointId": ,
"": [, ]
"": [
{ "TransformationId": , "Source": },
{
"TransformationId": 11,
"": [
{ "EndpointId": , "Key": "" },
{ "EndpointId": 111, "Key": "kofax" }
]
}
],
"": [
{ "code": "" }
],
"": [
{ "": "comments" }
]
}
}
Example of responses made available in the response endpoints:
<UploadStage sagaId="4cb6d94e-0000-0000-0000-000000000000">
<DocumentId>c7f45dc6-0000-0000-0000-000000000000</DocumentId>
<Tags />
</UploadStage>
<EnrichStage sagaId="4cb6d94e-0000-0000-0000-000000000000">
<Tags>
<Tag id="9ba4150e-0000-0000-0000-0000000000000000" linked="true" />
</Tags>
<Templates>
<Template id="a41f127b-0000-0000-0000-000000000000" />
</Templates>
<Fields />
<Messages />
</EnrichStage>
Example of a tag transformation:
Note: this example contains a multi source input; from endpoints 57 & 60
<root>
<source type="xml" isNull="false" key="input" endpoint="57">
<Kofax>
<Batches xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Batch>
<Id>a2eb46b512f340ef81461aac0bfbfef5</Id>
</Batch>
</Batches>
</Kofax>
</source>
<source type="xml" isNull="false" key="upload-stage" endpoint="60">
<UploadStage sagaId="4cb6d94e-0000-0000-0000-000000000000">
<DocumentId>DOCX</DocumentId>
<Tags>
<Tag id="5a23845d-0000-0000-0000-000000000000" />
<Tag id="7f5dc63b-0000-0000-0000-000000000000" />
<Tag id="c7f45ddd-0000-0000-0000-000000000000" />
</Tags>
</UploadStage>
</source>
</root>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="yes"/>
<xsl:template match="/">
<Root>
<entityName>EXAMPLE</entityName>
<legalEntity>NONE</legalEntity>
<source>E-PLATFORM</source>
<fields>
<xsl:variable name="batchId">
<xsl:value-of select="/root/source[@key='input']/Kofax/Batches/Batch/Id"/>
</xsl:variable>
<xsl:variable name="numberOfSources">
<xsl:value-of select="count(/root/source[@key])"/>
</xsl:variable>
<STATUS>
<xsl:choose>
<xsl:when test="$batchId != '' and $numberOfSources > 1">
<xsl:text>SUCCESS</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>FAILURE</xsl:text>
</xsl:otherwise>
</xsl:choose>
</STATUS>
<TEST>MULTI-SOURCE-TAG-TRANSFORM</TEST>
</fields>
</Root>
</xsl:template>
</xsl:stylesheet>
<Root>
<entityName>EXAMPLE</entityName>
<legalEntity>NONE</legalEntity>
<source>E-PLATFORM</source>
<fields>
<STATUS>SUCCESS</STATUS>
<TEST>MULTI-SOURCE-TAG-TRANSFORM</TEST>
</fields>
</Root>
And as json:
{
"entityName": "EXAMPLE",
"legalEntity": "NONE",
"source": "E-PLATFORM",
"fields": {
"STATUS": "SUCCESS",
"TEST": "MULTI-SOURCE-TAG-TRANSFORM"
}
}
Last updated