doc:BarcodeDocument (Preprocessor)

See also: Barcode detection, Importing documents, Importing documents via Lobster_data

The BarcodeDocument preprocessor enables Barcode detection for Documents during Import.

It contains a subnode template resembling the template structure of the document object. By this structure, the input data – such as content, name and type of the document to be imported – can be assigned via mapping (see also Importing documents via Lobster_data).

The preprocessor generates a single or multiple document objects depending on the assignments for the template and the evaluation of the document content, taking into account the parameters for Barcode detection. When importing these documents, the mechanisms described under Assigning documents take effect, considering the data obtained from the Barcode detection.

The following structure can be merged directly into the import structure from the template preProcessor:BarcodeDocument (see Lobster SCM templates):

images/download/attachments/58596996/image2020-10-1_22-10-19-version-1-modificationdate-1601583020184-api-v2.png

Parameter

Type

Meaning

Content (fixed value/example)

xsi:type 

String attribute

type of preprocessor

doc:BarcodeDocument

splitDocument

Boolean attribute

the 'Split document?' flag (see Barcode detection); determines whether partial documents are created per barcode

true / false 
skipBarcodePage

Boolean attribute

the 'Skip barcode page?' flag (see Barcode detection); determines whether the barcode page in the document part is skipped

true / false

template

Document structure

represents the data structure of a document object (for mapping and other assignments)

see Importing documents via Lobster_data

barcodeFilters

Subnode

enumeration of all relevant barcode filters (see Barcode detection) to define 'accepted' barcodes

see Importing documents via Lobster_data

barcodePattern

Text element

definition of a 'Barcode pattern', which defines an interpretation scheme for recognized barcodes (see Barcode detection)

see Importing documents via Lobster_data

Example:

The following Batch import imports the document identified by the template, whose content in the documentContent was replaced with the text 'base64-String' here.

The template also specifies the 'UPLOAD' document type and determines that an attempt should be made to establish a reference to a manifest entity via the 'Manifest' Reference type.

The basis for the reference should be a barcode which, according to the only filter , should correspond to the format of CODE_128 and the content of a given regular expression (regex).

<?xml version="1.0" encoding="UTF-8"?>
<core:BatchImport xmlns:cmnTS="SCM.COMMON.TS" xmlns:cmn="SCM.COMMON" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mfst="SCM.MANIFEST" xmlns:mfstTS="SCM.MANIFEST.TS" xmlns:scem="SCM.SCEM" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:manor="SCM.MANOR" xmlns:core="CORESYSTEM" xmlns:baseTS="SCM.BASE.TS" xmlns:doc="SCM.DOC" xmlns:shp="SCM.SHIPMENT" xmlns:portal="SCM.PORTAL" xmlns:base="SCM.BASE" xmlns:shpTS="SCM.SHIPMENT.TS" trxControl="SINGLE" sendDLCMessages="false">
<batch action="CREATE">
<preProcessor xsi:type="doc:BarcodeDocument" splitDocument="false" skipBarcodePage="false">
<template name="doc00500720191129131002.pdf" referenceType="Manifest" referencedEntity="mfst:Manifest" documentType="UPLOAD">
<documentContent>"base64-String"</documentContent>
</template>
<barcodeFilters>
<filter format="CODE_128" regex="^15[0-9]{8,}$"></filter>
</barcodeFilters>
</preProcessor>
</batch>
</core:BatchImport>