This content has been marked as final.
Show 1 reply
-
1. Re: Is there a way to access the job@id as a property in the JSL
cfang Aug 25, 2016 10:44 AM (in response to richardmoore)In principle, any attribute in job xml can be substituted with dynamic value. But since job id is such a fundamental attribute and so you usually want it to be a static value.
For example, you can try:
<job id="#{jobParameters['myJobName']}?:job1;"
then the rest of your job xml can reference the same jobParameters['myJobName'] as the job id. If this job param is not passed in, then the default job id job1 is used and will not be accessible.
Or you can add a redundant job-level batch property:
<job id="job1">
<property name="jobName" value="job1"/>
it can be accessible thru #{jobProperties['jobName']}