The OCR FileBatch function is triggered from an external process (not Cora SeQuence, and delivers a file to a robot for OCR in a batch mode.
Method
POST
URL
https://{Sequence.Server}/SequenceServices/coraOcrIntegration_v1.0.0.asmx
Response Codes
Responses follow standard HTTP Status Codes.
Objects
InputFile
InputFile properties are defined within a <FileReference>.
| Name | Type | Required | Description |
|---|---|---|---|
| Connection | string | required | CoraOCRExternalConnection (use this connection) |
| RelativeLocation | string | required | Defines the file's relative location. |
| FileName | string | required | Name of the file you want to process. |
OutPut File
OutputFile properties are defined within a <FileReference>.
| Name | Type | Required | Description |
|---|---|---|---|
| Connection | string | required | CoraOCRExternalConnection (use this connection) |
| RelativeLocation | string | required | Defines the file's relative location. |
| FileName | string | required | Name of the file you processed. |
Input Parameters
The body contains an InputFile, RobotProfile, and OutputFile.
| Name | Type | Required | Description |
|---|---|---|---|
| TimeOut | integer | required | The interval after which the process stops searching for the result file. |
| ExternalContext | string | optional | Additional process information. |
| InputFile | object | required | Defines the location of the source file to send to the robot. |
| OCRProfile | string | required | Name of the profile that contains the settings for the OCR implementation. |
| OutPutFile | object | required | Defines the location where the result file is placed. |
| PutModel | string | required |
|
Output Parameters
| Name | Type | Description |
|---|---|---|
| MasterWorkflowInstanceId | long | The master workflow ID of the process invoking the OCR. |
SOAP 1.1 Sample
Request
POST /SequenceServices/coraOcrIntegration_v1.0.0.asmx HTTP/1.1
Host: admindev.pnmsoftlabs.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://genpact.com/cora/orchestration/ocr/1.0.0/api/FileBatch"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ActivityMetadata xmlns="http://genpact.com/cora/orchestration/ocr/1.0.0/api/">
<WorkflowSpaceId><font class=value>guid</font></WorkflowSpaceId>
<WorkflowSpaceName><font class=value>string</font></WorkflowSpaceName>
<WorkflowId><font class=value>guid</font></WorkflowId>
<WorkflowName><font class=value>string</font></WorkflowName>
<WorkflowInstanceId><font class=value>long</font></WorkflowInstanceId>
<ActivityId><font class=value>guid</font></ActivityId>
<ActivityName><font class=value>string</font></ActivityName>
<ActivityInstanceId><font class=value>long</font></ActivityInstanceId>
<CallerId><font class=value>int</font></CallerId>
<MasterWorkflowInstanceId><font class=value>long</font></MasterWorkflowInstanceId>
</ActivityMetadata>
</soap:Header>
<soap:Body>
<FileBatch xmlns="http://genpact.com/cora/orchestration/ocr/1.0.0/api/">
<Input>
<InputFile>
<FileReference>
<Connection><font class=value>CoraOCRExternalConnection</font></Connection>
<RelativeLocation><font class=value>string</font></RelativeLocation>
<FileName>string</FileName>
</FileReference>
<PutMode><font class=value>Put</font> or <font class=value>PutOverride</font> or <font class=value>Ignore</font></PutMode>
</InputFile>
<OCRProfile><font class=value>string</font></OCRProfile>
<OutputFile>
<FileReference>
<Connection><font class=value>CoraOCRExternalConnection</font></Connection>
<RelativeLocation><font class=value>string</font></RelativeLocation>
<FileName>string</FileName>
</FileReference>
<PutMode><font class=value>Put</font> or <font class=value>PutOverride</font> or <font class=value>Ignore</font></PutMode>
</OutputFile>
</Input>
</FileBatch>
</soap:Body>
</soap:Envelope>Response
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<FileBatchResponse xmlns="http://genpact.com/cora/orchestration/ocr/1.0.0/api/">
<Output>
<MasterWorkflowInstanceId>int</MasterWorkflowInstanceId>
</Output>
</FileBatchResponse>
</soap:Body>
</soap:Envelope>SOAP 1.2 Sample
Request
POST /SequenceServices/coraOcrIntegration_v1.0.0.asmx HTTP/1.1
Host: admindev.pnmsoftlabs.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<ActivityMetadata xmlns="http://genpact.com/cora/orchestration/ocr/1.0.0/api/">
<WorkflowSpaceId>guid</WorkflowSpaceId>
<WorkflowSpaceName>string</WorkflowSpaceName>
<WorkflowId>guid</WorkflowId>
<WorkflowName>string</WorkflowName>
<WorkflowInstanceId>long</WorkflowInstanceId>
<ActivityId>guid</ActivityId>
<ActivityName>string</ActivityName>
<ActivityInstanceId>long</ActivityInstanceId>
<CallerId>int</CallerId>
<MasterWorkflowInstanceId>long</MasterWorkflowInstanceId>
</ActivityMetadata>
</soap12:Header>
<soap12:Body>
<FileBatch xmlns="http://genpact.com/cora/orchestration/ocr/1.0.0/api/">
<Input>
<InputFile>
<FileReference>
<Connection>CoraOCRExternalConnection</Connection>
<RelativeLocation>string</RelativeLocation>
<FileName>string</FileName>
</FileReference>
<PutMode>Put or PutOverride or Ignore</PutMode>
</InputFile>
<RobotProfile>string</RobotProfile>
<OutputFile>
<FileReference>
<Connection>CoraOCRExternalConnection</Connection>
<RelativeLocation>string</RelativeLocation>
<FileName>string</FileName>
</FileReference>
<PutMode>Put or PutOverride or Ignore</PutMode>
</OutputFile>
</Input>
</FileBatch>
</soap12:Body>
</soap12:Envelope> Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<FileBatchResponse xmlns="http://genpact.com/cora/orchestration/ocr/1.0.0/api/">
<Output>
<MasterWorkflowInstanceId>int</MasterWorkflowInstanceId>
</Output>
</FileBatchResponse>
</soap12:Body>
</soap12:Envelope>