Process service stops when external script fails

  • 211 Views
  • Last Post 01 March 2019
  • Topic Is Solved
Steph posted this 27 February 2019

Hello,

With Capture & Store v4.10 64bits, when a workflow contains an external script which fail, the process service stops and then all workflows stop.

Then a manual service restart is needed.

 

In Capture and store v4.9 32bits, with the same script, the workflows fails but the service still runs and other workflows are not impacted.

In the 4.9, the log file show where the error is.

 

4.10 error log:

2019-02-26 16:05811 | Detailed | Loading watch folder: wm_0
2019-02-26 16:058:467 | Detailed | Workflow 'script zip' has some work to do, starting process.
2019-02-26 16:058:482 | Detailed | Workflow 'script zip' start (ThreadID: 5)
2019-02-26 16:058:498 | Detailed | Loading watch folder: wm_0
2019-02-26 16:058:498 | Detailed | Found 1 total files to process for this session
2019-02-26 16:058:498 | Detailed | Found a file to process: C:\WatchFolder\script zip\Document 18-11-06 10.59.19.071.pdf
2019-02-26 16:058:498 | Information | Creating backup of original file
2019-02-26 16:058:498 | Information | Starting workflow process on the document (script zip)
2019-02-26 16:058:514 | Debug | Loading Imaging engine
2019-02-26 16:058:560 | Debug | Loading Imaging engine succeeded.
2019-02-26 16:058:560 | Information | Document format: RasPdf
2019-02-26 16:058:904 | Detailed | Found 1 total triggers
2019-02-26 16:058:904 | Debug | BuildProcessPath>> End module: wm_1 [Windows File System]
2019-02-26 16:058:904 | Debug | BuildProcessPath>> wm_1 --> wm_0 [Watch Folder] @@ [wm_1,]
2019-02-26 16:058:904 | Detailed | Found '1' document paths
2019-02-26 16:058:904 | Detailed | Travelling path #'1'
2019-02-26 16:058:920 | Debug | Executing path, source: wm_0, target: wm_1
2019-02-26 16:058:935 | Detailed | Executing trigger, id: 76, type: tr_SCRIPT
2019-02-26 16:059:717 | Detailed | Executing script

At this moment the process service is down, and all workflows stopped.

 

 

4.9 error log (with same script as 4.10 workflow)

2019-02-26 17:09:4212 | Detailed | Loading watch folder: wm_0
2019-02-26 17:09:4259 | Detailed | Found 1 total files to process for this session
2019-02-26 17:09:4259 | Detailed | Found a file to process: C:\WatchFolder\test script zip\SeparateurZocr.pdf
2019-02-26 17:09:4275 | Information | Creating backup of original file
2019-02-26 17:09:4275 | Information | Starting workflow process on the document (test script zip)
2019-02-26 17:09:4275 | Debug | Loading Imaging engine
2019-02-26 17:09:4290 | Debug | Loading Imaging engine succeeded.
2019-02-26 17:09:4290 | Information | Document format: RasPdf
2019-02-26 17:09:42:406 | Detailed | Found 1 total triggers
2019-02-26 17:09:42:406 | Debug | BuildProcessPath>> End module: wm_1 [Windows File System]
2019-02-26 17:09:42:422 | Debug | BuildProcessPath>> wm_1 --> wm_0 [Watch Folder] @@ [wm_1,]
2019-02-26 17:09:42:422 | Detailed | Found '1' document paths
2019-02-26 17:09:42:422 | Detailed | Travelling path #'1'
2019-02-26 17:09:42:422 | Debug | Executing path, source: wm_0, target: wm_1
2019-02-26 17:09:42:437 | Detailed | Executing trigger, id: 1, type: tr_SCRIPT
2019-02-26 17:09:42:437 | Detailed | Executing script
2019-02-26 17:09:42:468 | Error | An error occurred at  | line 8, column 0: 424 | Objet requis: 'wscript'
2019-02-26 17:09:42:468 | Information | Trigger condition not validated, further path processing will be skipped
2019-02-26 17:09:42:484 | Information | Finished workflow process on the document (test script zip)
2019-02-26 17:09:42:484 | Debug | Unloading Imaging engine
2019-02-26 17:09:42:484 | Detailed | Cleaning workflow process files and folders (test script zip)
2019-02-26 17:09:42:593 | Detailed | Workflow 'test script zip' end
2019-02-26 17:10:12:640 | Detailed | Loading watch folder: wm_0
2019-02-26 17:10:42:766 | Detailed | Loading watch folder: wm_0

An information about the error in the script is showed and other workflows are still running.

 

 

What is the reason the this different behaviour between 4.9 and 4.10?

 

Best regards

Stéphane

 

PS: The script works correctly out of Capture and store

Order By: Standard | Newest | Votes
luigi.zurolo posted this 28 February 2019

Hi Steph,

the script engine is exactly the same between 4.9 and 4.10, so no difference.

However the only difference existing is between the 32bits and 64bits versions of the software (also in 4.9). This because VBS component is not natively available by Microsoft in 64bits so wrapped inside a so called "COM" component in order to be able to call the Microsoft Script engine which is always available only in 32bits.

Due to this technical mechanism the errors are not transferred and there will be always a generic COM error logged into the process logs (no crashes).

We do suggest to double check all script syntax when using 64bits platforms to avoid to generate any error conditions which might get skipped when using the 32bits flavor, for example a null or not initialized object. This last example is skipped in the 32bits version while enforced in 64bits.

About the crash that might be possible due to interactive operations which are always denied by Windows in any service. The fact that the script runs out of Capture & Store doesn't mean that it is technically correct to run inside a Windows service because running it as a user it will allow, instead, interactive actions.

I suggest you double check the script syntax because there is for sure something not fully correct. If you want you can send the script to our support and we can check it for you.

 

Luigi

Steph posted this 01 March 2019

Hi Luigi,

 

Thank you for explanation.

 

Best regards

 

Stéphane

Close