Page 1 of 1

Sequencer design

Posted: Thu Nov 05, 2015 1:35 pm
by sam334
All, Need a help in sequencer design. I have a sequencer,

Job Activity----Execute Command---Wait For File Activity-- Job Activity2

Basically, when after Job1 is completed there is a batch file which count the rows through execute command. If rows >100 then the batch file creates a blank.txt file- after Wait file will wait for the file and trigger Job2.

Now issue is if the count is <100 then the blank.txt file wont generate and wait activity will wait for 10 mints then abort.

What should we do if we dont want to abort the job. I mean, wait file activity will wait for 10 mints and then the sequencer should finish but Job2 should not trigger.

Can we use exception handling or terminator activity.

Thanks.

Posted: Thu Nov 05, 2015 3:35 pm
by ray.wurlod
Designing a Sequencer is simple; you have only one choice, whether to run it in Any mode or All mode.

Your question is about a Sequence.

Take an extra trigger from your Execute Command activity to handle the <100 case. Take this to an Any Sequencer. Take an unconditional trigger from JobActivity2 to the same Sequencer. Done.

Posted: Thu Nov 05, 2015 5:13 pm
by Mike
Kind of a waste to create and wait for a dummy file... and I suppose you need to clean up that dummy file before your next cycle.

A simpler design is to have the executed command write the row count to stdout and then put a Nested Condition activity after it to direct flow based on the row count in the command's output.

Mike

Posted: Fri Nov 06, 2015 10:23 am
by sam334
Thanks a lot. But kind of stuck here.

So, we have ,

JOB ACTIVTTY1--EXECOMMAND---Nester Condition--JobActivity2

In Execute command we have the batch script and output is 12000 (count)--Trigger is Ok conditional.

Then in Nested condition, Custom(Conditional)-Trim(Execute_Command_1.$CommandOutput)>1000.. Do I need to use IF conditions here? If $CommandOutput)>1000 then go to Job2 else $commandoutput.

Thanks.

Posted: Fri Nov 06, 2015 10:24 am
by kduke
You do not have to use an exception handler. You can execute a failed link which all it does is go straight to last sequencer before the end. Then Job2 never executes and it does not abort. You can have as many links as you want coming after a job or a wait for file. Each with there own status. Normally all people do is a link on job ok status then let the exception handler handle everything else. You can add another link for warnings or failed or whatever combination you want. Very useful.

Posted: Fri Nov 06, 2015 12:59 pm
by sam334
Worked. Thanks all a lot.