NewPeriodicTask2
Lee D Papworth
3-10-19
I have been using NewPeriodicTask2 to import xml files for a number of different customers without any issues.

I have a customer who uses the background task feature to import tab delimited order files. I am wanting to convert them from this and use NewPeriodicTask2 so the imports are not running on the main thread.

However when I attempt to open the file to read and process it I get this error:

2019-03-08 17:53:36 /THREAD(2) Auto Import Orders - Begin
2019-03-08 17:53:36 /THREAD(2) Processing goporder036726050.txt
2019-03-08 17:53:36 /THREAD(2) ERROR: Opening an import file from non-main thread: D:\GalaxyImport\goporder036726050.txt
2019-03-08 17:53:36 /THREAD(2) dump of call stack
2019-03-08 17:53:36 /THREAD(2) 0D27C871 + 1581 halcust\Tools\GOProcess.hal: (no function )
2019-03-08 17:53:36 /THREAD(2) dumping stack due to ERROR: Opening an import file from non-main thread: D:\GalaxyImport\goporder036726050.txt
2019-03-08 17:53:36 /THREAD(2) --------------------------------------------------
2019-03-08 17:53:36 /THREAD(2) 0 0x00754BF3 - 0x0000000000000000
2019-03-08 17:53:36 /THREAD(2) 1 0x00534D88 - 0x0000000000000000
2019-03-08 17:53:36 /THREAD(2) 2 0x006061FD - 0x0000000000000000
2019-03-08 17:53:36 /THREAD(2) 3 0x007053BA - 0x0000000000000000
2019-03-08 17:53:36 /THREAD(2) 4 0x006F02E2 - 0x0000000000000000
2019-03-08 17:53:36 /THREAD(2) 5 0x006F16E9 - 0x0000000000000000
2019-03-08 17:53:36 /THREAD(2) 6 0x006EDF55 - 0x0000000000000000
2019-03-08 17:53:36 /THREAD(2) 7 0x0068C3C8 - 0x0000000000000000
2019-03-08 17:53:36 /THREAD(2) 8 0x77648484 BaseThreadInitThunk - 0x0000000077648460
2019-03-08 17:53:36 /THREAD(2) 9 0x77A541C8 RtlAreBitsSet - 0x0000000077A54140
2019-03-08 17:53:36 /THREAD(2) 10 0x77A54198 RtlAreBitsSet - 0x0000000077A54140
2019-03-08 17:53:36 /THREAD(2) --------------------------------------------------
2019-03-08 17:53:36 /THREAD(2) 8549001531
2019-03-08 17:53:36 /THREAD(2) ERROR: Closing an import file from non-main thread

With xml files I do not open them but use the ParseXMLFile command.

I have rechecked my code and everything is all correct. It just seems I cannot open them as I normally would when I use the NewPeriodicTask2 command.

Customer is currently running 8.2 2016-12-18 (build 82211904) I am in the middle of migrating them to 8.5 and would like to get this resolved as part of the migration.

Any ideas?

Thanks


Lee Papworth
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
Carolina Valentino
are the activity set as Hansamanuals said? https://www.hansamanuals.com/main/mailnumber___62526/theconf___231/manuals/version___20250224/langcode___es/hwconvindex.htm?shortcode=HW0301SETTINGS_Order...
17:20 4 Apr 2025
Paul Timms
SendWebRequest3 is a boolean function, so if this returns true and the reply header has an accepted status, you can assume that the data was sent successfully and perform some actions on the record th...
11:12 4 Apr 2025