I would realise to get an E-Mail, wenn the Assamble-Line doesnt work.
I tried to realise this by using the hook "Default on Error", but found no
way to do so.
Is something like that possible?
Best wishes
Christoph
You have a couple of options here:
1). Have a configured SendEmail FC in your Assemblyline, called
for example "SendMail". and then from your Error Hook you
invoke it:
var mailEntry = system.newEntry();
mailEntry.setAttribute("body", "Error in [" + task.getShortName()
+ "/" +
error.getString("connectorname")
+ "] during " +
error.getString("operation"));
mailEntry.setAttribute("subject", "Error mail from TDI: " +
error.getString("Message"));
// other param values you can override with Output Mapped
Attributes:
// attachments, from, recipients, smtpServerHost,
smtpServerPort
SendMail.perform(mailEntry);
2). Or you use the system.sendMail() method. Just look it
up in the JavaDocs (Help > Low Level API) under the class
named "UserFunctions"
-Eddie
On Jan 19, 2:52 pm, "Christoph Hölscher" <ch.hoelsc...@googlemail.com>
wrote:
I saw Eddie's answer... as he advices, you can use a passive component
by invoking it via scripting... or use the sendMail method... but you
could also simply set a variable or work entry attribute in the error
hook and use a branch (named IF_ERROR for instance) to send the email
(see
http://www.tdi-users.org/twiki/pub/Integrator/LearningTDI/03Branches_and_AttMap_Components.wmv)
The later approach would make your AL slightly more "visual"...
HTH,
Christian
Thanks, Christian :)
-Eddie
On Jan 22, 11:51 pm, Christian Chateauvieux
<christian.chateauvi...@fr.ibm.com> wrote:
> Christoph,
>
> I saw Eddie's answer... as he advices, you can use a passive component
> by invoking it via scripting... or use the sendMail method... but you
> could also simply set a variable or work entry attribute in the error
> hook and use a branch (named IF_ERROR for instance) to send the email
> (seehttp://www.tdi-users.org/twiki/pub/Integrator/LearningTDI/03Branches_...)