Developer forum

Forum » Integration » Order provider exports orders twice

Order provider exports orders twice

Espen Strømsnes
Reply

I have an integration job where I use the Order provider as the source with the following settings:
- Export not yet exported Orders = false
- Only export orders without externalId = true
- Do not export carts = true
- Order state after export = Leave unchanged

Mappings are created at runtime.

The destination is an XML provider with the following settings:
- Destination XSL file = Nothing selected
- Destination file = DW_order_.xml
- Destination folder = /Files/Integration/output/DW_Order_export
- Destination encoding = UTF8
- Include timestamp in filename = true
- Skip troublesome rows = true
- Export Product Field definitions = false
- Number format culture = None

I have a DW scheculed task that triggers the export job every 15 minutes.

The case is that on every run of the integration job, two files are generated!

The initial 2 files generated by the first execution of the export job after an order has been registered has the following filenames:
DW_order_20161025-0850034458326.xml
DW_order_20161025-0850064146149.xml

The content is almost identical, the only difference is that in the first file (based on the timestamp) (DW_order_20161025-0850034458326.xml) the xml element OrderIsExported contains the value False. In the second file (generated a couple of seconds later) the xml element OrderIsExported contains the value True. Otherwise the files are identical.

Since the source provider has "Only export orders without externalid = true" the same order was exported 15 minutes later (when the scheduled task triggered the job). This is by intention, to ensure orders are exported from DW to ERP until transfer succeeds.
Once again, two files were generated but now they are identical (OrderIsExported = true) in both files.

Why are 2 files being generated on each run, and why are the content of the files different?

Dynamicweb is version 8.9.1.0

Best regards

Espen


Replies

 
Dmitriy Benyuk
Reply

HI Espen,
I wasn't even able to create the Order provider -> Xml provider job with automatic mapping, it was not possible as the xml provider doesn't have any schema tables with columns that can be matched with same names as in the Order provider. Maybe you have some batch integration functionality setup.

The two files can be generated because of the 2 times the Sheduled task is executed or data integration job 2 times executed. To find what was 2 times executed you need to check the logs:
Fo the scheduled task in the folder: Files\System\Log\ScheduledTasks
For the data integration: Files\System\Log\DataIntegration

Maybe you have some batch integration scheduled task? with setting "ExportIsDone" attribute?
Or check the activation url if you are using regular scheduled task, it should be like:
http://head.local.dynamicweb.dk/admin/public/webservices/integrationv2/JobRunnerBackground.aspx?logFile=order+export20161025-145932285529.log&jobsToRun=order+export&token=724c7362e2d602b0d339c67b6cf43bf0
so you need to check if your have just one job in the "jobsToRun="

Regards, Dmitrij

 

You must be logged in to post in the forum