Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
Not applicable

Can the Script set a "Failed Completion" flag to cause Publisher not to launch another task?

I have two tasks in series. Task "A" needs to successfully complete before Task "B" will start.

Task "A" has code which will check for a condition and will halt the rest of the script to run BUT in the eyes of Publisher the task was successful in completing.

Therefore is there a way to force the completion flag to set to "Failed" even though the task was successful. One though is to include a "bug" in the script which will cause the task to fail on that condition. The issue there is Publisher will now send an alert email on each failure (task runs every 5 minutes). Not a suitable solution.

Any thoughts?

3 Replies
Not applicable

Can the Script set a "Failed Completion" flag to cause Publisher not to launch another task?

I'm trying to figure out the same thing. Let me know if you succeed (at failure)... :-)

prieper
Honored Contributor II

Can the Script set a "Failed Completion" flag to cause Publisher not to launch another task?

I do not know, which logic is behind the publisher, but you may always set the variables to a value other than "0", e.g.

SET ScriptErrorCount = 1;

and then try with the publisher.

HTH
Peter

Not applicable

Can the Script set a "Failed Completion" flag to cause Publisher not to launch another task?

Code bellow will trigger a failure. Just announce your colleagues, name the job with "may fail" and put comments.


IF (condition) then
LOAD * FROM inexistent.qvd ;
END IF
<div>




Community Browser