Page History
...
- The job template makes use of the JS7 - REST Web Service API to retrieve information from the JS7 - History. Operation of the job template requires
- network access from the Agent that executes the job to the JOC Cockpit instance,
- availability of the Controller and of JOC Cockpit, authentication and authorization with JOC Cockpit.
- 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.
- The job template checks the execution history of workflows and jobs
- for execution with a start date or completion date in the given period,
- for successful or failed execution results.
...
Return Variable | Data Type | Purpose | Example |
---|---|---|---|
js7CheckHistoryResult | Boolean | Returns the Boolean result of the query. | true, false |
| String | Returns the Controller ID of the resulting history entry. The value of the return variable is empty if the query returns no result. If the query returns a result then the return variable holds the Controller ID of the youngest resulting history entry. | controller |
js7CheckHistoryResultWorkflow | String | Returns the workflow name of the resulting history entry. The value of the return variable is empty if the query returns no result. | check_history |
js7CheckHistoryResultJob | String | Returns the job name of the resulting history entry. The value of the return variable is empty if the query returns no result. | check-history-job |
js7CheckHistoryResultStarted | Date | Returns the start date and time of the resulting history entry. The value of the return variable is empty if the query returns no result. If the query returns a result then the return variable holds the start date and time of the youngest resulting history entry in ISO-8601 format. | 2012-12-05T01:00:00+02:00 |
js7CheckHistoryResultCompleted | Date | Returns the completion date and time of the resulting history entry. The value of the return variable is empty if the query returns no result. If the query returns a result then the return variable contains the completion date and time of the youngest resulting history entry in ISO-8601 format. | 2012-12-05T01:00:00+02:00 |
js7CheckHistoryQuery | String | Returns the value of the Returns a copy of the value of the | isStarted |
| String | Returns the value of the Returns a copy of the value of the | controller |
js7CheckHistoryQueryWorkflow | String | Returns the value of the Returns a copy of the value of the | accounting |
js7CheckHistoryQueryJob | String | Returns the value of the Returns a copy of the value of the | my-job |
...
The CheckHistoryJob 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.
...
Code Block | ||||
---|---|---|---|---|
| ||||
js7 {
auth { ... }
configuration { ... }
job { ... }
web { ... }
api-server {
# API Server URL
url = [ "https://joc-2-0-primary:4443" ]
# Option 1: use of a Credential Store
cs-file=${js7.config-directory}"/private/secret.kdbx"
cs-key=${js7.config-directory}"/private/secret.key"
cs-password="secret"
# Option 1: use of references to credentials
username="cs://myAccounts/joc@username"
password="cs://myAccounts/joc@password"
# Option 2: use of account and password
# username="root"
# password="root"
}
} |
Explanation:
- The
api-server
configuration section specifies authentication details for the CheckHistoryJob and can occur in any position directly within thejs7
configuration block. - Configuration items available from this configuration section are explained with the following chapters.
Certificate Based Authentication
JS7 - Certificate based Authentication is configured with the ./config/private/private.conf
file:
- The
url
configuration item is required that specifies the URL of the JS7 REST Web Service API. Typically this corresponds to the JOC Cockpit URL.- Users can set up a number of JOC Cockpit instances that are clustered for automated fail-over.
- Users can set up a load balancer that routes requests to a number of available JOC Cockpit instances.
- For use with the CheckHistoryJob template both active and standby JOC Cockpit instances can be used.
- No further configuration items are used.
- The Client Authentication Certificate has to be available from the keystore file indicated with the
js7.web.https.keystore
orjs7.web.https.client_keystore
settings.- This includes that JOC Cockpit is configured to use a truststore that holds the Root CA Certificate and Intermediate CA Certificate that was used to sign the Agent's Client Authentication Certificate.
- For details see JS7 - JOC Cockpit HTTPS Connections.
User Account / Password Authentication
User account/password authentication is configured with the ./config/private/private.conf
file:
...
- with the following settings:
cs-file:
Specifies the path to a KeePass database file (required).cs-key
: Specifies the path to a KeePass key file (optional).cs-password
: Specifies the password for the KeePass database file (optional).username
: Specifies the path to the entry in the KeePass database that holds the account name (required).password
: Specifies the path to the entry in the KeePass database that holds the password (required).
- that suggest to preferably use a KeePass key file (
cs-key
) to protect the KeePass database. Basically it is pointless to protect a Credential Store by use of a password (cs-password
) that is similarly visible as putting the key under the mat. Use of a key file allows to apply OS ownership and file permissions to protect to the key file from visibility by 3rd parties.
...
username
: Specifies the account name (required).password
: Specifies the plain text password (required).
...
Job Dependencies
The CheckHistoryJob template can be used to implement backward job dependencies:
...