Page History
...
Users can define their own job templates for use with workflows.
- Job templates can be applied to allow existing jobs to be re-use existing jobs used in a number of workflows.
- Job templates can be used to update any workflows that which include jobs that have been derived from a given job template.
...
- Access to Job Templates is subject to folder permissions.
Display feature availability | ||
---|---|---|
|
Managing Job Templates
Anchor | ||||
---|---|---|---|---|
|
The following example Job Templates are available:
- Example for download (upload .json): pdtTemplateShellJob_001.jobtemplate.json
- Example for download (upload .json): pdtTemplateShellJob_002.jobtemplate.json
Job Templates are available in from the Configuration->Inventory view. They are offered from to be found in object folders with of the same name that which are available in any user folder:
...
When clicking the name of the Job Template then the following a window is displayed to add properties to the Job Template:.
Adding Job Properties to Job Templates
Properties to a Job Template correspond to the properties of a job in a workflow, see the JS7 - Job Instruction
article.
Explanation:
- The above example includes is used to create a Shell Job. Any All of the properties available for Shell Jobs can be added, see see JS7 - Job Instruction.
- The Admission Times Update Jobs button allows to specify opening hours for jobsupdate any jobs referencing the Job Template from the released version of the template.
- This window offers the same sub-views for Script, Argument, Environment Variables and Notification as for any job.
- Job Templates are not deployed to a Controller or Agent. Instead, they are released to allow use with workflows.
Adding Arguments to Job Templates
Arguments can be added to a Job Template by clicking the Arguments tab:
- Arguments can be used for Shell Jobs and for JITL JVM Jobs.
- For Shell Jobs the Job Template's arguments are added to the Node Arguments.
- For JITL JVM Jobs arguments are added to the Job Arguments.
Explanation:
- Any number of arguments can be added.
- Each argument is specified by its Name, Data Type and optionally its Value.
- Note that argument names are case-sensitive.
- The data type can be one of String, Number or Boolean.
- Values have to correspond to their data type, for example a value
true
orfalse
matches the Boolean data type. - Empty values are allowed, in accordance with the Required checkbox.
- Arguments can be specified to be Required. When creating a job from a Job Template the user then has to specify a value for a required argument.
Adding Environment Variables to Job Templates
Environment Variables can be added to a Job Template by clicking the Arguments tab:
- Environment Variables can be used for Shell Jobs only.
- The Job Template's Environment Variables are added to the job's environment variables.
- Environment Variables can reference Arguments should these be available from the Arguments tab.
Anchor | ||||
---|---|---|---|---|
|
The following example workflows use two jobs which reference two distinct Job Templates:
- Example for download (upload .json): pdtShellJob_001.workflow.json
- Example for download (upload .json): pdtShellJob_002.workflow.json
Job Templates can be selected from the tree panel in the Configuration->Inventory view.
- Users can modify any attributes of a Job Template.
- After the Job Template is released, related jobs can be updated from the Job Template.
Scoping of Jobs to be updated from Job Templates
When modifying properties of a Job Template then users have the option to propagate changes to jobs that have been derived from the given Job Template. This operation is available:
- from the Job Template that offers the Update Jobs button.
- The operation is used to update any workflows that include jobs derived from the current Job Template and to select specific workflows for updating.
- The operation is used to update any workflows that include jobs derived from the current Job Template and to select specific workflows for updating.
- from any user folder including the top level folder which offers the Update Jobs from Templates action menu in the tree panel.
- The operation updates all jobs included with workflows located in folders recursively from any referenced Job Templates.
- The operation updates all jobs included with workflows located in folders recursively from any referenced Job Templates.
- from the Workflow's action menu in the tree panel that offers to Update Jobs from Templates.
- The operation updates any jobs in the workflow from any referenced Job Templates.
- The operation updates any jobs in the workflow from any referenced Job Templates.
- from the Job that offers an action menu in the JS7 - Workflow Editor. to Update from Job Template.
- The operation updates the current job in the workflow. Should the same job occur a number of times in the workflow then all occurrences will reflect the update.
- The operation updates the current job in the workflow. Should the same job occur a number of times in the workflow then all occurrences will reflect the update.
When clicking the Update Jobs button from a Job Template and when using one of the related action menu items at folder level then a popup window with a list of jobs workflows is displayed that make which include jobs making use of the current Job TemplateTemplates.
- The listpopup window:
- allows filtering for draft and deployed workflows.
- allows specifying whether job properties related to JS7 - Notifications and JS7 - Admission Times for Jobs should be updated.
- displays a blue bullet for deployed workflows and an orange bullet for draft workflows that include affected jobs.
- displays the status:
- synchronized for workflows that which hold jobs that are in sync with the Job Template, i.e. use the same properties and values.
- not synchronized for workflows that which include jobs that are not in sync with the Job Template.
- Users can select individual workflows or all workflows recursively to be updated.
- The update step includes to add adding or to modify modifying a workflowjob's job properties from the Job Template.
- Consider Note that updating workflows from a Job Template will create a draft of the given workflow and requires later deployment of the workflow.
Report of updated Jobs
Performing the update jobs operation in a number of workflows will results in a report that is available from a popup window.
- The report displays the workflows and jobs that have been updated.
- The jobs per workflow that have been changed or skipped.
- The tooltip icon provides additional information why a job was not updated. For example, if the job was not derived from the Job Template for which the update operation has been performed.
Job Properties subject to Update from Job Templates
When updating jobs in workflows from a changed Job Template then:
- the following properties will not be updated:
- Job Properties
- Job Name
- Label
- Agent
- Job Options
- Skip Job if no admission for Order's date
- Job Properties
- the following properties will be updated:
- Job Properties
- Job Template: Reference to the Job Template
that - Job Properties
- which includes the name and hash of the Job Template
in use- being used
- Title
- Documentation: Reference to the JS7 - User Documentation
- Job Resources: References to JS7 - Job Resources
- Return Codes: On Success, On Failure
- Return Codes: On Warning
- Job Class: Shell
job - Job or JITL
job- JVM Job
- Script/Class Name: Content of a Shell job script
of - or Java class of a JVM job.
- Job Options
- Parallelism
- Timeout
- Grace Timeout
- Warn on shorter execution period
- Warn on longer execution period
- Criticality
- Fail on output to stderr / Warn on output to stderr
Skip Job if no admission for Order's date- Admission Times: users can choose to overwrite existing properties when updating the job.
- Notification
- Mail related properties for job notifications
. - : users can choose to overwrite existing properties when updating the job.
- Parameterization
- Arguments:
- For Shell Jobs arguments are added to the job's Node
- Arguments:
Properties- Arguments
- For JITL Jobs arguments are added to the job's Arguments
Environment Variables - The update of Arguments
and Environment Variables - is performed in a way that
- in case they are added to the Job Template then they will be added to the job,
- in case they are removed from the Job Template then they will be removed from the job,
- in case
- is performed in a way that
the data type - of changes to arguments in the Job Template the
data type - changes will
be adjusted in the job provided that the related transition is applicable:- Number => String: applicable
- String => Number: not applicable
- Boolean => String, String => Boolean: not applicable
- not be applied when updating jobs.
- Environment Variables
- Names and values of Environment Variables are updated from the Job Template;
- this includes to add Environment Variables that have been added to the Job Template,
- this includes to remove Environment Variables that have been removed from the Job Template
- Names and values of Environment Variables are updated from the Job Template;
in case that the value changes this change is not applied to the job- .
Anchor | ||||
---|---|---|---|---|
|
Job Templates can be removed using the Remove action menu item that is available from in the tree panel:
- for individual Job Templates,
- for Job Templates at any folder level.
If a Job Template is removed then the jobs holding a reference to the Job Template will continue to work.
- Users can drop the reference to the Job Template at any later point in time.
Searching Job Templates
...
- Dropping a reference does not modify the job's properties.
- Optionally the job can be updated later on from an existing Job Template using the Wizard button.
Searching Job Templates
The Search button in the JOC Cockpit's Configuration->Inventory view allows searching for Job Templates:
Clicking the Search button brings forward the following popup window:
- The Search input field offers to search by names and titles of Job Templates.
- The * placeholder can be used for any number of characters.
- The ? placeholder can be used for a single character.
- Search is case-insensitive.
- The Return input field offers Job Templates from the list of scheduling object types.
- Users can click one of the resulting Job Templates displayed to navigate to the respective Job Template.