cancel
Showing results for 
Search instead for 
Did you mean: 

BODS job failed notofications

Former Member
0 Kudos

Hi. I saw similar discussions but still I do not have idea how to enable BODS failed notifications. I cannot create try/catch after all of DF which I have a lot in one job.

In "catch" we could check only some bulid-in exceptions but what if job did not start because I deleted some DF (or table in DF)? It is possible to receive any notification by email when the job generally failed ( it does not matter why)? It is possible to add those notifications to all jobs without adding try/catch to all of our DF's?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member187605
Active Contributor
0 Kudos

You only need one Try (at the beginning of your job) and one Catch (at the end) for intercepting any error in general.

Former Member
0 Kudos

Dirk,

I have for example job definition like this below:

Wf1 -> WF2 -> WF3 -> script1 wih smtp_to definition. Everything is working fine.

I have tried to add try/catch like this:

Try -> WF1 -> WF2 -> WF3 -> script1 -> catch with script2 contained smtp_to definiton (with other message like this from script1)

First question is it correct?

I deleted some DF from WF2 for testing. Job failed of course but I did not receive any notifications.

Thanks for advice.

former_member187605
Active Contributor
0 Kudos

Yes, that's the correct structure. That's how I build all my jobs .

A job will only start when it's syntactically correct.

  • If you delete a table from a data flow and as such invalidate it, the job won't even start, mail cannot be sent.
  • If you delete a data flow from a job, your job will normally not fail. Why do you say it does? In any case, you should either get the mail from script1 or from script2. If you don't get anything, you'll have to check the smtp parameters.
Former Member
0 Kudos

Ok, so to specify details...I deleted DF from repository not from WF...I know it is a little different situation . I received error message that some DF was not found.

Why I deleted? Because in Usage I saw 0...unfortunately this DF was still used by WF in some job (in Usage it should be 1 of course)

former_member187605
Active Contributor
0 Kudos

That means your job is not valid anymore: it won't start, mail will not be sent.

former_member254877
Participant
0 Kudos

Konard -  you should have same Smtp script in Catch block as well to raise the exception and notify email alert.

you can also catch errors by using standard functions.

In Catch block --> Just drag the script --> Add following text

$G_error_message  = error_message()

$G_error_number = error_number()

$G_error_context = error_context()

$G_error_timestamp = error_timestamp()

Smtp_to (' Error notification..etc')

print ($G_error_message);

Raise_excpetionZ('Job has been aborted with XYZ reason')