Page History
...
You can use the job wizard like this:
Explanation:
- Add an empty job from the instruction panel.
- Specify a name and a label for the job.
- Select an Agent.
...
Queries are specified from a function and optional arguments.
Syntax | Explanation |
---|---|
<function> | Functions can be used without arguments by stating exclusively the name of the function. |
<function>( argument[, argument] ) | Functions can optionally be specified with one or more arguments that are separated by commas. |
Functions
Function | Arguments | Default | Explanation |
---|---|---|---|
isStarted | startedFrom, startedTo, count | startedFrom=0d, startedTo=0d, count=1 |
|
isCompleted | startedFrom, startedTo, completedFrom, completedTo, count | completedFrom=0d, completedTo=0d, count=1 |
|
isCompletedSuccessful | startedFrom, startedTo, completedFrom, completedTo, count | completedFrom=0d, completedTo=0d, count=1 |
|
isCompletedFailed | startedFrom, startedTo, completedFrom, completedTo, count | completedFrom=0d, completedTo=0d, count=1 |
|
lastCompletedSuccessful | startedFrom, startedTo, completedFrom, completedTo, count | completedFrom=0d, completedTo=0d, count=1 |
|
lastCompletedFailed | startedFrom, startedTo, completedFrom, completedTo, count | completedFrom=0d, completedTo=0d, count=1 |
|
lastCompletedSuccessful |
| completedFrom=0d, completedTo=0d, count=1 |
|
...
The Job Documentation including the full list of arguments can be found from: https://www.sos-berlin.com/doc/JS7-JITL/CheckHistoryJob.xml
Anchor | ||||
---|---|---|---|---|
|
The CheckHistoryJob template accepts the following arguments:
Name | Required | Default Value | Purpose |
---|---|---|---|
query | yes | n/a | Specifies the expression that is used to look up the execution history, for example isCompleted, isCompletedSuccessful etc., for the full list see Queries. |
| no | n/a | Specifies the name of a workflow for which the execution history is looked up. A |
job | no | n/a | Specifies the name of a job for which the execution history is looked up. A workflow name or job name has to be specified. |
controller_id | no | n/a | The identifier of a Controller can be specified to limit results to workflows and jobs executed with the indicated Controller. |
Anchor | ||||
---|---|---|---|---|
|
The CheckHistoryJob template returns the following variables:
...
The CheckHistoryJob template can be used to implement job dependencies backward job dependencies:
- Jobs based on the CheckHistoryJob template do not fail if the underlying query does not return results.
- Instead, the CheckHistoryJob 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): pdwCheckHistory.workflow.json
Explanation:
- The JS7 - If Instruction is used to check the
$returnValue
return variable that carries- the value 0 if the query of the CheckHistoryJob template returns one or more hits.
- the value 1 if the query of the CheckHistoryJob template returns no hits.
- Alternative solutions include to check the value of the
$js7CheckHistoryResult
return variable for a Boolean value that indicates if the query did return any hits:$js7CheckHistoryResult == true
$js7CheckHistoryResult == false
- The above example executes a successor job based on the result of the CheckHistoryJob. Such jobs have access to any Return Variables:
- If the successor job is a Shell job then
- Return Variables can be mapped to environment variables like this:
- the job script can make use of environment variables like this:
- Return Variables can be mapped to environment variables like this:
- If the successor job is a JVM job then Return Variables can be accessed directly.
- If the successor job is a Shell job then