Page 1 of 1

How to abort master sequnce if child sequnece aborts

Posted: Tue Dec 07, 2010 10:58 am
by palak08
Hi,

I have a sequnece which is calling 5 inner sequences.

For each inner sequence I have coded-

Code: Select all

If sequence fails then send email else go to next sequence.
Now Can I send abort status to master sequence if inner sequnece fails in this scenario?

Posted: Tue Dec 07, 2010 2:43 pm
by major
As per your code the master sequence will not be aboeted since you are handling the abort of inner sequence in form of a email.
If you check the Log Warnings check box in master sequence , you will get a warining message whenever your inner sequence si finished with status other than ok.

Posted: Tue Dec 07, 2010 2:49 pm
by major
Or unhandle the child sequence abort by removing the failure email, thus your master sequence will get aborted whenever your child sequence aborts

Posted: Tue Dec 07, 2010 3:07 pm
by palak08
So if I send email in case of failure then master sequence will never show as aborted. In that case I will not have restartability feature for this sequence.

Note: Inner and outer , both sequences send mail in case of failure.

Posted: Tue Dec 07, 2010 3:41 pm
by major
palak08 wrote:So if I send email in case of failure then master sequence will never show as aborted. In that case I will not have restartability feature for this sequence.
Yes , I think restartability will work only if a sequnce aborts not in other cases

Posted: Tue Dec 07, 2010 3:44 pm
by ray.wurlod
You could follow the Notification activity with a Terminator to force the sub-sequence to abort. But you don't really need to - the parent sequence can detect if a sub-sequence finished with warnings, and can (be programmed to) react accordingly.

Posted: Tue Dec 07, 2010 7:17 pm
by chulett
major wrote:Yes , I think restartability will work only if a sequence aborts not in other cases
Correct. A Sequence job must have checkpoints enabled and have aborted to be in an Aborted/Restartable status which then means it can pick up from where it left off when you run it next. This regardless of it being a 'master' sequence or a 'sub' / 'child' sequence.

Posted: Sun Dec 12, 2010 4:00 pm
by palak08
Okay, So according to your suggestions I used terminator stage to abort a job after sending email.
Now when job fails then it shows status as aborted/restartable.

So after that I did following steps:
1. Changed failed job, compiled it.
2. Compiled the sequence job.
3. Ran sequence job

But when I run sequence job, it runs from first job again and not from where it failed.

Question: How to restart a sequence job from where it failed when status is aborted/restartable?

Posted: Sun Dec 12, 2010 4:37 pm
by Mike
Don't compile it (or reset it). Just run it.

Mike

Posted: Sun Dec 12, 2010 5:02 pm
by palak08
Thanks Mike for your reply.
If I don't compile and run it then it gives me error:
"Job is not in runnable state."
Mike wrote:Don't compile it (or reset it). Just run it.

Mike

Posted: Wed Dec 15, 2010 4:52 pm
by ray.wurlod
The Job activities that run the subsequences need to have "reset if required, then run" option selected.

Posted: Wed Dec 15, 2010 4:59 pm
by palak08
Thanks Ray.
I tried that option as well. It does not run. But when I put entire sequence inside Another sequence and run then it runs fine, even without reset if required,then run option.

ray.wurlod wrote:The Job activities that run the subsequences need to have "reset if required, then run" option selected. ...