on 01-25-2016 1:34 AM
Hi All,
We are changing the status to completed of some SAP jobs, if a specific string is found in job logs by using post running action on the jobs. But email notifications are getting triggered. We are using the below trigger to send email notifications. Could you please help how can we modify the below trigger so not to send the email notifications for these type of jobs.
{
String strLogFileName = "";
if((jcsPostRunningContext.getNewStatus().equals(JobStatus.Error) ||
jcsPostRunningContext.getNewStatus().equals(JobStatus.Unknown) ||
jcsPostRunningContext.getNewStatus().equals(JobStatus.Killed))
)
{
{
String email = "abc@ghi.com";
String subject = "Redwood job abend";
String strText = "Job id=" + jcsJob.getJobId().intValue() + ", Job name=" + jcsJob.getJobDefinition().getName() + ", Job Description=" + jcsJob.getDescription() + " , has abended";
JobDefinition jd = jcsSession.getJobDefinitionByName("System_Mail_Send");
{
Job subJob = jd.prepare();
subJob.getJobParameterByName("To").setInValueString(email);
subJob.getJobParameterByName("Subject").setInValueString(subject);
subJob.getJobParameterByName("Text").setInValueString(strText);
}
}
}
}
Regards,
Tinku
Hi Experts,
Could you please suggest, is it possible to suppress the email notifications of the jobs which are changed to the status completed, if a specific string is found in the job log of the errored jobs?
We are on M33.120
Regards,
Tinku
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.