Saturday, 25 May 2013

How to Configure Email Task In Informatica With Examples

Email task is used to send emails while running the workflow.Using email task we can get failure and success notifications
To explain this lets take the example of a workflow with two sessions.Session1 and Session2

a)Go to create task and create an Email Task and name it as Test_email

b)Also Enter the following details
  • Email User Name : 
  • Email subject   :
  • Email text:

Email User Name either you can hard code with an email id or give a workflow variable.To give Workflow variable, goto the workflow variable and create a new one to hold email address $$Email_Failure   



c)You can give value to workflow variable using parameter File
Emails in the Parameter file
[Richard.Workflow:wkfTest]
$$Email_Failure=xyz@mail.com


d)Also make the email task as resuable so that we can use it in multiple sessions.

e)To attach files through Email use the below codes in Email Text

  • %a<>To attach file, Absolute path need to be given <>.
  • %s Session name
  • %e Session status
  • %b Session start time
  • %c Session completion time
  • %i Session elapsed time
  • %l Total records loaded
  • %r Total records rejected
  • %t Target table details
  • %m Name of the mapping used in the session
  • %n Name of the folder containing the session
  • %d Name of the repository containing the session
  • %g Attach the session log to the message


1)To add Email Task via session Level
Go to each session and Components level give the On Failure Email as Test_Email, also give Type as Reusable and Save.This will trigger the email for Failure




2)To add Email Task via Workflow level
Goto workflow and in the Suspension Email enter the Email task name, Also give Suspend on Error and save



5 comments:

  1. Good one :
    This is a good posting .......
    I have one issue with email with attachments in one of the req.
    for example if my target error records are more than 50 then i have send a mail with my log as attachment and in records are < 50 i have send mail with no log file so how we configure this type of req

    ReplyDelete
    Replies
    1. Fail the session on 50 errors so that Failure e-mail component will be triggered. In the other scenario success e-mail component will be triggered

      Let me know if this was helpful

      Delete
  2. Hi, i need to attach excel file. I do get the email with excel but with junk characters. Any solution?

    ReplyDelete
  3. i want to put all the error information like what is error why it failed in email. how to include these things ?

    ReplyDelete
  4. how can I configure the email id?

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...

ShareThis