Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-1693

Substitution of environment variables in order parameters should work

    XMLWordPrintable

Details

    Description

      Current Situation

      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.

      Attachments

        Activity

          People

            jz Joacim Zschimmer
            oh Oliver Haufe
            Oliver Haufe Oliver Haufe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: