There are two ways you can perform an import of items to the module:
Manually, by importing the XML file in the Import Settings in the System
Running the Scheduler jobs
Field Import job can be set up to mass-create items in the module by importing XML file, containing the data in tags representing fields in the module.
Field import job is widely used in briefing systems to import products.
No matter how the import is performed in the module, tags in the XML template should be mapped to the corresponding fields in the module.
For running Import job with the help of scheduler, the Run Import Scheduled check box should be selected in Import Settings.
As XML files are used as means of transferring data between different systems (e.g. between two different ERP systems), the format of data of the file exported from one system may not be suitable for import to the other system.
In order to handle this problem, XML adjusters can be used. XML Adjusters perform pre-processing of the XML file and make it suitable for import into the system.
For example: Format of dates in the exported XML may be different from the Date format specified in the system to which XML will be imported.
To use adjusters for import, specify the name of the Adjuster class in the Import Settings of the module.
Along with XML adjusters, you can use action classes that can perform certain actions, for example, create the new XML file with the adjusted values after import.
In order to use action class, it should be specified in the corresponding field in Import Settings of the module.
Parameter | Description |
---|---|
joblist=fieldImport | Name of the job that will perform an import of the items to the module from the xml. |
job.fieldImport.moduleIds | Specifies the modules for which scheduled task will evaluate the need to execute configured field imports. If not specified, schedule task will evaluate the need to execute configured field imports for all active modules on the site |
job.fieldImport.type=dk.encode.ebms.scheduler.FieldImportJob | The name of the class that performs scheduled import. |
job.fieldImport.interval | The interval in seconds at which import job will be re-run. If not specified the job will run every 60 seconds |
job.fieldImport.param.SiteID | Id of the site for which import job will be performed. |
job.fieldImport.param.dropdir= ../Files/ModuleRoot/{ModuleID}/Import | Directory on the file system to which xml file for import will be placed and picked up from. Instead of the {ModuleID} placeholder specify the ID of the module to which items from the XML will be imported. |
job.fieldImport.param.backupdir=../Files/ModuleRoot/{ModuleID}/ImportLog | The directory on file system to which xml file after import will be placed. Instead of the {ModuleID} placeholder specify the ID of the module to which items from the XML will be imported. |
If the Field Import Job fails for some reason, the Error folder will be automatically created in ../Files/ModuleRoot/{ModuleID}/
directory to which failed XML will be placed.
If import job is completed successfully, the XML file will be placed to the ../Files/ModuleRoot/{ModuleID}/Import
folder.
Note! Specified directories and folders should exist on the file system.