0 Replies Latest reply: Feb 16, 2010 7:29 PM by Jim Beierschmitt RSS

    external program task dependency - error vs. warning conditions

    Jim Beierschmitt

      I need to demonstrate through testing that there are controls in QlikView 9.0 to ensure that successful task execution is a prerequisite for a Publisher Task using the task dependency functionality.

      I'm having a problem with the External Program task - I can introduce an error in the cmd statement, however the QlikView Publisher only reports this as a warning message (references the non-zero exit code in the log file).

      Is there a means to have this trigger show as an Error instead of a Warning?

      example cmd (false file name is the intended error):

      xcopy "\\sdnetapp02\qview\dev\OQ Tests\QlikView OQ Source Documents\8.1.4 Revenue Analytics v34.qvw" "\\sdnetapp02\qview\dev\OQ Tests\QlikView OQ Source Documents\ExternalProgram\"/q/f/y/
      :exit

      LogFile:
      2/16/2010 15:18:24.1565037 Information Executing ClusterID=1, QDSID=cbaa2988-3544-0156-7c58-3e79e4ceea15QDSMain.ExternalProgramTask
      2/16/2010 15:18:24.1565037 Information Starting task "UT_QV_002_05_ExternalProgram_Failure" (Attempt 1 of 1)
      2/16/2010 15:18:24.1565037 Information Max run time: 1.00:00:00
      2/16/2010 15:18:24.1565037 Information Executing "\\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers\UT_QV_002_05_ExternalProgram_Failure.cmd"
      2/16/2010 15:18:24.1565037 Information Executing commandline: "\\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers\UT_QV_002_05_ExternalProgram_Failure.cmd" in folder "\\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers".
      2/16/2010 15:18:24.2658822 Warning Process exited with non zero exit code: 4 at 2/16/2010 3:18:24 PM
      2/16/2010 15:18:24.2658822 Information Process exited with exit code: 4 at 2/16/2010 3:18:24 PM
      2/16/2010 15:18:24.2658822 Warning The task "UT_QV_002_05_ExternalProgram_Failure" finished with warnings. WarningCount=1

       

      Exit Codes for Xcopy:

      0 - Files were copied without error
      1 - No files were found to copy
      2 - The user pressed Ctrl+C to terminate xcopy
      4 - Various errors including insufficient memory or disk space, an invalid drive name or invalid syntax
      5- Disk write error occurred

      I know that I could perform an External Program via a qvw, however I want to demonstrate the External Program as a Task Dependency. \

      As it is currently set up the warning will not trigger the task dependency function does not interrupt task execution.

      2/16/2010 15:24:41.5592052 Information Executing ClusterID=1, QDSID=cbaa2988-3544-0156-7c58-3e79e4ceea15QDSMain.DistributeTask
      2/16/2010 15:24:41.5592052 Information Starting task "UT_QV_002_05_NEGATIVE_ExternalProgramDependency" (Attempt 1 of 1)
      2/16/2010 15:24:41.5592052 Information Max run time: 1.00:00:00
      2/16/2010 15:24:41.5592052 Information Task Dependencies found. TaskNames=UT_QV_002_05_ExternalProgram_Failure
      2/16/2010 15:24:41.5592052 Information Document is marked for refresh; Initializing Reload.
      2/16/2010 15:24:41.5904562 Information Opening "\\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers\UT_QV_002_05_NEGATIVE_ExternalProgramDependency.qvw"
      2/16/2010 15:24:41.6060817 Information Allocating QlikView Engine
      2/16/2010 15:24:41.6060817 Information Allocating new QlikView Engine. Current usagecount=1 of 4
      2/16/2010 15:24:41.6060817 Information An instance of the QlikView Engine is being created
      2/16/2010 15:24:41.6060817 Information Starting QlikView Engine
      2/16/2010 15:24:42.3404802 Information The QlikView Engine was started successfully. Version=9.00.7320.7, ProcessID=676
      2/16/2010 15:24:42.3404802 Information Allocated QlikView Engine successfully. Current usagecount=1 of 4, Ticket=944
      2/16/2010 15:24:42.3873567 Information Loading document "\\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers\UT_QV_002_05_NEGATIVE_ExternalProgramDependency.qvw" (17.06 Mb)
      2/16/2010 15:24:43.3405122 Information Loading. LoadTime=00:00:01.0000320
      2/16/2010 15:24:45.3405762 Information Loading. LoadTime=00:00:03.0000960
      2/16/2010 15:24:46.0593492 Information Physical FileSize=17.06 Mb. Memory Allocation Delta for this file=79.45 Mb. Available Physical Memory Before Open=11283.77 Mb. Available Physical Memory After Open=11210.47 Mb. Total Physical Memory=16127.55 Mb.
      2/16/2010 15:24:46.0593492 Information The document was loaded successfully.
      2/16/2010 15:24:46.0906002 Information Initializing Checkout (0), Loading document (734), Initializing load (734), Checking read (734), Creating QlikView Engine (781), Checking Size (859), Load (859), Load Completed (2828), Tables read (4421), Opened successfully (4453)
      2/16/2010 15:24:46.0906002 Information Document was opened successfully
      2/16/2010 15:24:46.0906002 Information Opened successfully (0)
      2/16/2010 15:24:46.0906002 Information Starting reload
      2/16/2010 15:24:46.1062257 Information QlikView->Settings->Document Peferences->Generate Logfile in document is set. Enabling Log Copier.
      2/16/2010 15:24:46.1062257 Information The Source Document is being reloaded. DocumentPath=\\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers\UT_QV_002_05_NEGATIVE_ExternalProgramDependency.qvw
      2/16/2010 15:24:46.1062257 Information Waiting for the document log "\\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers\UT_QV_002_05_NEGATIVE_ExternalProgramDependency.qvw" to become available..
      2/16/2010 15:24:46.1687277 Information Found a document log. FileName=\\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers\UT_QV_002_05_NEGATIVE_ExternalProgramDependency.qvw.log
      2/16/2010 15:24:46.1687277 Information Writing documentLog to C:\ProgramData\QlikTech\Publisher\QlikView Distribution Service\1\Log\20100216\152441 - UT_QV_002_05_NEGATIVE_ExternalProgramDependency\DocumentLog.txt
      2/16/2010 15:24:47.1062577 Information Reloading.
      2/16/2010 15:24:48.1219152 Information Reloading..
      2/16/2010 15:24:49.1219472 Information Reloading...
      2/16/2010 15:24:50.1219792 Information Reloading....
      2/16/2010 15:24:51.1220112 Information Reloading.....
      2/16/2010 15:24:52.1220432 Information Reloading......
      2/16/2010 15:24:53.1220752 Information Reloading.......
      2/16/2010 15:24:53.5127127 Information The Source Document reload complete. DocumentPath=\\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers\UT_QV_002_05_NEGATIVE_ExternalProgramDependency.qvw
      2/16/2010 15:24:53.5127127 Information Memory Allocation Delta for this file=63.02 Mb. Available Physical Memory Before Reload=11209.54 Mb. Available Physical Memory After Reload=11152.29 Mb. Total Physical Memory=11152.29 Mb.
      2/16/2010 15:24:53.6533422 Information The Source Document was reloaded successfully.
      2/16/2010 15:24:53.7314697 Information Initializing Reload (0), Finished (7641)
      2/16/2010 15:24:53.7314697 Information Reload finished successfully.
      2/16/2010 15:24:53.7314697 Information Saving document
      2/16/2010 15:24:57.2315817 Information Initializing save (0), Copying permissions to new file (0), Saving \\sdnetapp02\qview\dev\OQ Tests\UT_QV_002_05_QlikView Publisher Triggers\bf97be61-0a37-4353-ba13-135e30976e54_UT_QV_002_05_NEGATIVE_ExternalProgramDependency.qvw.tmp (0), Moving temp file to new file (3468), Deleting old file (3484)
      2/16/2010 15:24:57.2472072 Information Closing the document.
      2/16/2010 15:24:57.6065937 Information Closed the QlikView Engine successfully. ProcessID=676
      2/16/2010 15:24:57.6065937 Information Initializing (0), Finished (375)
      2/16/2010 15:24:57.6065937 Information Reload completed successfully.
      2/16/2010 15:24:57.6065937 Information The task "UT_QV_002_05_NEGATIVE_ExternalProgramDependency" finished successfully


      Any ideas or suggestions?

       

      Jim