Examples:document mapping.ini: Unterschied zwischen den Versionen

Aus IMPS
Zur Navigation springen Zur Suche springen
 
(16 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
[GLOBAL]
+
document_[[mapping.ini]]
; Pay attention that these fields are available in all sections. Technically The reading process is 1. System fields 2. Reference fields and then global
 
;OBJECTID        = %Document Id%
 
OBJECTID        = Return %_TMP_OBJECTID%
 
;OBJECTKIND      = Return "Retroactum"
 
OBJECTKIND      = Return %Stuksoort code%
 
;Actually supported: S, D, V, C, E, P
 
OBJECTTYPE      = Return S
 
  
[SYSTEMFIELDS]
+
== [GLOBAL] ==
; Generate a Unique ID (SHA256) for the document
+
Pay attention that these fields are available in all sections. Technically The reading process is 1. System fields 2. Reference fields and then global
_TMP_PROT              = Protokoll "Creating Unique ID for [file join \"D:/stratoz/data/\" %OrgFile%]"
+
OBJECTID        = Return %_TMP_OBJECTID%
_TMP_UniqueID          = ::sha2::sha256 -hex -filename [file join "D:/stratoz/data/" %OrgFile%]
+
OBJECTKIND      = Return "Invoice"
; In most cases you will have the full path to the import file in the csv. So simply use this.
+
Actually supported: S, D, V, C, E, P
;_TMP_PROT              = Protokoll "Creating Unique ID for %OrgFile%"
+
OBJECTTYPE      = Return S
;_TMP_UniqueID          = ::sha2::sha256 -hex -filename %OrgFile%
 
  
; Create the document if not present (based on the unique id which will be checked against Corsa) yet, otherways get a new doc id from Corsa
+
== [SYSTEMFIELDS] ==
; WebserviceCall CreateDocByQuery <ObjectKind> <ObjectId> <Query> <SystemFieldsList> <ReferenceFieldsList>
+
Generate a Unique ID (SHA256) for the document
_TMP_OBJECTID          = WebserviceCall CreateDocByQuery %Stuksoort code% *DUMMY* [list [list qrtReference dUnique qcAnd qoEqual %_TMP_UniqueID%]] [] [list [list dUnique %_TMP_UniqueID%]]
+
;_TMP_PROT              = LogMessage "Creating Unique ID for [file join \"D:/stratoz/data/\" %OrgFile%]"
; You will need this if you want to delete the newly created object when an error occours during the import process
+
;_TMP_UniqueID          = ::sha2::sha256 -hex -filename [file join "D:/stratoz/data/" %OrgFile%]
;_TMP_objectCreated  = CheckDefinition $::mapping::objectCreated
+
In most cases you will have the full path to the import file in the csv. So simply use this.
 +
_TMP_PROT              = LogMessage "Creating Unique ID for %OrgFile%"
 +
_TMP_UniqueID          = ::sha2::sha256 -hex -filename %OrgFile%
  
; Setting the system fields
+
Create the document if not present (based on the unique id which will be checked against Corsa) yet, otherways get a new doc id from Corsa
poststuk.reg_datum    = Return %Registratie datum%
+
  WebserviceCall ::CreateObject::DocumentByQuery <ObjectKind> <ObjectId> <Query> <SystemFieldsList> <ReferenceFieldsList>
poststuk.dat_poststuk = Return %Registratie datum%
+
  ;_TMP_OBJECTID          = WebserviceCall ::CreateObject::DocumentByQuery %Stuksoort code% *DUMMY* [list [list qrtReference dUnique qcAnd qoEqual %_TMP_UniqueID%]] [] [list [list dUnique %_TMP_UniqueID%]]
poststuk.onderwerp    = Return %Onderwerp%
+
You will need this if you want to delete the newly created object when an error occours during the import process
obj_doc.naam          = Return %Bestandnaam%
+
;_TMP_objectCreated   = CheckDefinition $::mapping::objectCreated
poststuk.afgehandeld   = Return %Afg%
 
  
; System fields which are not able to import within the Webservice can be found [[Importservice:unimportable|here]]
+
Setting the system fields
 +
poststuk.reg_datum    = Return %Registratie datum%
 +
poststuk.dat_poststuk  = Return %Registratie datum%
 +
poststuk.onderwerp    = Return %Onderwerp%
 +
obj_doc.naam          = Return %Bestandnaam%
 +
poststuk.afgehandeld  = Return %Afg%
  
[REFERENCEFIELDS]
+
System fields which are not able to import within the Webservice can be found [[unimportable|here]]
;Set the refference field in Corsa. Therefore an adjustment from CSV Data to Corsa required data is needed.
 
bouwdsr      = string map {Aanvraag "01 - Aanvraag" Vergunning "02 - Vergunning" Tekening "03 - Tekening" Overige "04 - Overig"} %Bouw document soort%
 
;Set the Unique ID and an Import Type Version
 
dUnique      = Return %_TMP_UniqueID%
 
;If you have the document id in your CSV you can generate the sha directly here
 
;dUnique      = ::sha2::sha256 -hex -filename %OrgFile%
 
dVersion    = Return "R2C 1.0"
 
  
[VARTAB]
+
== [REFERENCEFIELDS] ==
 +
Set the refference field in Corsa. Therefore an adjustment from CSV Data to Corsa required data is needed.
 +
;bouwdsr      = string map {Aanvraag "01 - Aanvraag" Vergunning "02 - Vergunning" Tekening "03 - Tekening" Overige "04 - Overig"} %Bouw document soort%
 +
Set the Unique ID and an Import Type Version
 +
;dUnique      = Return %_TMP_UniqueID%
 +
If you have the document id in your CSV you can generate the sha directly here
 +
dUnique      = ::sha2::sha256 -hex -filename %OrgFile%
 +
Import a Version of your configuration so you are able to adjust documents later easily by finding the Version
 +
;dVersion    = Return "Mappingversion 1.0"
  
[LINKS]
+
== [VARTAB] ==
;Real Estate
 
LINKOBJECTTYPE        = Return V
 
LINKOBJECTIDS          = Return %Vastgoed%
 
; Import list Vastgoed = "ID00001,ID00002"
 
;LINKOBJECTTYPE        = Return V
 
;LINKOBJECTIDS          = split %Vastgoed% \,
 
  
;Folder
 
LINKOBJECTTYPE        = Return D
 
LINKOBJECTIDS          = Return %Dossiers%
 
;Folder can be created if Foldertype is set to manual so we can set the folder id. Otherwise the folder can be created automaticly and linked to this document registration.
 
;LINKOBJECTTYPE        = Return "D"
 
;LINKOBJECTIDS        = WebserviceCall CreateFolder2 Bouw "%Dossiers%" [list [list dossier.dossier_oms "%Dossier titel%"]] {} {} {}
 
;Folder is linked to the id which is present in the csv
 
  
 +
== [LINKS] ==
 +
Real Estate
 +
Import list Vastgoed = "ID00001,ID00002"
 +
LINKOBJECTTYPE        = Return V
 +
LINKOBJECTIDS          = split %Vastgoed% \,
  
[UPLOAD]
+
Folder
;Folder structure must be set to the path of %Orgfile%. We do not generate a new version if the file is the same so always version 1 is set.
+
Folder is linked to the id which is present in the csv
NAT        = ErrorIfNotExists [file join "D:/stratoz/data/" %OrgFile%] 
+
Folder can be created if Foldertype is set to manual so we can set the folder id. Otherwise the folder can be created automaticly and linked to this document registration.
NATVERSION = Return 1
+
LINKOBJECTTYPE        = Return "D"
;Use the next available version
+
  LINKOBJECTIDS        = WebserviceCall CreateFolder2 Bouw "%Dossiers%" [list [list dossier.dossier_oms "%Dossier titel%"]] {} {} {}
;NATVERSION  = Return 0
 
NATMODE    = Return 0
 
;Damit Corsa nicht Jobs zur Erstellung der Archiv- OCR- TMBdatei erstellt  !RESEARCH!
 
;NATDSACTION = subst "-action NONE"
 
  
 +
== [UPLOAD] ==
 +
Use the next available version
 +
NATVERSION  = WebserviceCall ::DocVersion::NextVersion %OBJECTID%
 +
NATMODE    = Return 0
 +
You can also directly import the archive, ocr and thumbnail files
 +
NATDSACTION = subst "-action NONE"
 +
ARC        = ErrorIfNotExists %ArcFile%
 +
OCR        = ErrorIfNotExists %OcrFile%
 +
TMB        = ErrorIfNotExists %TmbFile%
  
;You can also directly import the archive, ocr and thumbnail files
+
== [POSTIMPORT] ==
;ARC        = ErrorIfNotExists %ArcFile%
 
;OCR        = ErrorIfNotExists %OcrFile%
 
;TMB        = ErrorIfNotExists %TmbFile%
 
  
[POSTIMPORT]
 
  
[OK]
+
== [OK] ==
  
[ERROR]
+
 
;If you do not use a unique id to identify the object, you should delete the object when an error occours during the import process and import again when problems are fixed!
+
== [ERROR] ==
 +
If you do not use a unique id to identify the object, you should delete the object when an error occours during the import process and import again when problems are fixed!
 
;CMD          = if {%_TMP_objectCreated%} {WebserviceCall Direct DeleteObject "%OBJECTTYPE%" "%_TMP_OBJECTID %"}
 
;CMD          = if {%_TMP_objectCreated%} {WebserviceCall Direct DeleteObject "%OBJECTTYPE%" "%_TMP_OBJECTID %"}

Aktuelle Version vom 27. Februar 2019, 10:22 Uhr

document_mapping.ini

[GLOBAL]

Pay attention that these fields are available in all sections. Technically The reading process is 1. System fields 2. Reference fields and then global

OBJECTID        = Return %_TMP_OBJECTID%
OBJECTKIND      = Return "Invoice"
Actually supported: S, D, V, C, E, P
OBJECTTYPE      = Return S

[SYSTEMFIELDS]

Generate a Unique ID (SHA256) for the document

;_TMP_PROT              = LogMessage "Creating Unique ID for [file join \"D:/stratoz/data/\" %OrgFile%]"
;_TMP_UniqueID          = ::sha2::sha256 -hex -filename [file join "D:/stratoz/data/" %OrgFile%]
In most cases you will have the full path to the import file in the csv. So simply use this.
_TMP_PROT              = LogMessage "Creating Unique ID for %OrgFile%"
_TMP_UniqueID          = ::sha2::sha256 -hex -filename %OrgFile%

Create the document if not present (based on the unique id which will be checked against Corsa) yet, otherways get a new doc id from Corsa

 WebserviceCall ::CreateObject::DocumentByQuery <ObjectKind> <ObjectId> <Query> <SystemFieldsList> <ReferenceFieldsList>
;_TMP_OBJECTID          = WebserviceCall ::CreateObject::DocumentByQuery %Stuksoort code% *DUMMY* [list [list qrtReference dUnique qcAnd qoEqual %_TMP_UniqueID%]] [] [list [list dUnique %_TMP_UniqueID%]]

You will need this if you want to delete the newly created object when an error occours during the import process

;_TMP_objectCreated   = CheckDefinition $::mapping::objectCreated

Setting the system fields

poststuk.reg_datum     = Return %Registratie datum%
poststuk.dat_poststuk  = Return %Registratie datum%
poststuk.onderwerp     = Return %Onderwerp%
obj_doc.naam           = Return %Bestandnaam%
poststuk.afgehandeld   = Return %Afg%

System fields which are not able to import within the Webservice can be found here

[REFERENCEFIELDS]

Set the refference field in Corsa. Therefore an adjustment from CSV Data to Corsa required data is needed.

;bouwdsr      = string map {Aanvraag "01 - Aanvraag" Vergunning "02 - Vergunning" Tekening "03 - Tekening" Overige "04 - Overig"} %Bouw document soort%

Set the Unique ID and an Import Type Version

;dUnique      = Return %_TMP_UniqueID%

If you have the document id in your CSV you can generate the sha directly here

dUnique      = ::sha2::sha256 -hex -filename %OrgFile%

Import a Version of your configuration so you are able to adjust documents later easily by finding the Version

;dVersion     = Return "Mappingversion 1.0"

[VARTAB]

[LINKS]

Real Estate 
Import list Vastgoed = "ID00001,ID00002"
LINKOBJECTTYPE         = Return V
LINKOBJECTIDS          = split %Vastgoed% \,
Folder
Folder is linked to the id which is present in the csv
Folder can be created if Foldertype is set to manual so we can set the folder id. Otherwise the folder can be created automaticly and linked to this document registration.
LINKOBJECTTYPE        = Return "D"
LINKOBJECTIDS         = WebserviceCall CreateFolder2 Bouw "%Dossiers%" [list [list dossier.dossier_oms "%Dossier titel%"]] {} {} {}

[UPLOAD]

Use the next available version
NATVERSION  = WebserviceCall ::DocVersion::NextVersion %OBJECTID%
NATMODE     = Return 0
You can also directly import the archive, ocr and thumbnail files
NATDSACTION = subst "-action NONE"
ARC         = ErrorIfNotExists %ArcFile%
OCR         = ErrorIfNotExists %OcrFile%
TMB         = ErrorIfNotExists %TmbFile%

[POSTIMPORT]

[OK]

[ERROR]

If you do not use a unique id to identify the object, you should delete the object when an error occours during the import process and import again when problems are fixed!
CMD = if {%_TMP_objectCreated%} {WebserviceCall Direct DeleteObject "%OBJECTTYPE%" "%_TMP_OBJECTID %"}