Custom email template for POJO job "j2ee_parameter"
search cancel

Custom email template for POJO job "j2ee_parameter"

book

Article ID: 430800

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Trying to create a custom email notification template to include POJO j2ee_parameter details.

[SUCCESS]
SUBJECT=Group Consolidation Run completed: <<<job_status>>> Job: <<<job_name>>>  DO_NOT_REPLY
MESSAGE=[start]

------------------------------------------------------------------------------

CA Workload Automation - Automated Email Notification

------------------------------------------------------------------------------

Instance:                                               <<instance>>
Job name:                                               <<job_name>>
Status:                                                 <<job_status>>
Job run machine:                                        <<run_machine>>
Job start time:                                         <<start_time>>
Job completion time:                                    <<completion_time>>
j2ee_parameter:         <<JobText>>
Exit code:                                              <<exit_code>>

------------------------------------------------------------------------------

Note: This email was automatically generated based on the job definition.
Please do not reply.

------------------------------------------------------------------------------
[end]
STDOUT=no
STDERR=no
LOG_LINES=1000
 

[FAILURE]
SUBJECT=Group Consolidation Run completed: <<<job_status>>> Job: <<<job_name>>>  DO_NOT_REPLY
MESSAGE=[start]

------------------------------------------------------------------------------

CA Workload Automation - Automated Email Notification

------------------------------------------------------------------------------

Instance:                                               <<instance>>
Job name:                                               <<job_name>>
Status:                                                 <<job_status>>
Job run machine:                                        <<run_machine>>
Job start time:                                         <<start_time>>
Job completion time:                                    <<completion_time>>
j2ee_parameter:                                 <<sap_job_text>>
Exit code:                                              <<exit_code>> 

------------------------------------------------------------------------------

Note: This email was automatically generated based on the job definition.
Please do not reply.

------------------------------------------------------------------------------
[end]
STDOUT=no
STDERR=no
LOG_LINES=1000


[TERMINATED]
SUBJECT=Group Consolidation Run completed: <<<job_status>>> Job: <<<job_name>>>  DO_NOT_REPLY
MESSAGE=[start]

------------------------------------------------------------------------------

CA Workload Automation - Automated Email Notification

------------------------------------------------------------------------------

Instance:                                               <<instance>>
Job name:                                               <<job_name>>
Status:                                                 <<job_status>>
Job run machine:                                        <<run_machine>>
Job start time:                                         <<start_time>>
Job completion time:                                    <<completion_time>>
j2ee_parameter:         <<JobText>>
Exit code:                                              <<exit_code>> 

------------------------------------------------------------------------------

Note: This email was automatically generated based on the job definition.
Please do not reply.

------------------------------------------------------------------------------
[end]
STDOUT=no
STDERR=no
LOG_LINES=1000

Resolution

You can define the j2ee_parameter in the email notification template, but not in the way that you currently have it. In the examples above, the system does not recognize the <<JobText>> or <<sap_job_text>>.

The proper specification would look like:

j2ee_parameter(s): <<j2ee_parameter>>

This will write all j2ee_parameters in one comma separated string.

Example Job Definition:
insert_job: pojoJob
job_type: POJO
machine: localhost
class_name: java.lang.Integer
method_name: min
j2ee_parameter: int=5
j2ee_parameter: int=10
send_notification: y
notification_emailaddress: [email protected]
notification_template: emailtemplate

Example Notification Template:
[SUCCESS]
SUBJECT=AutoSys Workload Automation - Job: <<<job_name>>> Status: <<<job_status>>> DO_NOT_REPLY <<owner>>
MESSAGE=[start]
------------------------------------------------------------------------------
 AutoSys Workload Automation - Automated Email Notification
------------------------------------------------------------------------------
 Instance:                                                    <<instance>>
 Scheduler host:                                              <<scheduler_host>>
 J2ee params:                                                 <<j2ee_parameter>>
 Job name:                                                    <<job_name>>
 Status:                                                      <<job_status>>
 Job run machine:                                             <<run_machine>>
 Job run identifier:                                          <<run_identifier>>
 Job start time:                                              <<start_time>>
 Job completion time:                                         <<completion_time>>
 Exit code:                                                   <<exit_code>>

------------------------------------------------------------------------------
 Note: This email was automatically generated based on the job definition.
 Please do not reply.
------------------------------------------------------------------------------
[end]
STDOUT=no
STDERR=no
SPOOL=no
JOBLOG=no

Example Email Notification:
------------------------------------------------------------------------------

CA Workload Automation - Automated Email Notification

------------------------------------------------------------------------------

Instance:                                               DEV
Job name:                                             pojoJob
Status:                                                  SUCCESS
Job run machine:                                  tstagnt01
Job start time:                                       02/25/2026 15:00:00
Job completion time:                            02/25/2026 15:02:13
j2ee_parameter:                                   int=5, int=15
Exit code:                                              0


------------------------------------------------------------------------------

Note: This email was automatically generated based on the job definition.
Please do not reply.

------------------------------------------------------------------------------


Alternatively, install the Workload Automation Agent for SAP S/4HANA Application Jobs plugin extension which can be download from the Automation Marketplace. After doing so, you can use the job attrbibutes specific to the job type as opposed to j2ee_parameter attribute.

  1. First install the plugin extension on the agent.
  2. Then install on the engine side which will add some additional metadata for the new job type. 
  3. Lastly, install on the WebUI. This will add panels to the UI, done essentially the same way.
    The panels are json and get inserted into WCC database.
    Recycle and you'll have access to the new job type.

Installation instructions are included with the plugin extension for installing on AutoSys server, WebUI machine, and agent.

Once this has been done, you can use the attributes specific to the job type instead of the j2ee_parameters attribute for notifications.