Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

Introduction

Display feature availability
StartingFromRelease2.4.0

The JITL CheckHistoryJob template can be used to check past executions of workflows and jobs.

...

Return VariableData TypePurposeExample
js7CheckHistoryResultBoolean

Returns the Boolean result of the query.
Note: The query result is similarly returned with the returnCode return variable and the values 0=true, 1=false.

true, false

js7CheckHistoryResultControllerId

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
js7CheckHistoryResultWorkflowString

Returns the workflow name 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 workflow name of the youngest resulting history entry.

check_history
js7CheckHistoryResultStartedDate

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
js7CheckHistoryResultCompletedDate

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
js7CheckHistoryQueryString

Returns the value of the query argument.

Returns a copy of the value of the query argument that was used with the query.

isStarted
js7CheckHistoryQueryWorkflowString

Returns the value of the workflow argument.

Returns a copy of the value of the workflow argument that was used with the query.

accounting
js7CheckHistoryQueryJobString

Returns the value of the job argument.

Returns a copy of the value of the job argument that was used with the query.

my-job

Anchor
authentication
authentication
Authentication

api-server {
# API Server URL
url = "https://joc-2-0-secondary:4443"

# Use of Credential Store
cs-file=${js7.config-directory}"/private/secret.kdbx"
cs-key=${js7.config-directory}"/private/secret.key"
cs-password="secret"
account="/myAccounts/joc@username"
password="/myAccounts/joc@password"

...

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.

To this purpose the job template makes use of the Agents ./config/private/private.conf file to find a number of configuration items that allow authentication:

Code Block
titleAgent private.conf file configuration
linenumberstrue
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 
    	account="/myAccounts/joc@username"
	    password="/myAccounts/joc@password"


    	# Option 2: Use of account and password
	    account="root"
    	password="root"
	}
}


Explanation:

  • The api-server configuration section specifies authentication details for the CheckHistoryJob and can occur in any position directly within the js7 configuration block.
  • Configuration items available from this configuration section are explained with the following chapters.

Certificate Based Authentication

For JS7 - Certificate based Authentication 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.
  • the Client Authentication Certificate has to be available from the keystore file indicated with the js7.web.https.keystore or js7.web.https.client_keystore settings.

User Account / Password Authentication

For user account/password authentication configured with the ./config/private/private.conf file

  • the url configuration item is required as explained above.
  • the user account and password can be specified from the following options:
    • Option 1: Use of a JS7 - Credential Store
      • with the following settings:
        • cs-file: Specifies the path to a KeePass database file.
        • cs-key: Specifies the path to a KeePass key file.
        • cs-password: Specifies the password for the KeePass database file.
        • account: Specifies the path to the entry in the KeePass database that holds the account name.
        • password: Specifies the path to the entry in the KeePass database that holds the password.
      • 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 3rd parties.
    • Option 2: Use of user account and password
      • with the following settings:
        • account: Specifies the account name.
        • password: Specifies the plain text password.
      • that include both settings to be visible from the configuration file.

Job Dependencies

The CheckHistoryJob template can be used to implement job dependencies 

...