This page includes description, setup and examples for EJM Jobs notification functionality. It contains an overview of sending notification parameters, trigger options, examples of control messages with notification and additional parameters.
The EJM Jobs notification functionality allows user to get status of executing Job process thru many delivery types (FTP, email, file and so on). The functionality informs about 4 notification message types, including:
Notification message types:
- ACK – Acknowledgement. Informs you that the execution of the job has just started
- Extract – Contains extracted data from the database
- Alert – Informs you about timeout of execution Pace Event or SRM Validation Event
- TSR - TaskStatusResponse. Informs you that the execution of Job has finished
color | #E0F0FF |
---|
Delivery Methods
See the list of available delivery methods for notifications and configurable options for them.
Sending Notification Parameters
The user can setup notification parameters in two ways:
In config file using reserved variables (set default settings for applying to ALL Jobs);
In task parameters nodes of initial Control Message (CM) to run EJM Job (to use these settings to run only that specific EJM job).
Info |
---|
Notification parameters from Control Message supersede the same parameters defined in config file when defined in both. This can be especially useful, when you need to apply certain parameters to a stream without affecting all processes of the environment. |
Enable/Disable/Run-on-Failure-Only EJM Jobs Notification Functionality
Edit/add w_default_send_notifications
global variable to apply the setting to all processes in the environment.
OR
Use SendNotification
control message task parameter to change the behavior of the process you are launching only.
The config file location is /eagle_ml-2-0_custom_cm/w_config_custom.inc
| Config File Option | Control Message Task Parameter Option | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Name | w_default_send_notifications | SendNotification | ||||||||||
Values | Options include: ‘ALWAYS’ or ‘1’ to enable ‘NEVER’ or ‘0’ to disable ‘ONFAILURE’ to send notification on failure case only (TSR has ‘FAILED’ final status). | |||||||||||
Example |
|
| ||||||||||
Default Value | ‘ALWAYS’ | |||||||||||
Additional note | If the “w_default_send_notifications” variable is empty or missing in config file /eagle_ml-2-0_custom_cm/w_config_custom.inc AND SendNotification is empty or missing in the CM then the default value will be used, because the notification parameter value is ‘ALWAYS’. |
Examples of Control Messages with Notification
These control messages below can be dropped into the eagle_ml-2-0_default_cm_control_message stream.
This example uses an Entity extract
Remember to change the correlationId.
Expand |
---|
|
|
|
|
Load thru ACQUIRE example with notification
Remember to change the correlationId.
Expand | ||
---|---|---|
| ||
|
|
|
Manage EJM Notification Filenames
Default
Name
Default TSR and ACK names are generated as follows:
1. In case of a simple one step process (for example, a common extract) the user will see the following TSR and ACK messages with the same name:
[initial corrId] + '_' + [time of generation of the ack or tsr message in hhmmss] + '_'+ [uid] + '-u-' + [login of the user-RTR sender] + '-u-' + [rtr file name] .xml
For example: coodId17_072915-2G770MFVU0SK2SVE-u-USER-u-rtr_name.xml
2. In case of a multi step process with a lot of ancillary notifications flying back and forward (for example, extraction via generic_extract workflow):
TSR: [corrId] + [ProcessWorkflowName] + [parent task id] + [task id]+ [datetimestamp in YYYYMMDD_hhmmss format] .xml
ACK: [corrId] + [ProcessWorkflowName] + [task id]+ [datetimestamp in YYYYMMDD_hhmmss format] .xml
where ProcessWorkflowName is a complex variable linked with the name of the workflow in charge of the launch of the step.
To set a custom name for your TSR and ACK files, you can use several additional task parameters in the control message:
EJM Job Notification Overview#ACKStrictPattern.
Anchor | ||||
---|---|---|---|---|
|
TSRNamePattern is used to link the TSR message with the name of the “TSRNamePattern” parameter as part of TSR file name. Global alternative: W_TSR_NAME_PATTERN
The following is an example of the use of the TSRNamePattern.
Expand |
---|
|
|
|
Anchor | ||||
---|---|---|---|---|
|
TSRStrictPattern is the parameter that is used to link the TSR message with the name “CorrelationId_TSRStrictPattern” where CorrelationID is the Correlation ID and TSRStrictPattern is the value placed in that parameter.parameter as part of TSR file name. Global alternative: W_TSR_STRICT_PATTERN
The following is an example of the use of the TSRStrictPattern, with the name of the TSR as “CORRID_TSRPattern_01_TSR_ TestTSRNmPat20140710
_062456
.xml”,
where CORRID_TSRName_01
is the correlation ID, TestTSRNmPat
is the TSRStrictPattern parameter value,
and 20140710
_062456
is the time stamp the control message was created (as controlled by suffixing the code name “timestamp_” to the end of our TSRStrictPattern.)
Expand | ||
---|---|---|
|
|
|
Anchor | ||||
---|---|---|---|---|
|
ACKStrictPattern is the parameter that is used to link the TSR message with the name “CorrelationId_ACKStrictPattern” where CorrelationID is the Correlation ID and ACKStrictPattern is the value placed in that parameter as part of TSR file name. Global alternative: W_ACK_STRICT_PATTERN
The following is an example of the use of the ACKStrictPattern, with the name of the resulting ACK file
as “CORRID_ACKName_01_TestACKNm2014711
_080449.xml”,
where CORRID_TSRName_01
is the correlation ID, TestACKNm
is the ACKStrictPattern parameter value,
and 20140710
_063245
is the time stamp the control message was created (as controlled by suffixing the code name “timestamp_” to the end of our ACKStrictPattern.)
Expand | ||
---|---|---|
|
|
|
W_REPLYCM_MODE=ONuseExactFileName
If you set in w_config_custom.inc the global parameter W_REPLYCM_MODE with ONuseExactFileName value, it will exclude correlationID prefix from the file name when you use ACKStrictPattern and TSRStrictPattern parameters to modify it.
Warning |
---|
This option should be handled with care, because in case different processes get the same file patterns, files will be rewritten by the latter process. |