You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

 

UNDER PROGRESS

Introduction

The Monitors (also called Pre-/Post-Processing Monitors) are used with jobs to provide pre-processing and post-processing capabilities by scripting. The pre-/post-processing monitors are executed before a Task is being executed by the JobScheduler. Similarly the Post-processing monitors are executed once a Task is finished. 

A Job can have multiple pre/post processing Monitors ordered starting from 0 onward to be executed by the JobScheduler. The pre-/post-processing monitors can be created to validate a required condition for a particular task to be stated or set a parameter value e.g. today's date etc. At the same time post-processing monitors can check the job's execution status return code etc. The Monitors can be programmed independent from the job's execution language e.g. a Shell Script job can have a pre-processing monitor written in the Java Script. 

Issues

The Named Monitor feature is subject to the following issues

Key Summary T Created Updated Due Assignee Reporter P Status Resolution Fix Version/s
Loading...
Refresh

 

Pre-/Post Monitor

The Pre-/Post Monitor are generic pre/post Monitors stored in the separate file with file extension *.monitor.xml e.g. MyMonitor.monitor.xml. A pre-/post Monitor can be included in multiple jobs. 

Create Pre-/Post Monitor

  • In the left navigation pan Click on the Pre-/Post-Processing 
  • In the far right top side click on New to create a Pre-/Post-Processing monitor
    • New Monitor will be created with a default name e.g. process0
  • Click on the newly created monitor e.g. name process0
    • This will open more configuration option such as name, ordering etc
      • Click inside the Name's text box and give the Named monitor a relevent name eg. show_all_order_parameters
      • Leave the Ordering to default 0
      • Chose the Language javax.script.ecmascript from the dropdown menu.
    • Just below of Click on the script and chose spooler_process_before() code snippet

       spooler_log.info( "   " );
        spooler_log.info( "   Start Monitor : show_all_order_params" );
        var parameters = spooler_task.order().params();
        if( parameters.count() > 0 ){
            spooler_log.info( "      Order parameters given" );
            } else {
            spooler_log.info( "      No Order parameters given" );
        }
        spooler_log.info("      Total number of Order parameters : " + parameters.count());
        spooler_log.info( "   " );
        var names = parameters.names().split(";");
        for( i=0; i < parameters.count();i++ ){
            spooler_log.info("      "+ names[i] + "  = " + parameters.value( names[i] ));
        }
        spooler_log.info( "   " );
        spooler_log.info( "   End Monitor : show_all_order_params" ); 

 

 

Include into a Job

 

 

 

 

 

  • No labels