Introduction
FEATURE AVAILABILITY STARTING FROM RELEASE 2.5.6
FEATURE AVAILABILITY STARTING FROM RELEASE 2.6.3
The JITL CheckLicenseJob template can be used to automate monitoring of the JS7 - License expiration.
- The job template makes use of the JS7 - REST Web Service API for check expiration date similar to the JOC Cockpit GUI, see JS7 - How to manage License Expiration Warnings.
- The job template authenticates with the JS7 - REST Web Service API by use of user account/password and/or by use of a certificate, for details see JS7 - Authentication.
- For details about configuration items see JS7 - JITL Common Authentication.
Usage
When defining the job either:
- invoke the Wizard that is available from the Job Properties tab in the Configuration view and select the JITL CheckLicenseJob and relevant arguments from the Wizard
or
- specify the
JITL
job class andcom.sos.jitl.jobs.checklicense.CheckLicenseJob
Java class name and add arguments specifying what order states to transition..
Example for Alert Workflow
The CheckLicenseJob template can be used to implement a workflow to alert about license expiration:
- Jobs based on the CheckLicenseJob template do not fail if the underlying check proves an expired license.
- Instead, the CheckLicenseJob template provides Return Variables that can be inspected to determine further execution of jobs in a workflow.
- JS7 offers the JS7 - If Instruction to check the values of Return Variables and to decide what instructions to execute next.
Download (upload .json): pduCheckLicenseJITL.workflow.json
The workflow implements
- The license check from its first job,
- followed by an If Instruction that checks the returnCode variable to determine if an e-mail should be send,
- finally will send an e-mail if return code 2 or 3 indicate license expiration.
Users can start from uploading the above example and users can start to create the job from scratch using the job wizard like this:
- Add an empty job from the instruction panel.
- Specify a name and a label for the job.
- Select an Agent.
In a next step invoke the job wizard that you find in the upper right corner of the job property editor. The wizard brings up the following popup window:
Explanation:
- From the list of available job templates select the CheckLicenseJob.
Then hit the Next button to make the job wizard display available arguments:
Explanation:
- Optional Arguments
validity_days
: Specifies the number of days for which the license should be valid.- The job will terminate with return code 3 if the license will expire within the given number of days.
- The job will terminate with return code 2 if the license is expired.
- Note that the the checkbox provided with each argument has to be selected to add the arguments to the job.
When hitting the Submit button the wizard adds the selected arguments to the job which can look like this:
The job arguments can be specified:
- from individual variables as configured using the job wizard,
- by use of JS7 - Job Resources.
Documentation
The Job Documentation including the full list of arguments can be found from: https://www.sos-berlin.com/doc/JS7-JITL/CheckLicenseJob.xml
Authentication
The Job makes use of the JS7 - REST Web Service API that is available from JOC Cockpit.
- The job is executed with an Agent and requires a network connection to JOC Cockpit.
- The job has to authenticate with JOC Cockpit, for the related configuration see JS7 - JITL Common Authentication.
Arguments
The CheckLicenseJob template accepts the following arguments:
Name | Required | Default Value | Purpose |
---|---|---|---|
validity_date | no | 60 | Specifies the number of days for which the license should be valid. |
Return Variables
The CheckLicenseJob template returns the following variables that can be used by subsequent jobs and instructions.
Return Variable | Data Type | Purpose | Example |
---|---|---|---|
returnCode | number | Signals the license check result:
| |
subject | string | The subject for an e-mail that can be send from a subsequent job:
| |
body | string | The body for an e-mail that can be send from a subsequent job. The | .. Licence tpye: COMMERCIAL_VALID
.. license valid: true
.. License valid from: Wed May 05 12:22:41 GMT 2021
.. License valid to: Mon May 04 12:22:41 GMT 2026 |