Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor addition to 'Object Creation'

...

  • Up to and including Release 1.12.7, there must be a sub-folder in the live/sos folder called rest, containing a Job createApiAccessToken.job.xml and a Job Chain createApiAccessToken.job_chain.xml. These objects provided by default with a new installation or update of the JOC cockpitCockpit. They are not required for Releases 1.12.8 and newer.
    (For details see
    Jira
    serverSOS JIRA
    serverId6dc67751-9d67-34cd-985b-194a8cdc9602
    keyJITL-525
    ).
  • A user that has been granted at least the sos:products:joc_cockpit:history:view permission has to be specified in the private.conf file. Note that the api_user role defined in the shiro.ini-example file has these permissions by default. More information about the private.conf file can be found below.

...

Code Block
function spooler_process()  {
 
    // using the current job name
    var jobHistoryInfo = getJobHistoryInfoObject("job1");
    ...
    return false;
}
 
 function getJobHistoryInfoObject(jobname, timelimit) {
    var jobHistory = new Packages.com.sos.jitl.checkhistory.JobHistory( spooler.delegate );

    if ((jobname === undefined) || (jobname === "")) {
      jobname = spooler_task.job.name;
    }
    if (timelimit === undefined) {
       timelimit = "";
    }

    var jobHistoryInfo = jobHistory.getJobInfo( jobname, timelimit );
    return jobHistoryInfo;
}

Note that in the above example the job1 Parameter in the spooler_process function has to include the full path within the JobScheduler live folder.

Object Methods

The object provides the following methods:

...