Document import by profile
Overview
Document imports by profile rely on the general import mechanisms for entities as described in the Import section.
Typically, a Batch import profile is used to CREATE new document objects based on file content received by Lobster Data Platform / Integration.
The general processing logic for document properties applies as described in the section Importing documents for interactive imports. Of course, the profile must provide content for all properties instead of interactive entries.
The template provided by the system (s. Orchestration templates) for the 'Document' entity (aka. doc:Document) provides a suitable target structure to include in a Batch import.
For an import using Barcode detection, the template for a 'Barcode preprocessor' (doc:BarcodeDocument (Preprocessor)) must be included instead of the document object.
Importing a document without barcode detection
To create a new document by running a profile the following settings are typically relevant:
Property |
Target structure field |
Content |
Examples |
Name |
name_attr |
Name for the document (often but not necessarily the file name) |
loadinglist.pdf, LOADINGLIST |
Description |
description_attr |
Plain text description for the document |
Loading list in print format |
Reference |
reference_attr |
Key value for referencing a data object (see Assigning documents) |
123456789 |
Reference type |
referenceType_attr |
internal 'Name' (name) of a Document reference type |
LL_UPLOAD |
Referenced entity |
referencedEntity_attr |
class name of the data object type to reference (shipment, user, ...) |
shp:Shipment, base:User |
Document type |
documentType_attr |
internal 'Name' (name) of a Document type |
LOADINGLIST |
Document content |
documentContent |
the content of the document file (encoded in Base64) |
...JVERasdhaw3ASd3fa5AGRS... |
When a new document is imported, further properties are populated with general information about the document (see Importing documents) as well as details depending on results of the referencing (see Assigning documents).
For a Document import by profile all properties are technically optional, even if they appear as 'required' in interactive dialogs. However, the referencing process, which tries to assign a document to a data object, will not start with incomplete parameters (Reference, Reference type and depending on reference type also Referenced entity).
►NOTE◄ In contrast to the interactive process, a document can also be assigned directly to a data object during import via Lobster_data if the profile provides the following specifications and does not contain complete specifications for referencing (see above):
Property |
Target structure field |
Content |
Examples |
Referenced entity |
referencedEntity_attr |
class name of the data object type to reference (shipment, user, ...) |
shp:Shipment |
Referenced entity id |
referencesEntityId_attr |
internal ID of the referenced data object |
2701 |
Reference state |
referenceStatus_attr |
reference state "Referenced" (REFERENCED) must be set to establish a valid reference |
REFERENCED |
Importing a document with barcode detection
For an import using Barcode detection the Lobster Data Platform / Orchestration the template for 'Barcode preprocessor' (doc:BarcodeDocument (Preprocessor)) must be included instead of the document object. This preprocessor features a node template containing the properties of the document object relevant for an import. Values for these properties must be provided as described for importing without barcode detection (see section above).
To execute Barcode detection within a profile the preprocessor features fields resembling the settings of the interactive dialog:
Property |
Target structure field |
Content |
Examples |
Barcode Filters |
barcodeFilters/filter/format_attr |
Identifier for a 'Barcode format' (static enumeration) |
CODE_128, EAN_13 |
barcodeFilters/filter/regex_attr |
regular expression to validate the string of a barcode |
[0-9]{8}$ |
|
Barcode pattern |
barcodePattern_attr |
interpretation schema for relevant barcodes |
{referenceType}-{reference} |
Split document? |
splitDocument_attr |
true, if the document should be split into sections per relevant barcode |
true, false |
Skip barcode page? |
skipBarcodePage_attr |
true, to omit the page with the barcode from the section when splitting documents |
true, false |