Examples:document mapping.ini: Unterschied zwischen den Versionen
Hebel (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „; Records2Corsa [GLOBAL] ; Pay attention that these fields are available in all sections. Technically The reading process is 1. System fields 2. Reference fie…“) |
Hebel (Diskussion | Beiträge) |
||
| Zeile 1: | Zeile 1: | ||
| − | |||
| − | |||
[GLOBAL] | [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 | ; Pay attention that these fields are available in all sections. Technically The reading process is 1. System fields 2. Reference fields and then global | ||
| Zeile 11: | Zeile 9: | ||
[SYSTEMFIELDS] | [SYSTEMFIELDS] | ||
| − | ;Generate a Unique ID (SHA256) for the document | + | ; Generate a Unique ID (SHA256) for the document |
_TMP_PROT = Protokoll "Creating Unique ID for [file join \"D:/stratoz/data/\" %OrgFile%]" | _TMP_PROT = Protokoll "Creating Unique ID for [file join \"D:/stratoz/data/\" %OrgFile%]" | ||
_TMP_UniqueID = ::sha2::sha256 -hex -filename [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. | + | ; In most cases you will have the full path to the import file in the csv. So simply use this. |
;_TMP_PROT = Protokoll "Creating Unique ID for %OrgFile%" | ;_TMP_PROT = Protokoll "Creating Unique ID for %OrgFile%" | ||
;_TMP_UniqueID = ::sha2::sha256 -hex -filename %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 | + | ; 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 CreateDocByQuery <ObjectKind> <ObjectId> <Query> <SystemFieldsList> <ReferenceFieldsList> | ; WebserviceCall CreateDocByQuery <ObjectKind> <ObjectId> <Query> <SystemFieldsList> <ReferenceFieldsList> | ||
_TMP_OBJECTID = WebserviceCall CreateDocByQuery %Stuksoort code% *DUMMY* [list [list qrtReference dUnique qcAnd qoEqual %_TMP_UniqueID%]] [] [list [list dUnique %_TMP_UniqueID%]] | _TMP_OBJECTID = WebserviceCall CreateDocByQuery %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 | + | ; 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 | ;_TMP_objectCreated = CheckDefinition $::mapping::objectCreated | ||
| Zeile 31: | Zeile 29: | ||
poststuk.afgehandeld = Return %Afg% | poststuk.afgehandeld = Return %Afg% | ||
| − | ; System fields which are not able to import within the Webservice | + | ; System fields which are not able to import within the Webservice can be found [[Importservice:unimportable|here]] |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
[REFERENCEFIELDS] | [REFERENCEFIELDS] | ||
Version vom 12. August 2016, 06:48 Uhr
[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 = %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]
- Generate a Unique ID (SHA256) for the document
_TMP_PROT = Protokoll "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 = Protokoll "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 CreateDocByQuery <ObjectKind> <ObjectId> <Query> <SystemFieldsList> <ReferenceFieldsList>
_TMP_OBJECTID = WebserviceCall CreateDocByQuery %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%
dVersion = Return "R2C 1.0"
[VARTAB]
[LINKS]
- 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
[UPLOAD]
- 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.
NAT = ErrorIfNotExists [file join "D:/stratoz/data/" %OrgFile%] NATVERSION = Return 1
- Use the next available version
- NATVERSION = Return 0
NATMODE = Return 0
- Damit Corsa nicht Jobs zur Erstellung der Archiv- OCR- TMBdatei erstellt !RESEARCH!
- NATDSACTION = subst "-action NONE"
- You can also directly import the archive, ocr and thumbnail files
- 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 %"}