Using JOB parameters in Email Notification Activity Stage
Moderators: chulett, rschirm, roy
Using JOB parameters in Email Notification Activity Stage
Hi
How can I use JOB parameters in the Email notification activity stage.
I do not want to hardcode the Recepients Email address in the mail notification activity stage.
Thanks
Sreeja
How can I use JOB parameters in the Email notification activity stage.
I do not want to hardcode the Recepients Email address in the mail notification activity stage.
Thanks
Sreeja
Upgrade to 7.5 - that's the first time that parameters are supported in that stage.
What we do is "hard code" email notification groups there. That way we can change who gets the emails without having to touch the jobs.
Or... write your own email routine.
What we do is "hard code" email notification groups there. That way we can change who gets the emails without having to touch the jobs.
Or... write your own email routine.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 483
- Joined: Thu Jun 12, 2003 4:47 pm
- Location: St. Louis, Missouri USA
I'm pretty sure that I've used job parameters in the email notification activity successfully in both versions 6.0 and 7.1. I can't check at the moment to see how I got it to work. I seem to recall that it didn't follow the usual enclosing within #'s. I think I used the parameter as emailSendTo instead of #emailSendTo#.
Mike
Mike
-
- Premium Member
- Posts: 483
- Joined: Thu Jun 12, 2003 4:47 pm
- Location: St. Louis, Missouri USA
Nope, never been there. From the readme for 7.5:
Unfortunately, it looks like they still haven't added that same ability to the Command Execution stage. But then I haven't tried it yet...
Code: Select all
Job Sequencer
-------------
A number of enhancements have been made to the Job Sequencer at this
release:
- Additions to Notify Stage
The Notification Activity can now send attachments. Multiple attachments
are also supported. All fields may include parameters, except the email
body.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
The general consensus seems to be that it doesn't work. I was blissfully unaware since I have only tried it on two installations and it has worked on both. I'm positive that I used a job parameter for the email recipient (there is no way that I am going to hard-code my email address into the notification activity stage). I still have access to both installations and can get the details of my sequence job designs tomorrow.
Mike
Mike
You know, sitting here and thinking about it... you may be right. From previous conversations here or on ADN, I think that it did work - but only on one specific platform and that probably by accident.
What they've finally done is address the issue and made it work across all platforms in the manner you've always assumed it should work.
What they've finally done is address the issue and made it work across all platforms in the manner you've always assumed it should work.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I went back and checked out our email notification setup. As it turns out, we never actually got it working with job parameters in our 6.0 installation.
However, it is working in our 7.1 installation on a Solaris 8 server. We created a job parameter called $emailSendTo as a user-defined environment variable via the administrator client. Within the email notification stage, the recipient address is set to $emailSendTo (no enclosing #'s). At run time, we set the job parameter's value to $PROJDEF. The director log indicates that the email was sent to '$emailSendTo' as if no value substitution occurred, but the email actually goes through just fine.
Glad to hear it is working normally in 7.5. With the quirky behavior observed in our 7.1 installation, I can readily believe that it is purely accidental that it works on the Solaris 8 platform.
Mike
However, it is working in our 7.1 installation on a Solaris 8 server. We created a job parameter called $emailSendTo as a user-defined environment variable via the administrator client. Within the email notification stage, the recipient address is set to $emailSendTo (no enclosing #'s). At run time, we set the job parameter's value to $PROJDEF. The director log indicates that the email was sent to '$emailSendTo' as if no value substitution occurred, but the email actually goes through just fine.
Glad to hear it is working normally in 7.5. With the quirky behavior observed in our 7.1 installation, I can readily believe that it is purely accidental that it works on the Solaris 8 platform.
Mike
Put proper parameters what you do in jobs, the same way, and compile the sequence. copy the sequence compiled code and paste it in a new server job control script, check for '# #' in the code and remove it manually. Then compile that new server job. and instead of running the sequencer, run this new server job. Hope this helps.
Thanks
Alok
Thanks
Alok