WaitforFileActivity-------OK------>>>JOB1
| |
| V
|---------Failure(Timeout)->>> Sequencer(Any)------>>JOB2
So, whenever it finds a file it needs to run JOB1 and if it timeouts waiting for the file it needs to run JOB2. Now, whenever it timeouts, the Jobsequence finished with warnings(with Status=2 or Finished(Seelog)).
Is there a way I can avoid those warnings because even if it time outs I need JOB2 to run. Any guidance could be of great help.
JOB2 runs either ways--if the file is found or if WaitforFileActivity timeouts( Since Sequencer is set to ANY). But when it timeouts, My Jobsequence finishes with Warnings. I dont want that to happen. Is there a way I could avoid it.
I highly doubt it Kris. Let me make a little bit of more research, but i dont think you can demote a warning to an informational message in server. I know this can be done in PX, but not in server.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Ok.. is it possible to avoid it with the above Job design? Any inputs would be great because everytime my Sequence finishes successfully, technically it still finishes with warnings.
Not sure off the top of my head. I'd need to experiment and unfortunately I don't have time to do that right now. Perhaps later tonight I can, but right now anyone else is welcome to take a whack at this.
-craig
"You can never have too many knives" -- Logan Nine Fingers
O wow. I just wrote a unix script for you. Right before posting i saw that your server is windows. I hate it when this happens.
Sorry buddy, if you were on unix, i could have sent you a script to achieve the same functionality as wait for file activity but since you are on windows, i cant help you much there. If you know how to write batch jobs, i can tell you the logic.
Anyways.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
You can try adding your sequence job to the job control of a new server job and then modify the job control to restrict the warnings.
I'm not really sure that it will work. but you can give it a shot.
Thanks,
Naveen.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
#!/usr/bin/ksh
#time is the session timeout period in seconds.
time=$1
integer i
i=0
while [ $i != $time ]
do
if [ -f /cgiproducer_dw/Conversion/Temp/M.txt ]
then
i=10
echo 'File Found'
exit 1
else
sleep 1
i=i+1
echo 'File Not Found'
fi
done
exit 0
In your job design, you will replace the wait for file activity with Execute Command stage. Call the script from there (in your case the batch job).
Have two links coming out of it.
IF file is found then linkA else after timeout, linkB
In the triggers the expression type for linkA will Return Code and the expression will be 1
For the other link also the same, the expression will be 0.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
What exactly IS the warning that is logged? Is it, in fact, from the WaitForFile activity at all, or from some other part of the job sequence? Have you investigated this fully?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.