DTS: Workflow and Send Mail Task
Posted on 2003-02-20
i have several dts packages that are dependent upon each other. ie detail tables that cannot be populated before master tables.
I have created a "master" package within which to execute these sub packages. I have inserted the 5 sub packages using the execute package task.
I want to run them as follows
if 1 executes successfully then execute 2.
if 2 executes successfully then execute 3.
if 3 executes successfully then execute 4.
if 4 executes successfully then execute 5.
if any of the packages fail i want the rest of the packages to stop executing - so if package 2 fails i DO NOT want 3, 4, and 5 to execute
so what I have done is put in workflow arrows (on success). between packages: 1-2 2-3 3-4 4-5.
however when i execute the whole thing: 1. completes successfully, 2 fails BUT then 3 still executes. Why is this - as i have specified only on success workflow?
so my questions are:
1. how can i prevent all subsequent packages from executing if a previous package fails?
2. also when 1 package fails i would like to send an email to myself. I have added a send mail task and have set it to execute "on failure". I did this via a workflow arrow between each sub package (1 to 5) and the send mail task. HOWEVER when sub package 2 fails i DO NOT receive an email. Yet when i execute the send mail task independently it does send me mail - so it is configured properly.
3. Finally, is it possible (when sending mail triggered by a failed execution)- to include details of exactly which package failed and why?
thankyou for your time