Hi Support - before I dig myself into to deep a hole could you provide some advice on the best way to handle the following
Job x
read filenames
loop filenames
call job y
next
JOB y
LOOP 1 to 200
Read NODE from xml file loop - element/node (loop x value)
on error go to Set Var
Do something with output of read node
NEXT
Set var - reset job so returns OK if error was end of nodes
This is fine until the xpath runs out of elements to read - there are 3 in the test file
On loop 4 the read node returns 77777 with stderr of 'xpath found nothing'
What is the best way to cleanly trap this and exit the job so the next xml file can be processed
I am currently trying a goto on unhandled error for the read node task to a set variable task as the last task in the job
This task tries to reset the exit code for the job to zero if the exit code of the read node task was 77777 and the stderr output was 'xpath found nothing'
But this doesn't seem to be working - it jumps to the last task but doesn't clear the exit code - seems to create a uservar called '77777'
this refers to the read node task
{TASK(159ed169-9cb2-4c69-b158-3c7f63e6f03b,ExitCode)}
and I set it to zero creates avariable calleed '77777'
I also tried setting the job exit code to zero
{JOB(2fdec01a-1ec9-4127-9a5b-b21d8d8accd6|ExitCode)}
But at this point seems to be zero and I create a variable called '0'
I have attached a pic of the set var screen - this is a variable I am trying to set so I shouldn't set the translate to constant when trying to set it ?
What i want to achieve is a clean - zero exit code for the job when the read node hits end of file. So that the VC sequence does not abort and just reads the next filename and calls the sub job again.
Thanks
Brett.
Edited by user
2012-06-26T04:10:30Z
|
Reason: Not specified
Brett attached the following image(s):