A JOX group - its jobs, dependencies, SQL steps, checks and parameters - can be written as one XML file and imported into JOX. This page describes that file completely, for AI assistants and for technical readers: what to write, what each element means, and what the import and the file check refuse.
The intended flow: an AI assistant designs the jobs and writes the file, a human reviews it, checks it and imports it, and JOX runs it - without AI. Everything on this page is taken from the JOX source code of version 3.4.126. Elements and values that are not listed here should not be written. Four complete examples at the end pass the JOX file check.
JOXExport.<JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION> as the first child of the root, without attributes.TEMPLATE_ID in JOX_JOB_TEMPLATES). Ids are integers that you choose; they only have to be unique within the file.true/false are written bare, with no spaces or line breaks around them.SERVER_TEMPLATE_ID (the machine it runs on) and at least one SUB_GROUP_ID.JOX_FLAG, SQL_ACTION, SQL_PIPE, SQL_CHECK, SQL_EXTRACT).JOX_GROUPS_DEFAULT_SUB_GROUP naming one of its own sub groups.START_NUMBER to one with a higher START_NUMBER.<?xml version="1.0" encoding="UTF-8"?>
<JOXExport>
<JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION>
<!-- server templates, then one or more groups with their objects,
each group followed by its job templates and dependencies -->
</JOXExport>
3.4.126.JOXExport. All objects are direct children of the root, in a flat list; there is no container element for a group.JOX_VERSION. Exactly one, directly under the root, before every object. Its text is the version, written as CDATA. The import refuses a file whose major.minor version is higher than that of the importing JOX; the patch number is not compared.JOX_VERSION. Files exported by JOX carry the attributes EXPORTED and SIGNATURE. A file written by an AI or a generator must not carry them. JOX itself ignores attributes everywhere else.JOX_VERSION.| Kind | How to write it | Notes |
|---|---|---|
| Text (names, SQL, commands, patterns) | <TEMPLATE_NAME><![CDATA[load orders]]></TEMPLATE_NAME> | Stored exactly as written, including spaces and line breaks. CDATA cannot contain the sequence ]]>; split it as ]]]]><![CDATA[> if a text needs it. Plain escaped text (< etc.) is read the same way. |
| Codes (single letters, check signs) | <OPERATIONAL_CODE>C</OPERATIONAL_CODE> | Bare, case as listed on this page. |
| Integers and ids | <START_NUMBER>10</START_NUMBER> | Bare digits, an optional leading minus. No spaces or line breaks inside the element: the import parses the raw text and aborts on 10. The file check trims and does not notice this. |
| Booleans | true or false | Only the exact text true (any case) is true. true with a space or a line break is read as false. |
| Date-time | 20200101000000 | Exactly 14 digits, yyyyMMddHHmmss, local time of the JOX installation. Used by ACTIVATION_TIME and DEACTIVATION_TIME. |
Time of day (START_BEFORE, START_AFTER) | Milliseconds, e.g. 82740000 | A java.sql.Time value: the clock time it stands for depends on the time zone of the JOX installation (at UTC+1, -3600000 is 00:00 and 82740000 is 23:59; at UTC, 00:00 is 0). Omit both unless a time window is needed; see job templates. |
| Dependency line | 5,9,3,L | Four comma-separated fields, no spaces, no CDATA. |
| Long texts | One TEXT element | JOX stores texts in pages of 2000 characters, so descriptions and SQL are not limited in length. |
Column widths. Most other text values are stored in columns of fixed width. The import compares every value with the width of its column in the target repository and refuses the file if one is too long. The standard repository schema has these widths:
| Width | Elements |
|---|---|
| 30 | GROUP_NAME, SUB_GROUP_NAME, SERVER_TEMPLATE_NAME, FUNCTIONALITY_NAME, PAR_NAME, PAR_PLACE_HOLDER, VALUE_FORMAT, PLANNED_INSTANCES, START_INSTANCE, PARALLELISM_DEGREE, RESULT_PLACE_HOLDER, FILE_TEMPLATE_CAPTION, QUERY_TEMPLATE_CAPTION of an associated query, PLACE_HOLDER of a JOX variable |
| 90 | LOCATION_NAME, FLAG_NAME_PATTERN |
| 250 | CHECK_VALUE_PATTERN |
| 254 | TEMPLATE_NAME, JOB_OUTPUT, FILE_TEMPLATE |
| 255 / 256 | VARIABLE_NAME of an OS variable (255), ML_TEMPLATE_NAME (256) |
| 2000 | JOB_CALL, DYNAMIC_LOCATION_PATTERN, EXTRACT_NAME_PATTERN, FIELD_SEPARATOR, RECORD_SEPARATOR, ALLOWED_VALUE, VALUE_PATTERN, ADDRESS, QUERY_TEMPLATE_CAPTION of an SQL action or pipe statement |
The width counts characters after placeholders are written, not after they are replaced: :BUSINESS_DAY: is 14 characters.
SERVER_TEMPLATE_ID, LOCATION_ID and FUNCTIONALITY_ID only; for all other references (GROUP_ID, SUB_GROUP_ID, TEMPLATE_ID, PAR_TEMPLATE_ID, EXECUTE_FUNCTIONALITY_ID and the other ..._FUNCTIONALITY_ID and ..._SERVER_TEMPLATE_ID forms, ...) the order is yours to get right.<EXECUTE_FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>...</JOX_SYSTEM_FUNCTIONALITIES></EXECUTE_FUNCTIONALITY> the first time, <EXECUTE_FUNCTIONALITY_ID>6</EXECUTE_FUNCTIONALITY_ID> later. Writing the same object again under the same id is allowed if its content is identical; the same id with different content is an error.DESCRIPTION, QUERY_PATTERN, SQL_CHECK, EXECUTE_FUNCTIONALITY, ...) encloses exactly one object, and nothing else is closed between the end of that object and the end of the wrapper. Write them exactly as in the examples.JOX_SUB_GROUPS the SUB_GROUP_ID must come before the GROUP_ID (the file check pairs them in that order).This is the order JOX's own export writes; it satisfies every back reference. Each step is a sequence of direct children of JOXExport.
JOX_SERVER_TEMPLATES used by the group (each once).JOX_GROUPS.JOX_PARAMETER_TEMPLATES of the group.JOX_SUB_GROUPS of the group.JOX_GROUPS_DEFAULT_SUB_GROUP.JOX_JOB_TEMPLATES in ascending START_NUMBER. After each template: its JOX_ASSOC_FILES_TEMPLATES, JOX_ASSOC_QUERIES_TEMPLATES, JOX_OS_ENV and JOX_MESSAGE_TEMPLATES, then the JOX_TEMPLATE_DEPENDENCIES lines that end at this template.JOX_OS_ENV of the group.JOX_VARIABLES and JOX_VARIABLE_VALUES of the group.JOX_MESSAGE_TEMPLATES of the group, then JOX_ML_TEMPLATES and JOX_ML_MESSAGES.Parameter templates may also come after the default sub group (as in the examples). Dependencies may also be collected at the end of the group, as long as both templates are above them. Several groups follow one another in the same file; a group referred to by another (for example by a JOX Order job) must come first.
The import runs in the JOX user interface (web or desktop) and asks questions where the file and the installation do not match. It runs in one database transaction; an error aborts it and rolls it back. Before anything is written, it runs the same file check as the command line (section 25), this time also with the column widths of the repository.
| Object | Matched by | Found | Not found |
|---|---|---|---|
| Server template | SERVER_TEMPLATE_NAME | Reused unchanged. | The user picks an existing server template or creates a new one with this name. |
| Location | LOCATION_NAME against name or address | Reused unchanged; its OS variables are not overwritten. | The user picks an existing location or creates a new one. |
| Functionality | FUNCTIONALITY_NAME | Reused if code and type are equal. The import aborts if the name exists with another code or type. | The user picks one with the same code and type, or creates it. |
| Group | GROUP_NAME | The user chooses: rename the existing group (preselected), rename the imported group, or skip the imported group. Renaming adds a prefix and/or suffix (default prefix: the current time as yyyyMMddHHmm_); the result is cut to 30 characters. Skipping maps the file's templates, sub groups and parameters by name onto the existing group and creates nothing of it. Cancel aborts the import. | Created. |
| Job templates, sub groups, parameters, dependencies, SQL content, associated files and queries, OS variables, message templates | - | Always created new inside the imported group. Nothing existing is merged or overwritten. | |
| Mailing list | ML_TEMPLATE_NAME | Reused. | Created. |
| JOX variable | Same placeholder and all flags | Reused. | Created. |
| JOX variable value | Variable and group | Reused if equal; the import aborts if the existing value differs. | Created. |
The file carries only names, codes and types of server templates and functionalities - no host, directory path, account or password. What a name stands for on each machine is defined in the target installation: a job fails at run time if no directory or database account is defined there for its functionality, location and area. Areas are not part of the format at all.
The importing user needs the right to create groups and job templates. Creating new server templates, locations, functionalities or mailing lists needs the right to create locations; OS variables, JOX variables and message templates need their own rights.
Holds a text. It appears only inside a wrapper: DESCRIPTION (almost every object), QUERY_PATTERN, SOURCE_QUERY_PATTERN, TARGET_QUERY_PATTERN, PATTERN, SUBJECT.
| Element | Required | Type | Meaning |
|---|---|---|---|
TEXT_ID | yes | id | Own id. |
TEXT | yes | CDATA | The text. No length limit. |
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>8</TEXT_ID>
<TEXT><![CDATA[What the job does and why.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
Give every group, job template and SQL statement a description: it is what the human reviewing the file reads.
A server template is a name for either a machine on which jobs run or a
database to which queries go. The import maps it by name onto the target
installation. Write one per role; the file check refuses a server
template id used both as a job template's machine and as the database of
an SQL step. Name them so the role is obvious (App Server,
Sales Database).
| Element | Required | Type | Meaning |
|---|---|---|---|
SERVER_TEMPLATE_ID | yes | id | Own id. |
SERVER_TEMPLATE_NAME | yes | CDATA, max. 30 | The name the import matches. |
CRON_LOCATION | no | wraps JOX_LOCATIONS | Links the server template to a location (field cron_location_id). Omit it: the target installation's server templates already have their locations. |
CRON_LOCATION_ID | no | id | The same, by id of a location written earlier. |
DESCRIPTION | no | wraps JOX_TEXTS |
A location is a JOX server process or a database instance with its address. Write one only if you have a reason to; the import maps it by name or address, and a new one would be created with the values below.
| Element | Required | Type | Meaning / values | Default |
|---|---|---|---|---|
LOCATION_ID | yes | id | Own id. | |
LOCATION_NAME | yes | CDATA, max. 90 | Matched against name and address. | |
ADDRESS | yes | CDATA | Host address. | |
LOCATION_TYPE | no | code | P physical, V virtual | P |
OPERATIONAL_CODE | no | code | U Unix, W Windows, O Oracle, 2 DB2, C Cassandra, I Informix, A MariaDB, M MySQL, P PostgreSQL, S Sybase, N Snowflake | U |
RUNNING_JOBS | no | integer | Field running_jobs. | 1000 |
PORT_NUMBER | no | integer | Field port_number. | 1099 |
DISTRIBUTION_BY_AREA, DISTRIBUTION_BY_JOB_TEMPLATE | no | boolean | Fields of the same name. | |
DESCRIPTION | no | wraps JOX_TEXTS |
A functionality is a named role: a directory on a machine (with scripts, or for output) or an account on a database. The file carries only its name, code and type; the target installation defines, per location and area, which directory or which database account it is. At run time JOX puts that directory in front of a job's command line, output file and extract file name.
| Element | Required | Type | Values |
|---|---|---|---|
FUNCTIONALITY_ID | yes | id | Own id. |
OPERATIONAL_CODE | yes | code | U operating system, O relational database (any DBMS - not "Oracle") |
OPERATIONAL_TYPE | yes | code | E directory with executables, L directory for output, A database account |
FUNCTIONALITY_NAME | yes | CDATA, max. 30 | The name the import matches. |
DESCRIPTION | no | wraps JOX_TEXTS |
Usual combinations: U/E for scripts, U/L for output and extract files, O/A for a database account.
| Wrapper (full object) / id element | In | Required code |
|---|---|---|
EXECUTE_FUNCTIONALITY / EXECUTE_FUNCTIONALITY_ID | job template | U (directory with the scripts) |
OUTPUT_FUNCTIONALITY / OUTPUT_FUNCTIONALITY_ID | job template | U (directory for the job output) |
EXTRACT_FUNCTIONALITY / EXTRACT_FUNCTIONALITY_ID | SQL extract | U (directory for the extract file) |
FUNCTIONALITY / FUNCTIONALITY_ID | SQL check, SQL action, SQL extract, associated query | O (database account) |
FUNCTIONALITY / FUNCTIONALITY_ID | associated file | U (directory of the file) |
SOURCE_FUNCTIONALITY, TARGET_FUNCTIONALITY / ..._ID | SQL pipe | O |
The file check verifies the role only for a functionality written in full; for an id reference make sure yourself that the referenced functionality has the right code.
A group holds the job templates. An order is one run of a group:
it is created for one or more sub groups and contains a job for every job
template that belongs to one of them (templates of status D
excepted). A job template that belongs to no sub group never runs.
| Element | Required | Type | Meaning |
|---|---|---|---|
GROUP_ID | yes | id | Own id. |
GROUP_NAME | yes | CDATA, max. 30 | Unique name; the import matches it (see section 6). |
ARCHIVE_FLAGS_AFTER_DAYS | write it | integer | Field archive_flags_after_days ("flag" is JOX's internal word for an order). |
FORCE_ARCHIVING | write it | boolean | Field force_archiving. |
DESCRIPTION | recommended | wraps JOX_TEXTS |
| Element | Required | Type | Meaning |
|---|---|---|---|
SUB_GROUP_ID | yes, before GROUP_ID | id | Own id. |
GROUP_ID | yes | id | The group, written above. |
SUB_GROUP_NAME | yes | CDATA, max. 30 | Name; a group's first sub group is usually DEFAULT. |
DESCRIPTION | no | wraps JOX_TEXTS |
Required once per group, after its sub groups. A new order lands in the default sub group.
| Element | Required | Type | Meaning |
|---|---|---|---|
GROUP_ID | yes | id | The group. |
DEFAULT_SUB_GROUP_ID | yes | id | One of this group's own sub groups. |
A parameter is a value given to an order when it is created. Its placeholder is replaced by the value in job calls, SQL texts, file names and the other places listed in section 23.
| Element | Required | Type | Meaning | Default |
|---|---|---|---|---|
PAR_TEMPLATE_ID | yes | id | Own id. | |
GROUP_ID | yes | id | The group, written above. | |
PAR_NUMBER | yes | integer | Position of the parameter in the group (1, 2, ...). | |
PAR_NAME | yes | CDATA, max. 30 | Name shown when an order is created. | |
PAR_PLACE_HOLDER | yes | CDATA, max. 30 | The literal text that is replaced, colons included, e.g. :BUSINESS_DAY:. | |
INITIAL_ENTRY | write it | boolean | true: an order cannot be created without a value, and the value is checked against the list or the format. | |
USE_VALUE_LIST | write it | boolean | true: the value must be one of the active ALLOWED_VALUEs. | |
VALUE_FORMAT | no | CDATA, max. 30 | A Java regular expression the whole value must match (used when USE_VALUE_LIST is false). | |
SCAN_JOB_OUTPUT | write it | boolean | true: a line <placeholder>=<value> in the output of an OS job of the order sets the parameter (if the value passes the check). | |
ALLOWED_VALUE | no, repeatable | wraps JOX_PAR_TEMPL_ALLOWED_VALUES | One allowed value. | |
DESCRIPTION | recommended | wraps JOX_TEXTS | Shown with the parameter. |
| Element | Required | Type | Meaning |
|---|---|---|---|
PAR_TEMPL_VAL_ID | yes | id | Own id. |
ALLOWED_VALUE | yes | CDATA | The value. |
STATUS | yes | CDATA | A: active. Only active values are accepted. |
DESCRIPTION | no | wraps JOX_TEXTS |
Note that the wrapper and the value element are both called ALLOWED_VALUE; see example 2.
A job template describes one job of an order. Its code says what kind of work it is.
| Code | Kind | Content wrapper | What runs |
|---|---|---|---|
U | OS job | none | JOB_CALL on the machine, from the directory of EXECUTE_FUNCTIONALITY. |
S | SQL action | SQL_ACTION > JOX_JOB_SQL_ACTION_TEMPLATES | One or more SQL statements; see section 15. |
C | SQL check | SQL_CHECK > JOX_JOB_SQL_CHECK_TEMPLATES | A query whose result is compared; green or red. See section 14. |
E | SQL extract | SQL_EXTRACT > JOX_EXTRACT_TEMPLATES | A query written to a file; see section 16. |
P | SQL pipe | SQL_PIPE > JOX_SQL_PIPE_TEMPLATES | Rows from one database inserted into another; see section 17. |
F | JOX Order job | JOX_FLAG > JOX_FLAG_TEMPLATES | Creates an order of a group and waits for it; see section 18. |
A, R | JOX action, reference | - | Not covered by this reference; do not write them. |
If OPERATIONAL_CODE is omitted the template is an OS job (U). For codes S, C, E, P and F, JOB_CALL is not executed; it may be omitted.
| Element | Required | Type | Meaning / values | Default |
|---|---|---|---|---|
TEMPLATE_ID | yes | id | Own id. | |
GROUP_ID | yes | id | The group, written above. | |
START_NUMBER | yes | integer | JOX creates an order's jobs in ascending start number. A dependency must run from a lower to a higher number (section 13). Leave gaps (10, 20, 30). | |
TEMPLATE_NAME | yes | CDATA, max. 254 | Unique within the group (compared without leading and trailing spaces). | |
OPERATIONAL_CODE | no | code | See the table above. | U |
DEFAULT_STATUS | no | code | P planned: JOX starts the job when its premises are met. M manual: the job is created in the order but waits until a user releases it. (The check also accepts W; it is not described here - use P or M.) | P |
SUB_GROUP_ID | yes, repeatable | id | A sub group the template belongs to. At least one, or the template never becomes a job. | |
SERVER_TEMPLATE_ID | yes | id | The machine where the job runs - also for SQL jobs, whose database is named inside their content object. | |
EXECUTE_FUNCTIONALITY / EXECUTE_FUNCTIONALITY_ID | for U | functionality / id | Directory with the executables (code U). Its directory is put in front of JOB_CALL. | |
OUTPUT_FUNCTIONALITY / OUTPUT_FUNCTIONALITY_ID | recommended for U | functionality / id | Directory for the job output (code U). | |
JOB_CALL | for U | CDATA, max. 2000 | Command line, relative to the execute directory. Placeholders are replaced. | |
JOB_OUTPUT | no | CDATA, max. 254 | Base name of the output file. With an output functionality the file is <directory>/<JOB_OUTPUT>.<job id>.<time>.log. If empty, the base name of JOB_CALL is used. | |
DESCRIPTION | recommended | wraps JOX_TEXTS | What the job does and when it is red. | |
JOX_FLAG, SQL_ACTION, SQL_CHECK, SQL_EXTRACT, SQL_PIPE | for F, S, C, E, P | wrapper | Exactly one, matching the code. | |
MAX_REPETITIONS | no | integer | Number of attempts when the job ends with an error: 1 = no repetition, 3 = up to two repetitions. Not allowed above 1 together with DEFAULT_STATUS M. | 1 |
REPETITION_INTERVAL | no | integer | Minutes between the end of a failed attempt and the repetition. | 60 |
PLANNED_INSTANCES | no | CDATA, max. 30 | Number of instances (multi-instance job). May contain a placeholder, resolved at run time. 1: an ordinary job. 0: no instance, the job ends successfully. Above 1: the job becomes a control job that creates that many instance jobs; each instance depends on the control job, and every successor of the control job depends on every instance with the same dependency type. | 1 |
START_INSTANCE | no | text, max. 30 | Number of the first instance. May be a placeholder, but not :IN:. | 1 |
INSTANCE_NUMBER_FORMAT | no | integer | How :IN: is written: 1 two digits (01-99), 2 plain number, 3 three digits (001-999), 4 capital letter (A-Z), 5 small letter (a-z). | 2 |
PARALLELISM_DEGREE | no | text, max. 30 | How many jobs of this template from the same order a JOX server runs at the same time. 0 or empty: no limit. May be a placeholder; a value that is not a number counts as 1. | 0 |
SEQUENCIAL_MULT_EXEC (spelled so) | no | boolean | true: instances run one after another; each depends on the one before. | false |
INTERINSTANCE_DEPENDENCY | no | boolean | With SEQUENCIAL_MULT_EXEC: true makes those links logical (L), false time (T) dependencies. | false |
START_AFTER, START_BEFORE | no | milliseconds | A daily time window, compared by hour and minute: the job starts only between START_AFTER and START_BEFORE; if START_BEFORE is the earlier time, the window spans midnight. Omitted (either one) or equal: no window. The value depends on the time zone (section 3). Omit them unless a window is needed. | none |
AUTOMATIC_DUPLICATION | no | boolean | Field automatic_duplication. Among other things, an SQL extract of a template with true replaces its file from an earlier attempt; with false an existing file makes the extract fail. | true |
LOAD_OUTPUT | no | boolean | Field load_output. | true |
LOAD_OUTPUT_DIRECT | no | boolean | OS job: true writes the output straight into the JOX repository instead of a file. | false |
EXCLUSIVE_EXECUTION | no | boolean | Field exclusive_execution. | false |
DYNAMIC_LOCATION_PATTERN | no | CDATA, max. 2000 | Field dynamic_location_pattern; placeholders are replaced. | empty |
DUPLICATE_FIXED_JOB, FULL_FIX | no | boolean | Fields of the same name. | false |
TO_FIX_TEMPLATE_ID | no | id | Makes this template the on-error template of the earlier template with this id: when a job of that template ends with an error after its last attempt, JOX creates a job of this template in the same order. Use it only on a template that is not reached otherwise (it is not a dependency). |
A dependency is a text line directly under the root:
<JOX_TEMPLATE_DEPENDENCIES>previous,next,group,type</JOX_TEMPLATE_DEPENDENCIES>
| Field | Meaning |
|---|---|
| previous | TEMPLATE_ID of the premise. |
| next | TEMPLATE_ID of the template that waits. |
| group | GROUP_ID of the group both belong to. |
| type | L logical: the next job starts only after the previous one has finished successfully. T time: the next job starts after the previous one has finished, successfully or with an error. |
START_NUMBER than the template that waits. JOX creates an order's jobs in start number order and links a premise only to a job that already exists, so a dependency against the order would be lost. Equal start numbers are allowed only if one of the two templates is an on-error template (named by a TO_FIX_TEMPLATE_ID).Inside <SQL_CHECK> of a code-C template. The query runs on the database; the job is green if the comparison holds, red otherwise.
| Element | Required | Type | Meaning / values |
|---|---|---|---|
SQL_CHECK_ID | yes | id | Own id. |
FUNCTIONALITY / FUNCTIONALITY_ID | yes | functionality / id | Database account (code O, type A). |
SERVER_TEMPLATE_ID | yes | id | The database (a server template used only as a database). |
QUERY_PATTERN | yes | wraps JOX_TEXTS | The query, without a trailing semicolon. Placeholders are replaced. |
CHECK_TYPE | yes | code | R number of rows returned; N numeric value; S string value. For N and S the query must return exactly one row with one column. |
CHECK_SIGN | yes | code | EQ =, NE ≠, GT >, GE ≥, LT <, LE ≤. The result is compared with the check value: result SIGN value. Strings are compared lexically. |
CHECK_VALUE_PATTERN | yes | CDATA, max. 250 | The value compared against; placeholders are replaced. An integer for R, a number for N. |
TIMEOUT | no | text | Query timeout in seconds; 0 = none. May be a placeholder that resolves to a number. |
SAVE_LIMIT | write it | integer | How many result rows are stored in JOX for viewing; 0 = all. |
DESCRIPTION | no | wraps JOX_TEXTS |
Write CHECK_TYPE, CHECK_SIGN and CHECK_VALUE_PATTERN explicitly; the import has no usable default for them.
| Element | Required | Type | Meaning |
|---|---|---|---|
SQL_ACTION_TEMPLATE_ID | yes | id | Own id. |
FUNCTIONALITY / FUNCTIONALITY_ID | yes | functionality / id | Database account (code O). |
SERVER_TEMPLATE_ID | yes | id | The database. Use the id form here, not a nested server template. |
AUTOCOMMIT | write it | boolean | true: every statement is committed by the database driver; JOX neither commits nor rolls back. |
SEPARATE_TRANSACTIONS | write it | boolean | Without autocommit: true commits after every statement. |
CLOSE_TRANSACTION_BY_COMMIT | write it | boolean | Without autocommit and separate transactions: true commits once after the last statement. |
QUERY_TEMPLATE | yes, repeatable | wraps JOX_ACTION_QUERY_TEMPLATES | One statement each. |
DESCRIPTION | no | wraps JOX_TEXTS |
Without autocommit, whatever is not committed by one of the two commit flags is rolled back when the job ends. The usual setting is AUTOCOMMIT false, SEPARATE_TRANSACTIONS false, CLOSE_TRANSACTION_BY_COMMIT true: all statements in one transaction, committed at the end, rolled back on an error.
| Element | Required | Type | Meaning |
|---|---|---|---|
ACTION_QUERY_TEMPLATE_ID | yes | id | Own id. |
START_NUMBER | yes | integer | Order of execution within the action. |
QUERY_TEMPLATE_CAPTION | yes | CDATA | Short title of the statement. |
QUERY_PATTERN | yes | wraps JOX_TEXTS | One SQL statement or block, without a trailing semicolon. Placeholders are replaced. |
STATUS | yes | code | A: active. Only active statements run. |
IGNORE_SQL_ERROR | write it | boolean | true: an error of this statement does not make the job red. |
TIMEOUT | write it | integer | Timeout in seconds; 0 = none. |
RESULT_PLACE_HOLDER | no | text, max. 30 | Name under which the result of a query is kept; an order parameter with SCAN_JOB_OUTPUT and the same placeholder takes the value. Omit it otherwise, and never write the text null. |
DESCRIPTION | no | wraps JOX_TEXTS |
Inside <SQL_EXTRACT>. Runs a query and writes the rows to a file on the machine of the job.
| Element | Required | Type | Meaning |
|---|---|---|---|
EXTRACT_TEMPLATE_ID | yes | id | Own id. |
FUNCTIONALITY / FUNCTIONALITY_ID | yes | functionality / id | Database account (code O). |
SERVER_TEMPLATE_ID | yes | id | The database the query goes to. |
EXTRACT_FUNCTIONALITY / EXTRACT_FUNCTIONALITY_ID | yes | functionality / id | The directory the file is written to (code U). |
QUERY_PATTERN | yes | wraps JOX_TEXTS | The query. Placeholders are replaced. |
EXTRACT_NAME_PATTERN | yes | CDATA | File name relative to the extract directory; placeholders are replaced. Sub directories in it must already exist. |
FIELD_SEPARATOR | yes | CDATA | Written between columns. |
RECORD_SEPARATOR | yes | CDATA | Written after each row; a line break is a literal line break inside the CDATA. |
CREATE_HEADER | write it | boolean | true: the first line holds the column names. |
FIXED_LENGTH | write it | boolean | true: every value is padded to the display width of its column. |
LOAD_DATA | write it | boolean | true: the rows are also stored in JOX for viewing. |
RECORD_NUMBER_LIMIT | write it | integer | With LOAD_DATA: rows stored in JOX at most; the file always gets all rows. 0 = no limit. |
TIMEOUT | write it | integer | Timeout in seconds; 0 = none. |
DESCRIPTION | no | wraps JOX_TEXTS |
If the file exists already, the extract replaces it when the job template has AUTOMATIC_DUPLICATION true, and fails otherwise.
Reads rows from a source database and runs a target statement for every row, binding the source columns in order to the ? markers of the target statement (column 1 to the first ?, and so on). No file in between.
| Element | Required | Type | Meaning |
|---|---|---|---|
SQL_PIPE_TEMPLATE_ID | yes | id | Own id. |
SOURCE_FUNCTIONALITY / SOURCE_FUNCTIONALITY_ID | yes | functionality / id | Account on the source database (code O). |
TARGET_FUNCTIONALITY / TARGET_FUNCTIONALITY_ID | yes | functionality / id | Account on the target database (code O). |
SOURCE_SERVER_TEMPLATE_ID | yes | id | Source database. |
TARGET_SERVER_TEMPLATE_ID | yes | id | Target database. |
AUTOCOMMIT, SEPARATE_TRANSACTIONS, CLOSE_TRANSACTION_BY_COMMIT | write them | boolean | As for the SQL action, applied to the target. |
QUERY_TEMPLATE | yes, repeatable | wraps JOX_PIPE_QUERY_TEMPLATES | One source/target pair each. |
DESCRIPTION | no | wraps JOX_TEXTS |
| Element | Required | Type | Meaning |
|---|---|---|---|
PIPE_QUERY_TEMPLATE_ID | yes | id | Own id. |
START_NUMBER | yes | integer | Order of execution within the pipe. |
QUERY_TEMPLATE_CAPTION | yes | CDATA | Short title. |
SOURCE_QUERY_PATTERN | yes | wraps JOX_TEXTS | The query on the source. |
TARGET_QUERY_PATTERN | yes | wraps JOX_TEXTS | The statement on the target, one ? per source column. |
STATUS | yes | code | A: active. |
IGNORE_SQL_ERROR | write it | boolean | true: an error does not make the job red. |
LOAD_DATA | write it | boolean | true: the source rows are also stored in JOX for viewing. |
RECORD_NUMBER_LIMIT | write it | integer | With LOAD_DATA: rows stored in JOX at most; 0 = no limit. |
TIMEOUT | write it | integer | Timeout in seconds; 0 = none. |
DESCRIPTION | no | wraps JOX_TEXTS |
Inside <JOX_FLAG>. The job creates an order of a group
(its own or another) for the listed sub groups, passes parameter values,
and ends according to its end criterion.
| Element | Required | Type | Meaning / values | Default |
|---|---|---|---|---|
FLAG_TEMPLATE_ID | yes | id | Own id. | |
TEMPLATE_ID | yes | id | The enclosing job template. | |
REF_GROUP_ID | yes | id | The group whose order is created; written above (it may be the group of this job). | |
SUB_GROUP_ID | yes, repeatable | id | Sub groups of the referenced group that the new order is created for. If the referenced group is this job's own group, none of them may be a sub group this job belongs to - that order would contain this job again; the import refuses it. | |
END_CRITERIA | no | code | L: the job ends when all jobs of the created order have run successfully. T: when all jobs of the created order have ended, whatever their result. C: right after the order has been created. R: when the referenced job (REF_TEMPLATE_ID) in the created order has finished. | L |
FAIL_BY_ERROR | no | boolean | Only with END_CRITERIA L: true makes this job red as soon as a job of the created order ends with an error. With any other end criterion it has no effect. | false |
FLAG_NAME_PATTERN | yes | CDATA, max. 90 | Name of the created order; placeholders of this job's order are replaced, and JOX appends _ and a time stamp. | |
REF_TEMPLATE_ID | for R | id | A job template of the referenced group, written above. | |
PARAMETER | no, repeatable | wraps JOX_FLAG_TEMPLATE_PARAMETERS | A value for a parameter of the created order. | |
DESCRIPTION | no | wraps JOX_TEXTS |
| Element | Required | Type | Meaning |
|---|---|---|---|
FLAG_TEMPLATE_PAR_ID | yes | id | Own id. |
PAR_TEMPLATE_ID | yes | id | A parameter template of the referenced group, written above. |
FLAG_TEMPLATE_ID | yes | id | The enclosing JOX_FLAG_TEMPLATES. |
VALUE_PATTERN | yes | CDATA | The value. Placeholders of this job's order are replaced, so :LOAD_DATE: passes the current order's value on. |
DESCRIPTION | no | wraps JOX_TEXTS |
A parameter with INITIAL_ENTRY true in the referenced group must get a valid value here, or the order is not created.
Top-level objects written after their job template. They are saved only if their TEMPLATE_ID refers to a template written above.
| Element | Required | Type | Meaning | Default |
|---|---|---|---|---|
FILE_TEMPLATE_ID | yes | id | Own id. | |
TEMPLATE_ID | yes | id | The job template. | |
FUNCTIONALITY / FUNCTIONALITY_ID | yes | functionality / id | The directory of the file (code U). | |
SERVER_TEMPLATE_ID | yes | id | The machine. | |
FILE_TEMPLATE_CAPTION | yes | CDATA, max. 30 | Title. | |
FILE_TEMPLATE | yes | CDATA, max. 254 | File name relative to the directory; placeholders such as :JOX_ORDER_ID: may be used. | |
ATTACHABLE, LOAD_DATA, DELETE_AFTER_LOAD | write them | boolean | Fields of the same name. | false |
STATUS | yes | code | A | |
DESCRIPTION | no | wraps JOX_TEXTS |
| Element | Required | Type | Meaning |
|---|---|---|---|
QUERY_TEMPLATE_ID | yes | id | Own id. |
TEMPLATE_ID | yes | id | The job template. |
FUNCTIONALITY / FUNCTIONALITY_ID | yes | functionality / id | Database account (code O). |
SERVER_TEMPLATE_ID | yes | id | The database. |
QUERY_TEMPLATE_CAPTION | yes | CDATA, max. 30 | Title. |
QUERY_PATTERN | yes | wraps JOX_TEXTS | The query; placeholders are replaced. |
STATUS | yes | code | A |
ATTACHABLE, EXECUTE_BEFORE_JOB, EXECUTE_JOB_BY_ERROR, EXECUTE_AFTER_JOB, EXECUTE_BY_JOB_ERROR | write them | boolean | Fields of the same name. |
DESCRIPTION | no | wraps JOX_TEXTS |
An environment variable set for the OS jobs of a job template or of a whole group. Top level, after its template or group.
| Element | Required | Type | Meaning / values | Default |
|---|---|---|---|---|
VARIABLE_ID | yes | id | Own id. | |
VARIABLE_NAME | yes | CDATA, max. 255 | Name of the environment variable. | |
VARIABLE_VALUE | yes | CDATA | Value. | |
TEMPLATE_ID or GROUP_ID | yes (one) | id | Scope: one job template, or every template of the group. Written above. | |
ACTIVATION_TIME | yes | 14-digit date-time | Write a time in the past, e.g. 20200101000000; the import sets it to the time of the import. | |
DEACTIVATION_TIME | no | 14-digit date-time | Omit it. A variable whose deactivation time has passed is not imported. | |
SETTING_TYPE | no | code | R replace an existing value, A append to it, I insert before it. | R |
CODED | write it | boolean | Write false. A coded (secret) variable is not taken from the file: the import asks the user for its value. | false |
DESCRIPTION | no | wraps JOX_TEXTS |
Mails on events of a job or a group. Optional; not used in the examples.
| Element | Required | Type | Meaning / values | Default |
|---|---|---|---|---|
MESSAGE_TEMPLATE_ID | yes | id | Own id. | |
TEMPLATE_ID or GROUP_ID | yes (one) | id | Scope: a job template or a group, written above. | |
MESSAGE_TYPE | yes | code | Event, by the names in the code: B begin, E end, S success, F failure, T timeout, D data found, N no data found, O order end, A server start, C server end, G downtime start, H downtime end. | B |
STATUS | yes | code | A active, D inactive. | A |
SUBJECT | yes | wraps JOX_TEXTS | Subject; placeholders are replaced. | |
PATTERN | yes | wraps JOX_TEXTS | Body; placeholders are replaced. | |
ATTACH_OUTPUT, MULTIPLE_REPETITION | write them | boolean | Fields of the same name. | false |
DESCRIPTION | no | wraps JOX_TEXTS |
Do not write TIMEOUT_PATTERN, AREA_ID, LOCATION_ID or DOWNTIME_ID here; never write the text null as a value.
| Object | Elements | Meaning |
|---|---|---|
JOX_ML_TEMPLATES | ML_TEMPLATE_ID (own id), ML_TEMPLATE_NAME (CDATA, max. 256), DESCRIPTION | A mailing list, mapped by name onto the installation; its recipients are maintained there. |
JOX_ML_MESSAGES | MESSAGE_TEMPLATE_ID, ML_TEMPLATE_ID | Sends a message template to a mailing list. Both written above. |
A JOX variable is a placeholder with a value per group (or location or area, defined in the installation). Variables are global to the installation. Optional; not used in the examples.
| Object | Element | Type | Meaning |
|---|---|---|---|
JOX_VARIABLES | VARIABLE_ID | id | Own id. |
PLACE_HOLDER | CDATA, max. 30 | The text replaced by the value at run time. | |
STATUS | code | A active, D inactive. | |
AREA_RELEVANT, LOCATION_RELEVANT, GROUP_RELEVANT, MANDATORY, TRANSLATE_TO_ENV, CODED, SCAN_JOB_OUTPUT_FOR_VALUE | boolean | Fields of the same name. Write all of them. | |
DESCRIPTION | wraps JOX_TEXTS | ||
JOX_VARIABLE_VALUES | VALUE_ID | id | Own id. |
VARIABLE_ID | id | The variable, written above. | |
GROUP_ID | id | The group the value applies to, written above. | |
ACTIVATION_TIME | 14-digit date-time | A time in the past. | |
VARIABLE_VALUE | CDATA | The value. |
An existing variable with the same placeholder and flags is reused. A value that already exists for the group with a different text aborts the import.
JOX replaces placeholders as plain text in: JOB_CALL,
JOB_OUTPUT, DYNAMIC_LOCATION_PATTERN,
PLANNED_INSTANCES, START_INSTANCE,
PARALLELISM_DEGREE, every SQL text (check, action, extract,
pipe source and target, associated query), CHECK_VALUE_PATTERN,
the check TIMEOUT, EXTRACT_NAME_PATTERN,
FLAG_NAME_PATTERN, VALUE_PATTERN, and message
subjects and bodies.
| Placeholder | Replaced by |
|---|---|
the PAR_PLACE_HOLDER of an order parameter | the parameter value of the order |
the PLACE_HOLDER of a JOX variable | its value valid for the job |
:JOX_ORDER_ID: (also :JOX_FLAG_ID:) | id of the order |
:JOX_ORDER_NAME: (also :JOX_FLAG_NAME:) | name of the order |
:JOX_AREA_NAME: (also :JOXAREA:), :JOX_AREA_ID: | area of the order |
:JOX_JOB_ID: | id of the job |
:JOX_JOB_NAME:, :JOX_JOB_TEMPLATE_NAME: | name of the job template |
:JOX_JOB_TEMPLATE_ID:, :JOX_JOB_TEMPLATE_START_NUMBER: | repository id and start number of the job template |
:JOX_JOB_INSTANCE_NUMBER: | instance number of a multi-instance job |
:IN: | instance number in the INSTANCE_NUMBER_FORMAT |
:JOX_JOB_REPETITION_NUMBER: | number of the attempt |
:JOX_JOB_STATUS:, :JOX_JOB_STATUS_NAME: | status code and status name of the job |
:JOXLOCATION: | the location the job runs on |
:StartTime: | start time of the job |
JOX_JOB_FLAGS (orders), JOX_AREAS, JOX_SERVERS, JOX_OS_USERS, JOX_SMTP_CONNECTIONS and an SMTP_CONNECTION inside a location: they cannot be imported. Orders are created in JOX after the import.JOX_JOB_SQL_CHECK_TEMPLATES, JOX_JOB_SQL_ACTION_TEMPLATES, JOX_EXTRACT_TEMPLATES, JOX_SQL_PIPE_TEMPLATES, JOX_FLAG_TEMPLATES) at the top level: they belong inside their job template's wrapper.SERVER_TEMPLATE object inside an SQL action: use SERVER_TEMPLATE_ID.null as a value or id.AREA_ID anywhere: areas are not part of the format and such a reference resolves to nothing.A and R, DEFAULT_STATUS D, view commands, calendars, default locations of order jobs: not covered here.JOX_VERSION, a DOCTYPE.The JOX jar contains a check that reads a file without a database and reports every problem it finds, with its line. The import runs the same check first (there also against the column widths of the repository) and refuses the file on any problem. A file the check accepts can still fail in the import for the reasons in section 26.
java -cp JOXMan.jar com.joxit.jox.xml.JOXXmlCheck my-group.xml
JOXMan.jar is the JOX jar of an installation (its name carries the version, for example JOXMan-3.4.126.jar). It needs no repository connection.
| Exit code | Meaning | Output |
|---|---|---|
| 0 | No problem in the file itself. | stdout: <file>: nothing to complain about in the file itself. and a note that column widths were not checked. |
| 1 | Problems found. | stderr: <file>: N problem(s), then one line per problem: line <n>, <ELEMENT>: <message>. Line 0 means "the file as a whole". |
| 2 | Wrong arguments. | usage: JOXXmlCheck <export file> |
Every problem has the same weight; there are no warnings. Example output:
my-group.xml: 2 problem(s)
line 97, <CHECK_SIGN>: '>=' is not one of [EQ, GE, GT, LE, LT, NE]. A value outside the set does not stop the import - it produces an object that behaves differently than the file says.
line 105, <JOX_TEMPLATE_DEPENDENCIES>: 'X' is not a dependency type - L (logical) or T (time).
Messages are quoted from their beginning; the full text explains the consequence.
| # | Problem | Message begins with | Fix |
|---|---|---|---|
| File | |||
| F1 | File missing or unreadable | there is no file ... / the file could not be read: ... | Check the path. |
| F2 | Not well-formed XML, or a DOCTYPE. Ends the check. | the file is not well-formed XML: ... | Fix the XML; remove any DOCTYPE. |
| F3 | First element is not JOXExport | the file does not start with <JOXExport> - this is not a JOX export | Use JOXExport as root. |
| Version | |||
| V1 | No JOX_VERSION (line 0) | the file has no <JOX_VERSION>. ... | Add <JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION>. |
| V2 | More than one | the file has N <JOX_VERSION> elements; it may have one. | Keep one. |
| V3 | Empty | the version is empty. | Write 3.4.126. |
| V4 | Not at least two numbers separated by a dot | 'x' does not look like a version. ... | Write 3.4.126. |
| V5 | Major.minor newer than the checking JOX | the file was written by JOX ... and this is ... | Use the version of the target JOX. |
| Ids | |||
| I1 | An element whose name ends in _ID is not an integer | 'x' is not a number, and an id has to be one. | Write an integer. |
| I2 | The same own id used for two different objects of one kind | the id N describes something else here than it did on line M. ... | Give different objects different ids. Repeating an identical object is fine. |
| R1 | SERVER_TEMPLATE_ID, LOCATION_ID or FUNCTIONALITY_ID refers to an id not declared above | N is not declared in this file - not above this line, at least. ... | Declare the object (with its name) before its first use. |
| Job templates | |||
| J1 | No SERVER_TEMPLATE_ID as a direct child | the job template says nothing about WHERE it runs ... | Add the machine's server template. |
| J2 | Code F, S, P, C, E or A without its content wrapper | the job template is of code 'X' and carries no <WRAPPER>. ... | Add the wrapper with its content object. |
| J3 | A content object outside a job template | this belongs INSIDE the job template it names, wrapped in <WRAPPER>. ... | Move it into its template. |
| J4 | Job template OPERATIONAL_CODE not in U F R A S P C E | enumeration message (E1) | Use a listed code. |
| J5 | DEFAULT_STATUS not in P M W | E1 | Use P or M. |
| SQL checks, locations, functionalities | |||
| C1 | CHECK_TYPE not in R N S | E1 | |
| C2 | CHECK_SIGN not in EQ NE GT GE LT LE | E1 | Write GE, not >=. |
| L1 | Location OPERATIONAL_CODE not in U W O 2 C I A M P S N | E1 | |
| L2 | LOCATION_TYPE not in P V | E1 | |
| S1 | Functionality OPERATIONAL_CODE not in U O | E1 | |
| S2 | Functionality OPERATIONAL_TYPE not in E L A | E1 | |
| S3 | A functionality written in full under a wrapper of the other role (section 9) | <WRAPPER> wants a directory on a machine and this functionality is a database account ... (or the reverse) | Use a functionality of the right code. |
| ST1 | One server template id used as a job's machine and as a query's database (reported at the end) | server template N is used as the machine a job RUNS ON ... and as the DATABASE a query talks to ... | Two server templates with different names. |
| Groups | |||
| G1 | A group without JOX_GROUPS_DEFAULT_SUB_GROUP | the group says which sub groups it has and not which of them is the DEFAULT one ... | Add it. |
| G2 | The default sub group is not one of the group's own | sub group N is named as this group's default one and is not one of its sub groups. ... | Name one of its sub groups; write SUB_GROUP_ID before GROUP_ID in JOX_SUB_GROUPS. |
| Dependencies | |||
| D1 | Not four fields | '...' has N fields, and a dependency has four: previous, next, group, kind. | |
| D2 | Field 1, 2 or 3 not an integer | field i of '...' is not a number. | |
| D3 | Type not L or T | 'X' is not a dependency type - L (logical) or T (time). | |
| D4 | The same (previous, next) pair twice | the dependency of template B on template A is already declared on line N. ... | Keep one line per pair. |
| D5 | A template id not declared in the file | the previous template N is not declared in this file. ... (or next) | Declare the template, or fix the id. |
| D6 | Premise has a higher start number | the premise '...' (start number x) is numbered after '...' (start number y), which waits for it. ... | Renumber so the premise is lower. |
| D7 | Equal start numbers, neither template an on-error template | the premise '...' (start number x) carries the same number as ... | Renumber. |
| Widths (only in the import, not on the command line) | |||
| W1 | A value longer than its column | the value is N characters and TABLE.COLUMN holds M. ... | Shorten it (section 3). |
| Enumeration message (E1) | |||
| E1 | A value outside its fixed set | 'x' is not one of [...]. A value outside the set does not stop the import - ... (the import refuses the file all the same) | Use a listed value. |
The check does not verify the vocabulary or every required field. These faults pass it and stop the import (rolled back) or produce wrong objects:
DEFAULT_STATUS M together with MAX_REPETITIONS above 1.JOX_OS_ENV without ACTIVATION_TIME, or with a future one and no DEACTIVATION_TIME.CHECK_TYPE, CHECK_SIGN or CHECK_VALUE_PATTERN, a code-U template without JOB_CALL or execute functionality, a template without sub group: these import, but the job does not do what was meant.JOXExport.<JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION> once, first, without attributes.U/E for scripts, U/L for output and extract files, O/A for database accounts; names matching the target installation.SUB_GROUP_ID comes before GROUP_ID.SERVER_TEMPLATE_ID, a code and the matching content wrapper, and a description.CHECK_TYPE, CHECK_SIGN (letters) and CHECK_VALUE_PATTERN; SQL actions say how they commit.java -cp JOXMan.jar com.joxit.jox.xml.JOXXmlCheck file.xml exits with 0.All four files pass JOXXmlCheck of JOX 3.4.126 with exit code 0. Each one is a complete file.
The smallest useful file. Two server templates (a machine and a
database), one group with its default sub group, an OS job and an SQL
check that runs after it (logical dependency, start numbers 10 and 20).
The OS job names its script and log directories, the check its database
account; all three functionalities are written in full at their only use.
The check is green if count(*) is 0 or more, i.e. if the
table can be read.
<?xml version="1.0" encoding="UTF-8"?>
<JOXExport>
<JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION>
<JOX_SERVER_TEMPLATES>
<SERVER_TEMPLATE_ID>1</SERVER_TEMPLATE_ID>
<SERVER_TEMPLATE_NAME><![CDATA[App Server]]></SERVER_TEMPLATE_NAME>
</JOX_SERVER_TEMPLATES>
<JOX_SERVER_TEMPLATES>
<SERVER_TEMPLATE_ID>2</SERVER_TEMPLATE_ID>
<SERVER_TEMPLATE_NAME><![CDATA[App Database]]></SERVER_TEMPLATE_NAME>
</JOX_SERVER_TEMPLATES>
<JOX_GROUPS>
<GROUP_ID>3</GROUP_ID>
<GROUP_NAME><![CDATA[Example Minimal]]></GROUP_NAME>
<ARCHIVE_FLAGS_AFTER_DAYS>7</ARCHIVE_FLAGS_AFTER_DAYS>
<FORCE_ARCHIVING>false</FORCE_ARCHIVING>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>12</TEXT_ID>
<TEXT><![CDATA[Runs a script, then checks that the shipments table is readable.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_GROUPS>
<JOX_SUB_GROUPS>
<SUB_GROUP_ID>4</SUB_GROUP_ID>
<GROUP_ID>3</GROUP_ID>
<SUB_GROUP_NAME><![CDATA[DEFAULT]]></SUB_GROUP_NAME>
</JOX_SUB_GROUPS>
<JOX_GROUPS_DEFAULT_SUB_GROUP>
<GROUP_ID>3</GROUP_ID>
<DEFAULT_SUB_GROUP_ID>4</DEFAULT_SUB_GROUP_ID>
</JOX_GROUPS_DEFAULT_SUB_GROUP>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>5</TEMPLATE_ID>
<GROUP_ID>3</GROUP_ID>
<START_NUMBER>10</START_NUMBER>
<TEMPLATE_NAME><![CDATA[say hello]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<SUB_GROUP_ID>4</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>1</SERVER_TEMPLATE_ID>
<EXECUTE_FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>6</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>E</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[Script Directory]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</EXECUTE_FUNCTIONALITY>
<OUTPUT_FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>7</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>L</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[Log Directory]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</OUTPUT_FUNCTIONALITY>
<JOB_CALL><![CDATA[hello.sh]]></JOB_CALL>
<JOB_OUTPUT><![CDATA[hello]]></JOB_OUTPUT>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>8</TEXT_ID>
<TEXT><![CDATA[Calls hello.sh from the script directory. Red if the script exits with an error.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_JOB_TEMPLATES>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>9</TEMPLATE_ID>
<GROUP_ID>3</GROUP_ID>
<START_NUMBER>20</START_NUMBER>
<TEMPLATE_NAME><![CDATA[count shipments]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>C</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<SUB_GROUP_ID>4</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>1</SERVER_TEMPLATE_ID>
<SQL_CHECK><JOX_JOB_SQL_CHECK_TEMPLATES>
<SQL_CHECK_ID>10</SQL_CHECK_ID>
<FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>11</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>O</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>A</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[App DB Account]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</FUNCTIONALITY>
<SERVER_TEMPLATE_ID>2</SERVER_TEMPLATE_ID>
<QUERY_PATTERN><JOX_TEXTS>
<TEXT_ID>13</TEXT_ID>
<TEXT><![CDATA[select count(*) from shipments]]></TEXT>
</JOX_TEXTS>
</QUERY_PATTERN>
<TIMEOUT>60</TIMEOUT>
<CHECK_TYPE>N</CHECK_TYPE>
<CHECK_SIGN>GE</CHECK_SIGN>
<CHECK_VALUE_PATTERN><![CDATA[0]]></CHECK_VALUE_PATTERN>
<SAVE_LIMIT>10</SAVE_LIMIT>
</JOX_JOB_SQL_CHECK_TEMPLATES>
</SQL_CHECK>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>14</TEXT_ID>
<TEXT><![CDATA[Green if the count of shipments is a number of 0 or more, i.e. the table can be read.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_JOB_TEMPLATES>
<JOX_TEMPLATE_DEPENDENCIES>5,9,3,L</JOX_TEMPLATE_DEPENDENCIES>
</JOXExport>
A daily report. The order asks for two parameters: a business day with a format and a currency from a list. An SQL action replaces the summary of that day in one transaction (two statements, committed at the end), an SQL extract writes it to a CSV file in the report directory, and an OS job compresses the file, with up to three attempts five minutes apart and an environment variable of its own. The extract refers to the database account by id (it was written in full in the action), and the OS job uses the extract's directory as its output directory.
<?xml version="1.0" encoding="UTF-8"?>
<JOXExport>
<JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION>
<JOX_SERVER_TEMPLATES>
<SERVER_TEMPLATE_ID>101</SERVER_TEMPLATE_ID>
<SERVER_TEMPLATE_NAME><![CDATA[Report Server]]></SERVER_TEMPLATE_NAME>
</JOX_SERVER_TEMPLATES>
<JOX_SERVER_TEMPLATES>
<SERVER_TEMPLATE_ID>102</SERVER_TEMPLATE_ID>
<SERVER_TEMPLATE_NAME><![CDATA[Sales Database]]></SERVER_TEMPLATE_NAME>
</JOX_SERVER_TEMPLATES>
<JOX_GROUPS>
<GROUP_ID>103</GROUP_ID>
<GROUP_NAME><![CDATA[Example Daily Report]]></GROUP_NAME>
<ARCHIVE_FLAGS_AFTER_DAYS>30</ARCHIVE_FLAGS_AFTER_DAYS>
<FORCE_ARCHIVING>false</FORCE_ARCHIVING>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>104</TEXT_ID>
<TEXT><![CDATA[Builds the order summary of one business day, writes it to a CSV file and compresses the file. The order asks for the day and the currency.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_GROUPS>
<JOX_PARAMETER_TEMPLATES>
<PAR_TEMPLATE_ID>105</PAR_TEMPLATE_ID>
<GROUP_ID>103</GROUP_ID>
<PAR_NUMBER>1</PAR_NUMBER>
<PAR_NAME><![CDATA[Business day]]></PAR_NAME>
<PAR_PLACE_HOLDER><![CDATA[:BUSINESS_DAY:]]></PAR_PLACE_HOLDER>
<USE_VALUE_LIST>false</USE_VALUE_LIST>
<INITIAL_ENTRY>true</INITIAL_ENTRY>
<SCAN_JOB_OUTPUT>false</SCAN_JOB_OUTPUT>
<VALUE_FORMAT><![CDATA[\d{4}-\d{2}-\d{2}]]></VALUE_FORMAT>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>106</TEXT_ID>
<TEXT><![CDATA[The day to report, as YYYY-MM-DD.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_PARAMETER_TEMPLATES>
<JOX_PARAMETER_TEMPLATES>
<PAR_TEMPLATE_ID>107</PAR_TEMPLATE_ID>
<GROUP_ID>103</GROUP_ID>
<PAR_NUMBER>2</PAR_NUMBER>
<PAR_NAME><![CDATA[Currency]]></PAR_NAME>
<PAR_PLACE_HOLDER><![CDATA[:CURRENCY:]]></PAR_PLACE_HOLDER>
<USE_VALUE_LIST>true</USE_VALUE_LIST>
<INITIAL_ENTRY>true</INITIAL_ENTRY>
<SCAN_JOB_OUTPUT>false</SCAN_JOB_OUTPUT>
<ALLOWED_VALUE><JOX_PAR_TEMPL_ALLOWED_VALUES>
<PAR_TEMPL_VAL_ID>108</PAR_TEMPL_VAL_ID>
<STATUS><![CDATA[A]]></STATUS>
<ALLOWED_VALUE><![CDATA[EUR]]></ALLOWED_VALUE>
</JOX_PAR_TEMPL_ALLOWED_VALUES>
</ALLOWED_VALUE>
<ALLOWED_VALUE><JOX_PAR_TEMPL_ALLOWED_VALUES>
<PAR_TEMPL_VAL_ID>109</PAR_TEMPL_VAL_ID>
<STATUS><![CDATA[A]]></STATUS>
<ALLOWED_VALUE><![CDATA[USD]]></ALLOWED_VALUE>
</JOX_PAR_TEMPL_ALLOWED_VALUES>
</ALLOWED_VALUE>
</JOX_PARAMETER_TEMPLATES>
<JOX_SUB_GROUPS>
<SUB_GROUP_ID>110</SUB_GROUP_ID>
<GROUP_ID>103</GROUP_ID>
<SUB_GROUP_NAME><![CDATA[DEFAULT]]></SUB_GROUP_NAME>
</JOX_SUB_GROUPS>
<JOX_GROUPS_DEFAULT_SUB_GROUP>
<GROUP_ID>103</GROUP_ID>
<DEFAULT_SUB_GROUP_ID>110</DEFAULT_SUB_GROUP_ID>
</JOX_GROUPS_DEFAULT_SUB_GROUP>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>111</TEMPLATE_ID>
<GROUP_ID>103</GROUP_ID>
<START_NUMBER>10</START_NUMBER>
<TEMPLATE_NAME><![CDATA[A1 Build the day summary]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>S</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<SUB_GROUP_ID>110</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>101</SERVER_TEMPLATE_ID>
<SQL_ACTION><JOX_JOB_SQL_ACTION_TEMPLATES>
<SQL_ACTION_TEMPLATE_ID>112</SQL_ACTION_TEMPLATE_ID>
<FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>113</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>O</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>A</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[Sales Account]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</FUNCTIONALITY>
<SERVER_TEMPLATE_ID>102</SERVER_TEMPLATE_ID>
<SEPARATE_TRANSACTIONS>false</SEPARATE_TRANSACTIONS>
<CLOSE_TRANSACTION_BY_COMMIT>true</CLOSE_TRANSACTION_BY_COMMIT>
<AUTOCOMMIT>false</AUTOCOMMIT>
<QUERY_TEMPLATE><JOX_ACTION_QUERY_TEMPLATES>
<ACTION_QUERY_TEMPLATE_ID>114</ACTION_QUERY_TEMPLATE_ID>
<START_NUMBER>10</START_NUMBER>
<QUERY_TEMPLATE_CAPTION><![CDATA[remove the old summary]]></QUERY_TEMPLATE_CAPTION>
<IGNORE_SQL_ERROR>false</IGNORE_SQL_ERROR>
<TIMEOUT>0</TIMEOUT>
<STATUS>A</STATUS>
<QUERY_PATTERN><JOX_TEXTS>
<TEXT_ID>115</TEXT_ID>
<TEXT><![CDATA[delete from day_summary where business_day = date ':BUSINESS_DAY:' and currency = ':CURRENCY:']]></TEXT>
</JOX_TEXTS>
</QUERY_PATTERN>
</JOX_ACTION_QUERY_TEMPLATES>
</QUERY_TEMPLATE>
<QUERY_TEMPLATE><JOX_ACTION_QUERY_TEMPLATES>
<ACTION_QUERY_TEMPLATE_ID>116</ACTION_QUERY_TEMPLATE_ID>
<START_NUMBER>20</START_NUMBER>
<QUERY_TEMPLATE_CAPTION><![CDATA[insert the new summary]]></QUERY_TEMPLATE_CAPTION>
<IGNORE_SQL_ERROR>false</IGNORE_SQL_ERROR>
<TIMEOUT>0</TIMEOUT>
<STATUS>A</STATUS>
<QUERY_PATTERN><JOX_TEXTS>
<TEXT_ID>117</TEXT_ID>
<TEXT><![CDATA[insert into day_summary (business_day, currency, customer_id, amount)
select order_date, currency, customer_id, sum(amount)
from orders
where order_date = date ':BUSINESS_DAY:' and currency = ':CURRENCY:'
group by order_date, currency, customer_id]]></TEXT>
</JOX_TEXTS>
</QUERY_PATTERN>
</JOX_ACTION_QUERY_TEMPLATES>
</QUERY_TEMPLATE>
</JOX_JOB_SQL_ACTION_TEMPLATES>
</SQL_ACTION>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>118</TEXT_ID>
<TEXT><![CDATA[Replaces the summary of the day and currency in one transaction, committed after the second statement.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_JOB_TEMPLATES>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>119</TEMPLATE_ID>
<GROUP_ID>103</GROUP_ID>
<START_NUMBER>20</START_NUMBER>
<TEMPLATE_NAME><![CDATA[A2 Extract the summary]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>E</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<SUB_GROUP_ID>110</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>101</SERVER_TEMPLATE_ID>
<SQL_EXTRACT><JOX_EXTRACT_TEMPLATES>
<EXTRACT_TEMPLATE_ID>120</EXTRACT_TEMPLATE_ID>
<FUNCTIONALITY_ID>113</FUNCTIONALITY_ID>
<SERVER_TEMPLATE_ID>102</SERVER_TEMPLATE_ID>
<EXTRACT_FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>121</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>L</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[Report Directory]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</EXTRACT_FUNCTIONALITY>
<QUERY_PATTERN><JOX_TEXTS>
<TEXT_ID>122</TEXT_ID>
<TEXT><![CDATA[select customer_id, amount
from day_summary
where business_day = date ':BUSINESS_DAY:' and currency = ':CURRENCY:'
order by customer_id]]></TEXT>
</JOX_TEXTS>
</QUERY_PATTERN>
<TIMEOUT>0</TIMEOUT>
<RECORD_NUMBER_LIMIT>100</RECORD_NUMBER_LIMIT>
<FIELD_SEPARATOR><![CDATA[;]]></FIELD_SEPARATOR>
<RECORD_SEPARATOR><![CDATA[
]]></RECORD_SEPARATOR>
<EXTRACT_NAME_PATTERN><![CDATA[summary_:BUSINESS_DAY:_:CURRENCY:.csv]]></EXTRACT_NAME_PATTERN>
<CREATE_HEADER>true</CREATE_HEADER>
<FIXED_LENGTH>false</FIXED_LENGTH>
<LOAD_DATA>true</LOAD_DATA>
</JOX_EXTRACT_TEMPLATES>
</SQL_EXTRACT>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>123</TEXT_ID>
<TEXT><![CDATA[Writes the summary as a semicolon separated file with a header line into the report directory.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_JOB_TEMPLATES>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>124</TEMPLATE_ID>
<GROUP_ID>103</GROUP_ID>
<START_NUMBER>30</START_NUMBER>
<TEMPLATE_NAME><![CDATA[A3 Compress the file]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<MAX_REPETITIONS>3</MAX_REPETITIONS>
<REPETITION_INTERVAL>5</REPETITION_INTERVAL>
<SUB_GROUP_ID>110</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>101</SERVER_TEMPLATE_ID>
<EXECUTE_FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>125</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>E</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[Report Scripts]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</EXECUTE_FUNCTIONALITY>
<OUTPUT_FUNCTIONALITY_ID>121</OUTPUT_FUNCTIONALITY_ID>
<JOB_CALL><![CDATA[compress-report.sh summary_:BUSINESS_DAY:_:CURRENCY:.csv]]></JOB_CALL>
<JOB_OUTPUT><![CDATA[compress-report]]></JOB_OUTPUT>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>126</TEXT_ID>
<TEXT><![CDATA[Compresses the extract. Tries up to three times, five minutes apart.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_JOB_TEMPLATES>
<JOX_OS_ENV>
<VARIABLE_ID>127</VARIABLE_ID>
<VARIABLE_NAME><![CDATA[REPORT_LEVEL]]></VARIABLE_NAME>
<ACTIVATION_TIME>20200101000000</ACTIVATION_TIME>
<TEMPLATE_ID>124</TEMPLATE_ID>
<CODED>false</CODED>
<VARIABLE_VALUE><![CDATA[9]]></VARIABLE_VALUE>
<SETTING_TYPE>R</SETTING_TYPE>
</JOX_OS_ENV>
<JOX_TEMPLATE_DEPENDENCIES>111,119,103,L</JOX_TEMPLATE_DEPENDENCIES>
<JOX_TEMPLATE_DEPENDENCIES>119,124,103,L</JOX_TEMPLATE_DEPENDENCIES>
</JOXExport>
An order of sub group DEFAULT runs only the order job. It creates an
order of sub group LOAD of the same group, passes the load date on
(VALUE_PATTERN :LOAD_DATE:) and, with end
criterion L and FAIL_BY_ERROR, turns red as soon
as a job of that order fails. In the LOAD order a multi-instance job runs
four instances (:IN: = 01 to 04, two at a time), followed by
a manual job that waits for a user.
<?xml version="1.0" encoding="UTF-8"?>
<JOXExport>
<JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION>
<JOX_SERVER_TEMPLATES>
<SERVER_TEMPLATE_ID>201</SERVER_TEMPLATE_ID>
<SERVER_TEMPLATE_NAME><![CDATA[Batch Server]]></SERVER_TEMPLATE_NAME>
</JOX_SERVER_TEMPLATES>
<JOX_GROUPS>
<GROUP_ID>202</GROUP_ID>
<GROUP_NAME><![CDATA[Example Nightly Load]]></GROUP_NAME>
<ARCHIVE_FLAGS_AFTER_DAYS>14</ARCHIVE_FLAGS_AFTER_DAYS>
<FORCE_ARCHIVING>false</FORCE_ARCHIVING>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>203</TEXT_ID>
<TEXT><![CDATA[An order of sub group DEFAULT holds one JOX Order job. It creates an order of sub group LOAD of this group, passes the load date on and waits until every job of that order has run successfully.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_GROUPS>
<JOX_PARAMETER_TEMPLATES>
<PAR_TEMPLATE_ID>204</PAR_TEMPLATE_ID>
<GROUP_ID>202</GROUP_ID>
<PAR_NUMBER>1</PAR_NUMBER>
<PAR_NAME><![CDATA[Load date]]></PAR_NAME>
<PAR_PLACE_HOLDER><![CDATA[:LOAD_DATE:]]></PAR_PLACE_HOLDER>
<USE_VALUE_LIST>false</USE_VALUE_LIST>
<INITIAL_ENTRY>true</INITIAL_ENTRY>
<SCAN_JOB_OUTPUT>false</SCAN_JOB_OUTPUT>
<VALUE_FORMAT><![CDATA[\d{8}]]></VALUE_FORMAT>
</JOX_PARAMETER_TEMPLATES>
<JOX_SUB_GROUPS>
<SUB_GROUP_ID>205</SUB_GROUP_ID>
<GROUP_ID>202</GROUP_ID>
<SUB_GROUP_NAME><![CDATA[DEFAULT]]></SUB_GROUP_NAME>
</JOX_SUB_GROUPS>
<JOX_SUB_GROUPS>
<SUB_GROUP_ID>206</SUB_GROUP_ID>
<GROUP_ID>202</GROUP_ID>
<SUB_GROUP_NAME><![CDATA[LOAD]]></SUB_GROUP_NAME>
</JOX_SUB_GROUPS>
<JOX_GROUPS_DEFAULT_SUB_GROUP>
<GROUP_ID>202</GROUP_ID>
<DEFAULT_SUB_GROUP_ID>205</DEFAULT_SUB_GROUP_ID>
</JOX_GROUPS_DEFAULT_SUB_GROUP>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>207</TEMPLATE_ID>
<GROUP_ID>202</GROUP_ID>
<START_NUMBER>10</START_NUMBER>
<TEMPLATE_NAME><![CDATA[Start the load order]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>F</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<SUB_GROUP_ID>205</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>201</SERVER_TEMPLATE_ID>
<JOX_FLAG><JOX_FLAG_TEMPLATES>
<FLAG_TEMPLATE_ID>208</FLAG_TEMPLATE_ID>
<TEMPLATE_ID>207</TEMPLATE_ID>
<REF_GROUP_ID>202</REF_GROUP_ID>
<END_CRITERIA>L</END_CRITERIA>
<FAIL_BY_ERROR>true</FAIL_BY_ERROR>
<FLAG_NAME_PATTERN><![CDATA[Load_:LOAD_DATE:]]></FLAG_NAME_PATTERN>
<PARAMETER><JOX_FLAG_TEMPLATE_PARAMETERS>
<FLAG_TEMPLATE_PAR_ID>209</FLAG_TEMPLATE_PAR_ID>
<PAR_TEMPLATE_ID>204</PAR_TEMPLATE_ID>
<FLAG_TEMPLATE_ID>208</FLAG_TEMPLATE_ID>
<VALUE_PATTERN><![CDATA[:LOAD_DATE:]]></VALUE_PATTERN>
</JOX_FLAG_TEMPLATE_PARAMETERS>
</PARAMETER>
<SUB_GROUP_ID>206</SUB_GROUP_ID>
</JOX_FLAG_TEMPLATES>
</JOX_FLAG>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>210</TEXT_ID>
<TEXT><![CDATA[Creates an order of sub group LOAD with the same load date. Green when all its jobs ended successfully, red as soon as one of them fails.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_JOB_TEMPLATES>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>211</TEMPLATE_ID>
<GROUP_ID>202</GROUP_ID>
<START_NUMBER>20</START_NUMBER>
<TEMPLATE_NAME><![CDATA[Load one partition]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<PLANNED_INSTANCES><![CDATA[4]]></PLANNED_INSTANCES>
<START_INSTANCE>1</START_INSTANCE>
<PARALLELISM_DEGREE>2</PARALLELISM_DEGREE>
<INSTANCE_NUMBER_FORMAT>1</INSTANCE_NUMBER_FORMAT>
<SUB_GROUP_ID>206</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>201</SERVER_TEMPLATE_ID>
<EXECUTE_FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>212</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>E</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[Load Scripts]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</EXECUTE_FUNCTIONALITY>
<OUTPUT_FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>213</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>L</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[Load Logs]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</OUTPUT_FUNCTIONALITY>
<JOB_CALL><![CDATA[load-partition.sh :LOAD_DATE: :IN:]]></JOB_CALL>
<JOB_OUTPUT><![CDATA[load-partition-:IN:]]></JOB_OUTPUT>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>214</TEXT_ID>
<TEXT><![CDATA[Four instances, partitions 01 to 04, at most two at a time.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_JOB_TEMPLATES>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>215</TEMPLATE_ID>
<GROUP_ID>202</GROUP_ID>
<START_NUMBER>30</START_NUMBER>
<TEMPLATE_NAME><![CDATA[Release the load]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>U</OPERATIONAL_CODE>
<DEFAULT_STATUS>M</DEFAULT_STATUS>
<SUB_GROUP_ID>206</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>201</SERVER_TEMPLATE_ID>
<EXECUTE_FUNCTIONALITY_ID>212</EXECUTE_FUNCTIONALITY_ID>
<OUTPUT_FUNCTIONALITY_ID>213</OUTPUT_FUNCTIONALITY_ID>
<JOB_CALL><![CDATA[release-load.sh :LOAD_DATE:]]></JOB_CALL>
<JOB_OUTPUT><![CDATA[release-load]]></JOB_OUTPUT>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>216</TEXT_ID>
<TEXT><![CDATA[Manual: waits for a user to release it after all partitions are loaded.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_JOB_TEMPLATES>
<JOX_TEMPLATE_DEPENDENCIES>211,215,202,L</JOX_TEMPLATE_DEPENDENCIES>
</JOXExport>
Copies a table from one database to another without a file: an SQL
action empties the target table, the pipe reads every customer from the
source and inserts it into the target, binding the three source columns
to the three ?, and an SQL check of type R
verifies that the target holds rows. Three server templates: the machine
and two databases; the target account is written once and referred to by
id twice.
<?xml version="1.0" encoding="UTF-8"?>
<JOXExport>
<JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION>
<JOX_SERVER_TEMPLATES>
<SERVER_TEMPLATE_ID>301</SERVER_TEMPLATE_ID>
<SERVER_TEMPLATE_NAME><![CDATA[Copy Server]]></SERVER_TEMPLATE_NAME>
</JOX_SERVER_TEMPLATES>
<JOX_SERVER_TEMPLATES>
<SERVER_TEMPLATE_ID>302</SERVER_TEMPLATE_ID>
<SERVER_TEMPLATE_NAME><![CDATA[Legacy Database]]></SERVER_TEMPLATE_NAME>
</JOX_SERVER_TEMPLATES>
<JOX_SERVER_TEMPLATES>
<SERVER_TEMPLATE_ID>303</SERVER_TEMPLATE_ID>
<SERVER_TEMPLATE_NAME><![CDATA[New Database]]></SERVER_TEMPLATE_NAME>
</JOX_SERVER_TEMPLATES>
<JOX_GROUPS>
<GROUP_ID>304</GROUP_ID>
<GROUP_NAME><![CDATA[Example Copy Customers]]></GROUP_NAME>
<ARCHIVE_FLAGS_AFTER_DAYS>30</ARCHIVE_FLAGS_AFTER_DAYS>
<FORCE_ARCHIVING>false</FORCE_ARCHIVING>
</JOX_GROUPS>
<JOX_SUB_GROUPS>
<SUB_GROUP_ID>305</SUB_GROUP_ID>
<GROUP_ID>304</GROUP_ID>
<SUB_GROUP_NAME><![CDATA[DEFAULT]]></SUB_GROUP_NAME>
</JOX_SUB_GROUPS>
<JOX_GROUPS_DEFAULT_SUB_GROUP>
<GROUP_ID>304</GROUP_ID>
<DEFAULT_SUB_GROUP_ID>305</DEFAULT_SUB_GROUP_ID>
</JOX_GROUPS_DEFAULT_SUB_GROUP>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>306</TEMPLATE_ID>
<GROUP_ID>304</GROUP_ID>
<START_NUMBER>10</START_NUMBER>
<TEMPLATE_NAME><![CDATA[Empty the target table]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>S</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<SUB_GROUP_ID>305</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>301</SERVER_TEMPLATE_ID>
<SQL_ACTION><JOX_JOB_SQL_ACTION_TEMPLATES>
<SQL_ACTION_TEMPLATE_ID>307</SQL_ACTION_TEMPLATE_ID>
<FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>308</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>O</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>A</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[New DB Account]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</FUNCTIONALITY>
<SERVER_TEMPLATE_ID>303</SERVER_TEMPLATE_ID>
<SEPARATE_TRANSACTIONS>false</SEPARATE_TRANSACTIONS>
<CLOSE_TRANSACTION_BY_COMMIT>true</CLOSE_TRANSACTION_BY_COMMIT>
<AUTOCOMMIT>false</AUTOCOMMIT>
<QUERY_TEMPLATE><JOX_ACTION_QUERY_TEMPLATES>
<ACTION_QUERY_TEMPLATE_ID>309</ACTION_QUERY_TEMPLATE_ID>
<START_NUMBER>10</START_NUMBER>
<QUERY_TEMPLATE_CAPTION><![CDATA[delete customers]]></QUERY_TEMPLATE_CAPTION>
<IGNORE_SQL_ERROR>false</IGNORE_SQL_ERROR>
<TIMEOUT>0</TIMEOUT>
<STATUS>A</STATUS>
<QUERY_PATTERN><JOX_TEXTS>
<TEXT_ID>310</TEXT_ID>
<TEXT><![CDATA[delete from customer]]></TEXT>
</JOX_TEXTS>
</QUERY_PATTERN>
</JOX_ACTION_QUERY_TEMPLATES>
</QUERY_TEMPLATE>
</JOX_JOB_SQL_ACTION_TEMPLATES>
</SQL_ACTION>
</JOX_JOB_TEMPLATES>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>311</TEMPLATE_ID>
<GROUP_ID>304</GROUP_ID>
<START_NUMBER>20</START_NUMBER>
<TEMPLATE_NAME><![CDATA[Copy the customers]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>P</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<SUB_GROUP_ID>305</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>301</SERVER_TEMPLATE_ID>
<SQL_PIPE><JOX_SQL_PIPE_TEMPLATES>
<SQL_PIPE_TEMPLATE_ID>312</SQL_PIPE_TEMPLATE_ID>
<SOURCE_FUNCTIONALITY><JOX_SYSTEM_FUNCTIONALITIES>
<FUNCTIONALITY_ID>313</FUNCTIONALITY_ID>
<OPERATIONAL_CODE>O</OPERATIONAL_CODE>
<OPERATIONAL_TYPE>A</OPERATIONAL_TYPE>
<FUNCTIONALITY_NAME><![CDATA[Legacy DB Account]]></FUNCTIONALITY_NAME>
</JOX_SYSTEM_FUNCTIONALITIES>
</SOURCE_FUNCTIONALITY>
<TARGET_FUNCTIONALITY_ID>308</TARGET_FUNCTIONALITY_ID>
<SOURCE_SERVER_TEMPLATE_ID>302</SOURCE_SERVER_TEMPLATE_ID>
<TARGET_SERVER_TEMPLATE_ID>303</TARGET_SERVER_TEMPLATE_ID>
<SEPARATE_TRANSACTIONS>false</SEPARATE_TRANSACTIONS>
<CLOSE_TRANSACTION_BY_COMMIT>true</CLOSE_TRANSACTION_BY_COMMIT>
<AUTOCOMMIT>false</AUTOCOMMIT>
<QUERY_TEMPLATE><JOX_PIPE_QUERY_TEMPLATES>
<PIPE_QUERY_TEMPLATE_ID>314</PIPE_QUERY_TEMPLATE_ID>
<START_NUMBER>10</START_NUMBER>
<QUERY_TEMPLATE_CAPTION><![CDATA[customer]]></QUERY_TEMPLATE_CAPTION>
<IGNORE_SQL_ERROR>false</IGNORE_SQL_ERROR>
<TIMEOUT>0</TIMEOUT>
<LOAD_DATA>false</LOAD_DATA>
<RECORD_NUMBER_LIMIT>0</RECORD_NUMBER_LIMIT>
<STATUS>A</STATUS>
<SOURCE_QUERY_PATTERN><JOX_TEXTS>
<TEXT_ID>315</TEXT_ID>
<TEXT><![CDATA[select id, name, country from customers]]></TEXT>
</JOX_TEXTS>
</SOURCE_QUERY_PATTERN>
<TARGET_QUERY_PATTERN><JOX_TEXTS>
<TEXT_ID>316</TEXT_ID>
<TEXT><![CDATA[insert into customer (customer_id, name, country) values (?, ?, ?)]]></TEXT>
</JOX_TEXTS>
</TARGET_QUERY_PATTERN>
</JOX_PIPE_QUERY_TEMPLATES>
</QUERY_TEMPLATE>
</JOX_SQL_PIPE_TEMPLATES>
</SQL_PIPE>
<DESCRIPTION><JOX_TEXTS>
<TEXT_ID>317</TEXT_ID>
<TEXT><![CDATA[Reads every customer from the legacy database and inserts it into the new one, row by row, committed at the end.]]></TEXT>
</JOX_TEXTS>
</DESCRIPTION>
</JOX_JOB_TEMPLATES>
<JOX_JOB_TEMPLATES>
<TEMPLATE_ID>318</TEMPLATE_ID>
<GROUP_ID>304</GROUP_ID>
<START_NUMBER>30</START_NUMBER>
<TEMPLATE_NAME><![CDATA[Check the copy is not empty]]></TEMPLATE_NAME>
<OPERATIONAL_CODE>C</OPERATIONAL_CODE>
<DEFAULT_STATUS>P</DEFAULT_STATUS>
<SUB_GROUP_ID>305</SUB_GROUP_ID>
<SERVER_TEMPLATE_ID>301</SERVER_TEMPLATE_ID>
<SQL_CHECK><JOX_JOB_SQL_CHECK_TEMPLATES>
<SQL_CHECK_ID>319</SQL_CHECK_ID>
<FUNCTIONALITY_ID>308</FUNCTIONALITY_ID>
<SERVER_TEMPLATE_ID>303</SERVER_TEMPLATE_ID>
<QUERY_PATTERN><JOX_TEXTS>
<TEXT_ID>320</TEXT_ID>
<TEXT><![CDATA[select customer_id from customer]]></TEXT>
</JOX_TEXTS>
</QUERY_PATTERN>
<TIMEOUT>0</TIMEOUT>
<CHECK_TYPE>R</CHECK_TYPE>
<CHECK_SIGN>GT</CHECK_SIGN>
<CHECK_VALUE_PATTERN><![CDATA[0]]></CHECK_VALUE_PATTERN>
<SAVE_LIMIT>10</SAVE_LIMIT>
</JOX_JOB_SQL_CHECK_TEMPLATES>
</SQL_CHECK>
</JOX_JOB_TEMPLATES>
<JOX_TEMPLATE_DEPENDENCIES>306,311,304,L</JOX_TEMPLATE_DEPENDENCIES>
<JOX_TEMPLATE_DEPENDENCIES>311,318,304,L</JOX_TEMPLATE_DEPENDENCIES>
</JOXExport>
After registering for the JOX demo you get a JOX environment of your own. Import a file written with this reference, create an order and watch it run. Why we let AI design and JOX execute is described on AI designs the jobs, JOX runs them.