Details
-
Fix
-
Status: Released (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Current Situation
- The substitution of environment variables in task parameters works properly how described in http://www.sos-berlin.com/doc/en/scheduler.doc/variable_substitution.xml
- The substitution of environment variables in order parameters doesn't work
Desired Behavior
- The substitution of environment variables in order parameters should work as described in above article
Workaraound
- add a preprocessor to the job
<job order="yes" stop_on_error="no"> <script language="shell"> <![CDATA[ echo something to do ]]> </script> <monitor name="substituteOrderParams" ordering="0"> <script language="javax.script:ecmascript"> <![CDATA[ function spooler_process_before(){ var orderParams = spooler_task.order().params(); var orderParamNames = orderParams.names().split( ";" ); for( var i in orderParamNames ) { orderParams.set_value(orderParamNames[i], orderParams.substitute(orderParams.value(orderParamNames[i]))); } return true; } ]]> </script> </monitor> <run_time /> </job>
Note
This may be incompatible with existing configurations. Especially if an order parameter value contains a ${param} that should be substituted by the configuration monitor. With this change the ${param} will be substituted to "nothing" by JobScheduler and the configuration monitor or the JobScheduler JobAdapter used in JITL Jobs can not substitute the ${param}.
Change: If an order parameter value contains ${param} then this must be quoted with a backslash like \${param}. Then JobScheduler will change this to ${param} and the configuration monitor or the JobScheduler JobAdapter used in JITL Jobs can substitute the value.