首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 数据库开发 >

INFA POWERCENTER WFLOW 中的EMAIL组件的使用,实现自动发送邮件!解决办法

2012-02-23 
INFA POWERCENTER WFLOW 中的EMAIL组件的使用,实现自动发送邮件!使用 INFA 的朋友们!谁成功的实现过,使用I

INFA POWERCENTER WFLOW 中的EMAIL组件的使用,实现自动发送邮件!
使用 INFA 的朋友们!

谁成功的实现过,使用INFA POWERCENTER WFLOW 中的EMAIL 发送过邮件,请上来说说经验!

这里我先表示感谢了!

[解决办法]
Working with Post-Session Email
You can configure a session to send email when it fails or succeeds. You can create separate email tasks for success and failure email.
The Integration Service sends post-session email at the end of a session, after executing post-session shell commands or stored procedures. When the Integration Service encounters an error sending the email, it writes a message to the Log Service. It does not fail the session.
You can specify a reusable Email that task you create in the Task Developer for either success email or failure email. Or, you can create a non-reusable Email task for each session property. When you create a non-reusable Email task for a session, you cannot use the Email task in a workflow or worklet.
You cannot specify a non-reusable Email task you create in the Workflow or Worklet Designer for post-session email.
You can use parameters and variables in the email user name, subject, and text. Use any parameter or variable type that you can define in the parameter file. For example, you can use the service variable $PMSuccessEmailUser or $PMFailureEmailUser for the email recipient. Ensure that you specify the values of the service variables for the Integration Service that runs the session. You can also enter a parameter or variable within the email subject or text, and define it in the parameter file.
Related Topics: 
Using Service Variables to Address Email
Email Variables and Format Tags
Use email variables and format tags in an email message for post-session emails. You can use some email variables in the subject of the email. With email variables, you can include important session information in the email, such as the number of rows loaded, the session completion time, or read and write statistics. You can also attach the session log or other relevant files to the email. Use format tags in the body of the message to make the message easier to read.
Note:The Integration Service does not limit the type or size of attached files. However, since large attachments can cause problems with the email system, avoid attaching excessively large files, such as session logs generated using verbose tracing. The Integration Service generates an error message in the email if an error occurs attaching the file.
The following table describes the email variables that you can use in a post-session email:
EmailVariableDescription
%a<filename>Attach the named file. The file must be local to the Integration Service. The following file names are valid: %a<c:\data\sales.txt> or %a</users/john/data/sales.txt>. The email does not display the full path for the file. Only the attachment file name appears in the email.
Note: The file name cannot include the greater than character (>) or a line break.
%bSession start time.
%cSession completion time.
%dName of the repository containing the session.
%eSession status.
%gAttach the session log to the message. The Integration Service attaches a session log if you configure the session to create a log file. If you do not configure the session to create a log file or if you run a session on a grid, the Integration Service creates a temporary file in the PowerCenter Services installation directory and attaches the file. If the Integration Service does not use operating system profiles, verify that the user that starts Informatica Services has permissions on PowerCenter Services installation directory to create a temporary log file. If the Integration Service uses operating system profiles, verify that the operating system user of the operating system profile has permissions on PowerCenter Services installation directory to create a temporary log file.
%iSession elapsed time.
%lTotal rows loaded.


%mName of the mapping used in the session.
%nName of the folder containing the session.
%rTotal rows rejected.
%sSession name.
%tSource and target table details, including read throughput in bytes per second and write throughput in rows per second. The Integration Service includes all information displayed in the session detail dialog box.
%uRepository user name.
%vIntegration Service name.
%wWorkflow name.
%ySession run mode (normal or recovery).
%zWorkflow run instance name.
Note: The Integration Service ignores %a, %g, and %t when you include them in the email subject. Include these variables in the email message only.
The following table lists the format tags you can use in an Email task:
FormattingFormat Tag
tab\t
new line\n
Configuring Post-Session Email
You can configure post-session email to use a reusable or non-reusable Email task.
Using a Reusable Email Task
Use the following steps to configure post-session email to use a reusable Email task.
To configure post-session email to use a reusable Email task:
1.Open the session properties and click the Components tab.
2.Select Reusable in the Type column for the success email or failure email field.
3.Click the Open button in the Value column to select the reusable Email task.
4.Select the Email task in the Object Browser dialog box and click OK.
5.Optionally, edit the Email task for this session property by clicking the Edit button in the Value column.
If you edit the Email task for either success email or failure email, the edits only apply to this session.
6.Click OK to close the session properties.
Using a Non-Reusable Email Task
Use the following steps to configure success email or failure email to use a non-reusable Email task.
To configure success email or failure email to use a non-reusable Email task:
1.Open the session properties and click the Components tab.
2.Select Non-Reusable in the Type column for the success email or failure email field.
3.Open the email editor using the Open button.
4.Edit the Email task and click OK.
5.Click OK to close the session properties.
Related Topics: 
Working with Email Tasks
Sample Email
The following example shows a user-entered text from a sample post-session email configuration using variables:
Session complete.
Session name: %s
Integration Service name: %v
%l
%r
%e
%b
%c
%i
%g
The following is sample output from the configuration above:
Session complete.
Session name: sInstrTest
Integration Service name: Node01IS
Total Rows Loaded = 1
Total Rows Rejected = 0
Completed
Start Time: Tue Nov 22 12:26:31 2005
Completion Time: Tue Nov 22 12:26:41 2005
Elapsed time: 0:00:10 (h:m:s)

热点排行