Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Typo

...

  • In the left hand navigation pane click on the Pre-/Post-Processing Monitor element.
  • In the far right top side click on New to create a Pre-/Post-Processing Monitor
    • A new Monitor will be created with a default name, process0.
  • Click on the Name of the newly created Monitor: 
    • This will open a form allowing more configuration options such as Name, Ordering etc. to be set.
      • Click inside the Name text box and specify a relevant name for the Monitor, e.g. show_all_orders_parameters_pre.
      • Leave the Ordering at the default value of 0.
      • Choose the javax.script:ecmascript script language from the Language dropdown menu.
    • Just below of click on the script tab and chose thespooler_process_before() code snippet.

    • Copy & Paste the following code snippet as a replacement for the function:

      Code Block
      languagejs
      titleshow_all_order_parameters_pre
      collapsetrue
      function spooler_process_before() {
      
          var parameters = spooler_task.order().params();
          spooler_log.info( ".. total number of order parameters: " + parameters.count() );
      
          var names = parameters.names().split( ';' );
          for( i=0; i < parameters.count(); i++ ) {
              spooler_log.info( ".. parameter: "+ names[i] + " = " + parameters.value( names[i] ) );
          }
      
          return true;
      }
    • Save the configuration by clicking on the Save Configuration icon in the top left hand corner of JOE.

Specification of Monitors as Pre- or Post-

...

Processors

  • The use of the spooler_process_before() or spooler_process_after() function in the monitor script defines whether a Monitor is a pre-processor or post-processor.
  • In addition to the two spooler_process_... functions two further functions can be used in monitor scripts:
    • spooler_task_before()
    • spooler_task_after()
  • The most important difference between the spooler_process and spooler_task functions is that the spooler_task functions are able to handle return codes. 
  • More detailed information about these functions can be found in the Monitors section of the JobScheduler reference documentation.

...