Reference · JOX 3.4.126

The JOX XML format: writing files that import cleanly.

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.

Contents

  1. The rules in brief
  2. File skeleton
  3. Value encodings
  4. Ids and references
  5. Order of objects in the file
  6. How the import maps the file onto an installation
  7. JOX_TEXTS (texts)
  8. JOX_SERVER_TEMPLATES and JOX_LOCATIONS
  9. JOX_SYSTEM_FUNCTIONALITIES
  10. Groups and sub groups
  11. Order parameters
  12. JOX_JOB_TEMPLATES (job templates)
  13. JOX_TEMPLATE_DEPENDENCIES
  14. SQL check (code C)
  15. SQL action (code S)
  16. SQL extract (code E)
  17. SQL pipe (code P)
  18. JOX Order job (code F)
  19. Associated files and queries
  20. JOX_OS_ENV (OS environment variables)
  21. Message templates and mailing lists
  22. JOX variables
  23. Placeholders replaced at run time
  24. What not to write
  25. The file check (JOXXmlCheck)
  26. What only the import finds
  27. Checklist before handing the file to a human
  28. Examples

1. The rules in brief

  1. UTF-8, an XML declaration, no DOCTYPE, root element JOXExport.
  2. Exactly one <JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION> as the first child of the root, without attributes.
  3. Every object carries its own id element (for example TEMPLATE_ID in JOX_JOB_TEMPLATES). Ids are integers that you choose; they only have to be unique within the file.
  4. An object that is referred to by id must appear earlier in the file than the reference.
  5. Text goes into CDATA. Numbers, codes and true/false are written bare, with no spaces or line breaks around them.
  6. Every job template has its own SERVER_TEMPLATE_ID (the machine it runs on) and at least one SUB_GROUP_ID.
  7. A job template of code F, S, P, C or E carries its content object inside the matching wrapper (JOX_FLAG, SQL_ACTION, SQL_PIPE, SQL_CHECK, SQL_EXTRACT).
  8. A server template is either a machine (where a job runs) or a database (where a query goes), never both.
  9. Every group has a JOX_GROUPS_DEFAULT_SUB_GROUP naming one of its own sub groups.
  10. A dependency runs from a template with a lower START_NUMBER to one with a higher START_NUMBER.
  11. Write only the elements listed on this page. Unknown elements abort the import.
  12. Run the file check before handing the file on: exit code 0 means no problem in the file itself.

2. File skeleton

<?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>
  • Encoding. Write UTF-8. JOX does not take the encoding from the XML declaration; it takes it from the version: a file with version 3.4.126 or later is read as UTF-8, a file with an older version as ISO-8859-1. That is one reason to write exactly 3.4.126.
  • No DOCTYPE. The parser refuses a document type declaration; the check reports such a file as not well-formed. External entities are not resolved.
  • Root. The first element must be 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.
  • No attributes on 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.
  • Comments. XML comments are allowed, also before JOX_VERSION.

3. Value encodings

KindHow to write itNotes
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 (&lt; 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.
Booleanstrue or falseOnly the exact text true (any case) is true. true with a space or a line break is read as false.
Date-time20200101000000Exactly 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. 82740000A 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 line5,9,3,LFour comma-separated fields, no spaces, no CDATA.
Long textsOne TEXT elementJOX 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:

WidthElements
30GROUP_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
90LOCATION_NAME, FLAG_NAME_PATTERN
250CHECK_VALUE_PATTERN
254TEMPLATE_NAME, JOB_OUTPUT, FILE_TEMPLATE
255 / 256VARIABLE_NAME of an OS variable (255), ML_TEMPLATE_NAME (256)
2000JOB_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.

4. Ids and references

  • Ids are local to the file. They are integers you choose. The import never uses them as database keys; it maps each one to a new or an existing repository object. Use a number only once in the whole file - JOX's own export does the same - even though the import keeps ids of different object kinds apart.
  • Always write the object's own id. Each object below lists its own id element. The import pairs ids and objects on a stack; an object without its own id breaks that pairing. Write the own id as the first child.
  • Refer backwards. An object is registered when its closing tag is read. A reference to an id that has not been registered yet resolves to 0: the object then points at nothing, without an error. So every referenced object must appear above the reference. The file check enforces this for 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.
  • Full object or id. Functionalities can be written in full at their first use and by id afterwards: <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.
  • Wrappers. A wrapper element (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.
  • Element order inside an object does not matter to the import, with two exceptions: the rules above about references and wrappers, and in JOX_SUB_GROUPS the SUB_GROUP_ID must come before the GROUP_ID (the file check pairs them in that order).

5. Order of objects in the file

This is the order JOX's own export writes; it satisfies every back reference. Each step is a sequence of direct children of JOXExport.

  1. JOX_SERVER_TEMPLATES used by the group (each once).
  2. JOX_GROUPS.
  3. JOX_PARAMETER_TEMPLATES of the group.
  4. JOX_SUB_GROUPS of the group.
  5. JOX_GROUPS_DEFAULT_SUB_GROUP.
  6. 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.
  7. JOX_OS_ENV of the group.
  8. JOX_VARIABLES and JOX_VARIABLE_VALUES of the group.
  9. 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.

6. How the import maps the file onto an installation

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.

ObjectMatched byFoundNot found
Server templateSERVER_TEMPLATE_NAMEReused unchanged.The user picks an existing server template or creates a new one with this name.
LocationLOCATION_NAME against name or addressReused unchanged; its OS variables are not overwritten.The user picks an existing location or creates a new one.
FunctionalityFUNCTIONALITY_NAMEReused 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.
GroupGROUP_NAMEThe 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 listML_TEMPLATE_NAMEReused.Created.
JOX variableSame placeholder and all flagsReused.Created.
JOX variable valueVariable and groupReused 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.

7. JOX_TEXTS (texts)

Holds a text. It appears only inside a wrapper: DESCRIPTION (almost every object), QUERY_PATTERN, SOURCE_QUERY_PATTERN, TARGET_QUERY_PATTERN, PATTERN, SUBJECT.

ElementRequiredTypeMeaning
TEXT_IDyesidOwn id.
TEXTyesCDATAThe 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.

8. JOX_SERVER_TEMPLATES and JOX_LOCATIONS

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).

ElementRequiredTypeMeaning
SERVER_TEMPLATE_IDyesidOwn id.
SERVER_TEMPLATE_NAMEyesCDATA, max. 30The name the import matches.
CRON_LOCATIONnowraps JOX_LOCATIONSLinks the server template to a location (field cron_location_id). Omit it: the target installation's server templates already have their locations.
CRON_LOCATION_IDnoidThe same, by id of a location written earlier.
DESCRIPTIONnowraps JOX_TEXTS

JOX_LOCATIONS (only inside CRON_LOCATION)

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.

ElementRequiredTypeMeaning / valuesDefault
LOCATION_IDyesidOwn id.
LOCATION_NAMEyesCDATA, max. 90Matched against name and address.
ADDRESSyesCDATAHost address.
LOCATION_TYPEnocodeP physical, V virtualP
OPERATIONAL_CODEnocodeU Unix, W Windows, O Oracle, 2 DB2, C Cassandra, I Informix, A MariaDB, M MySQL, P PostgreSQL, S Sybase, N SnowflakeU
RUNNING_JOBSnointegerField running_jobs.1000
PORT_NUMBERnointegerField port_number.1099
DISTRIBUTION_BY_AREA, DISTRIBUTION_BY_JOB_TEMPLATEnobooleanFields of the same name.
DESCRIPTIONnowraps JOX_TEXTS

9. JOX_SYSTEM_FUNCTIONALITIES

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.

ElementRequiredTypeValues
FUNCTIONALITY_IDyesidOwn id.
OPERATIONAL_CODEyescodeU operating system, O relational database (any DBMS - not "Oracle")
OPERATIONAL_TYPEyescodeE directory with executables, L directory for output, A database account
FUNCTIONALITY_NAMEyesCDATA, max. 30The name the import matches.
DESCRIPTIONnowraps JOX_TEXTS

Usual combinations: U/E for scripts, U/L for output and extract files, O/A for a database account.

Where a functionality goes (roles)

Wrapper (full object) / id elementInRequired code
EXECUTE_FUNCTIONALITY / EXECUTE_FUNCTIONALITY_IDjob templateU (directory with the scripts)
OUTPUT_FUNCTIONALITY / OUTPUT_FUNCTIONALITY_IDjob templateU (directory for the job output)
EXTRACT_FUNCTIONALITY / EXTRACT_FUNCTIONALITY_IDSQL extractU (directory for the extract file)
FUNCTIONALITY / FUNCTIONALITY_IDSQL check, SQL action, SQL extract, associated queryO (database account)
FUNCTIONALITY / FUNCTIONALITY_IDassociated fileU (directory of the file)
SOURCE_FUNCTIONALITY, TARGET_FUNCTIONALITY / ..._IDSQL pipeO

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.

10. Groups and sub groups

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.

JOX_GROUPS

ElementRequiredTypeMeaning
GROUP_IDyesidOwn id.
GROUP_NAMEyesCDATA, max. 30Unique name; the import matches it (see section 6).
ARCHIVE_FLAGS_AFTER_DAYSwrite itintegerField archive_flags_after_days ("flag" is JOX's internal word for an order).
FORCE_ARCHIVINGwrite itbooleanField force_archiving.
DESCRIPTIONrecommendedwraps JOX_TEXTS

JOX_SUB_GROUPS

ElementRequiredTypeMeaning
SUB_GROUP_IDyes, before GROUP_IDidOwn id.
GROUP_IDyesidThe group, written above.
SUB_GROUP_NAMEyesCDATA, max. 30Name; a group's first sub group is usually DEFAULT.
DESCRIPTIONnowraps JOX_TEXTS

JOX_GROUPS_DEFAULT_SUB_GROUP

Required once per group, after its sub groups. A new order lands in the default sub group.

ElementRequiredTypeMeaning
GROUP_IDyesidThe group.
DEFAULT_SUB_GROUP_IDyesidOne of this group's own sub groups.

11. Order parameters

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.

JOX_PARAMETER_TEMPLATES

ElementRequiredTypeMeaningDefault
PAR_TEMPLATE_IDyesidOwn id.
GROUP_IDyesidThe group, written above.
PAR_NUMBERyesintegerPosition of the parameter in the group (1, 2, ...).
PAR_NAMEyesCDATA, max. 30Name shown when an order is created.
PAR_PLACE_HOLDERyesCDATA, max. 30The literal text that is replaced, colons included, e.g. :BUSINESS_DAY:.
INITIAL_ENTRYwrite itbooleantrue: an order cannot be created without a value, and the value is checked against the list or the format.
USE_VALUE_LISTwrite itbooleantrue: the value must be one of the active ALLOWED_VALUEs.
VALUE_FORMATnoCDATA, max. 30A Java regular expression the whole value must match (used when USE_VALUE_LIST is false).
SCAN_JOB_OUTPUTwrite itbooleantrue: a line <placeholder>=<value> in the output of an OS job of the order sets the parameter (if the value passes the check).
ALLOWED_VALUEno, repeatablewraps JOX_PAR_TEMPL_ALLOWED_VALUESOne allowed value.
DESCRIPTIONrecommendedwraps JOX_TEXTSShown with the parameter.

JOX_PAR_TEMPL_ALLOWED_VALUES (inside ALLOWED_VALUE)

ElementRequiredTypeMeaning
PAR_TEMPL_VAL_IDyesidOwn id.
ALLOWED_VALUEyesCDATAThe value.
STATUSyesCDATAA: active. Only active values are accepted.
DESCRIPTIONnowraps JOX_TEXTS

Note that the wrapper and the value element are both called ALLOWED_VALUE; see example 2.

12. JOX_JOB_TEMPLATES (job templates)

A job template describes one job of an order. Its code says what kind of work it is.

Codes (OPERATIONAL_CODE)

CodeKindContent wrapperWhat runs
UOS jobnoneJOB_CALL on the machine, from the directory of EXECUTE_FUNCTIONALITY.
SSQL actionSQL_ACTION > JOX_JOB_SQL_ACTION_TEMPLATESOne or more SQL statements; see section 15.
CSQL checkSQL_CHECK > JOX_JOB_SQL_CHECK_TEMPLATESA query whose result is compared; green or red. See section 14.
ESQL extractSQL_EXTRACT > JOX_EXTRACT_TEMPLATESA query written to a file; see section 16.
PSQL pipeSQL_PIPE > JOX_SQL_PIPE_TEMPLATESRows from one database inserted into another; see section 17.
FJOX Order jobJOX_FLAG > JOX_FLAG_TEMPLATESCreates an order of a group and waits for it; see section 18.
A, RJOX 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.

Elements

ElementRequiredTypeMeaning / valuesDefault
TEMPLATE_IDyesidOwn id.
GROUP_IDyesidThe group, written above.
START_NUMBERyesintegerJOX 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_NAMEyesCDATA, max. 254Unique within the group (compared without leading and trailing spaces).
OPERATIONAL_CODEnocodeSee the table above.U
DEFAULT_STATUSnocodeP 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_IDyes, repeatableidA sub group the template belongs to. At least one, or the template never becomes a job.
SERVER_TEMPLATE_IDyesidThe machine where the job runs - also for SQL jobs, whose database is named inside their content object.
EXECUTE_FUNCTIONALITY / EXECUTE_FUNCTIONALITY_IDfor Ufunctionality / idDirectory with the executables (code U). Its directory is put in front of JOB_CALL.
OUTPUT_FUNCTIONALITY / OUTPUT_FUNCTIONALITY_IDrecommended for Ufunctionality / idDirectory for the job output (code U).
JOB_CALLfor UCDATA, max. 2000Command line, relative to the execute directory. Placeholders are replaced.
JOB_OUTPUTnoCDATA, max. 254Base 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.
DESCRIPTIONrecommendedwraps JOX_TEXTSWhat the job does and when it is red.
JOX_FLAG, SQL_ACTION, SQL_CHECK, SQL_EXTRACT, SQL_PIPEfor F, S, C, E, PwrapperExactly one, matching the code.
MAX_REPETITIONSnointegerNumber 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_INTERVALnointegerMinutes between the end of a failed attempt and the repetition.60
PLANNED_INSTANCESnoCDATA, max. 30Number 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_INSTANCEnotext, max. 30Number of the first instance. May be a placeholder, but not :IN:.1
INSTANCE_NUMBER_FORMATnointegerHow :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_DEGREEnotext, max. 30How 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)nobooleantrue: instances run one after another; each depends on the one before.false
INTERINSTANCE_DEPENDENCYnobooleanWith SEQUENCIAL_MULT_EXEC: true makes those links logical (L), false time (T) dependencies.false
START_AFTER, START_BEFOREnomillisecondsA 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_DUPLICATIONnobooleanField 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_OUTPUTnobooleanField load_output.true
LOAD_OUTPUT_DIRECTnobooleanOS job: true writes the output straight into the JOX repository instead of a file.false
EXCLUSIVE_EXECUTIONnobooleanField exclusive_execution.false
DYNAMIC_LOCATION_PATTERNnoCDATA, max. 2000Field dynamic_location_pattern; placeholders are replaced.empty
DUPLICATE_FIXED_JOB, FULL_FIXnobooleanFields of the same name.false
TO_FIX_TEMPLATE_IDnoidMakes 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).

13. JOX_TEMPLATE_DEPENDENCIES

A dependency is a text line directly under the root:

<JOX_TEMPLATE_DEPENDENCIES>previous,next,group,type</JOX_TEMPLATE_DEPENDENCIES>
FieldMeaning
previousTEMPLATE_ID of the premise.
nextTEMPLATE_ID of the template that waits.
groupGROUP_ID of the group both belong to.
typeL 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.
  • No spaces, no CDATA. Both templates must be written above the line (in the same file).
  • A pair (previous, next) may appear only once, whatever the type.
  • Start-number rule. The premise must have a lower 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).

14. SQL check (code C): JOX_JOB_SQL_CHECK_TEMPLATES

Inside <SQL_CHECK> of a code-C template. The query runs on the database; the job is green if the comparison holds, red otherwise.

ElementRequiredTypeMeaning / values
SQL_CHECK_IDyesidOwn id.
FUNCTIONALITY / FUNCTIONALITY_IDyesfunctionality / idDatabase account (code O, type A).
SERVER_TEMPLATE_IDyesidThe database (a server template used only as a database).
QUERY_PATTERNyeswraps JOX_TEXTSThe query, without a trailing semicolon. Placeholders are replaced.
CHECK_TYPEyescodeR 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_SIGNyescodeEQ =, NE ≠, GT >, GE ≥, LT <, LE ≤. The result is compared with the check value: result SIGN value. Strings are compared lexically.
CHECK_VALUE_PATTERNyesCDATA, max. 250The value compared against; placeholders are replaced. An integer for R, a number for N.
TIMEOUTnotextQuery timeout in seconds; 0 = none. May be a placeholder that resolves to a number.
SAVE_LIMITwrite itintegerHow many result rows are stored in JOX for viewing; 0 = all.
DESCRIPTIONnowraps JOX_TEXTS

Write CHECK_TYPE, CHECK_SIGN and CHECK_VALUE_PATTERN explicitly; the import has no usable default for them.

15. SQL action (code S)

JOX_JOB_SQL_ACTION_TEMPLATES (inside SQL_ACTION)

ElementRequiredTypeMeaning
SQL_ACTION_TEMPLATE_IDyesidOwn id.
FUNCTIONALITY / FUNCTIONALITY_IDyesfunctionality / idDatabase account (code O).
SERVER_TEMPLATE_IDyesidThe database. Use the id form here, not a nested server template.
AUTOCOMMITwrite itbooleantrue: every statement is committed by the database driver; JOX neither commits nor rolls back.
SEPARATE_TRANSACTIONSwrite itbooleanWithout autocommit: true commits after every statement.
CLOSE_TRANSACTION_BY_COMMITwrite itbooleanWithout autocommit and separate transactions: true commits once after the last statement.
QUERY_TEMPLATEyes, repeatablewraps JOX_ACTION_QUERY_TEMPLATESOne statement each.
DESCRIPTIONnowraps 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.

JOX_ACTION_QUERY_TEMPLATES (inside QUERY_TEMPLATE)

ElementRequiredTypeMeaning
ACTION_QUERY_TEMPLATE_IDyesidOwn id.
START_NUMBERyesintegerOrder of execution within the action.
QUERY_TEMPLATE_CAPTIONyesCDATAShort title of the statement.
QUERY_PATTERNyeswraps JOX_TEXTSOne SQL statement or block, without a trailing semicolon. Placeholders are replaced.
STATUSyescodeA: active. Only active statements run.
IGNORE_SQL_ERRORwrite itbooleantrue: an error of this statement does not make the job red.
TIMEOUTwrite itintegerTimeout in seconds; 0 = none.
RESULT_PLACE_HOLDERnotext, max. 30Name 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.
DESCRIPTIONnowraps JOX_TEXTS

16. SQL extract (code E): JOX_EXTRACT_TEMPLATES

Inside <SQL_EXTRACT>. Runs a query and writes the rows to a file on the machine of the job.

ElementRequiredTypeMeaning
EXTRACT_TEMPLATE_IDyesidOwn id.
FUNCTIONALITY / FUNCTIONALITY_IDyesfunctionality / idDatabase account (code O).
SERVER_TEMPLATE_IDyesidThe database the query goes to.
EXTRACT_FUNCTIONALITY / EXTRACT_FUNCTIONALITY_IDyesfunctionality / idThe directory the file is written to (code U).
QUERY_PATTERNyeswraps JOX_TEXTSThe query. Placeholders are replaced.
EXTRACT_NAME_PATTERNyesCDATAFile name relative to the extract directory; placeholders are replaced. Sub directories in it must already exist.
FIELD_SEPARATORyesCDATAWritten between columns.
RECORD_SEPARATORyesCDATAWritten after each row; a line break is a literal line break inside the CDATA.
CREATE_HEADERwrite itbooleantrue: the first line holds the column names.
FIXED_LENGTHwrite itbooleantrue: every value is padded to the display width of its column.
LOAD_DATAwrite itbooleantrue: the rows are also stored in JOX for viewing.
RECORD_NUMBER_LIMITwrite itintegerWith LOAD_DATA: rows stored in JOX at most; the file always gets all rows. 0 = no limit.
TIMEOUTwrite itintegerTimeout in seconds; 0 = none.
DESCRIPTIONnowraps JOX_TEXTS

If the file exists already, the extract replaces it when the job template has AUTOMATIC_DUPLICATION true, and fails otherwise.

17. SQL pipe (code P)

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.

JOX_SQL_PIPE_TEMPLATES (inside SQL_PIPE)

ElementRequiredTypeMeaning
SQL_PIPE_TEMPLATE_IDyesidOwn id.
SOURCE_FUNCTIONALITY / SOURCE_FUNCTIONALITY_IDyesfunctionality / idAccount on the source database (code O).
TARGET_FUNCTIONALITY / TARGET_FUNCTIONALITY_IDyesfunctionality / idAccount on the target database (code O).
SOURCE_SERVER_TEMPLATE_IDyesidSource database.
TARGET_SERVER_TEMPLATE_IDyesidTarget database.
AUTOCOMMIT, SEPARATE_TRANSACTIONS, CLOSE_TRANSACTION_BY_COMMITwrite thembooleanAs for the SQL action, applied to the target.
QUERY_TEMPLATEyes, repeatablewraps JOX_PIPE_QUERY_TEMPLATESOne source/target pair each.
DESCRIPTIONnowraps JOX_TEXTS

JOX_PIPE_QUERY_TEMPLATES (inside QUERY_TEMPLATE)

ElementRequiredTypeMeaning
PIPE_QUERY_TEMPLATE_IDyesidOwn id.
START_NUMBERyesintegerOrder of execution within the pipe.
QUERY_TEMPLATE_CAPTIONyesCDATAShort title.
SOURCE_QUERY_PATTERNyeswraps JOX_TEXTSThe query on the source.
TARGET_QUERY_PATTERNyeswraps JOX_TEXTSThe statement on the target, one ? per source column.
STATUSyescodeA: active.
IGNORE_SQL_ERRORwrite itbooleantrue: an error does not make the job red.
LOAD_DATAwrite itbooleantrue: the source rows are also stored in JOX for viewing.
RECORD_NUMBER_LIMITwrite itintegerWith LOAD_DATA: rows stored in JOX at most; 0 = no limit.
TIMEOUTwrite itintegerTimeout in seconds; 0 = none.
DESCRIPTIONnowraps JOX_TEXTS

18. JOX Order job (code F): JOX_FLAG_TEMPLATES

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.

ElementRequiredTypeMeaning / valuesDefault
FLAG_TEMPLATE_IDyesidOwn id.
TEMPLATE_IDyesidThe enclosing job template.
REF_GROUP_IDyesidThe group whose order is created; written above (it may be the group of this job).
SUB_GROUP_IDyes, repeatableidSub 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_CRITERIAnocodeL: 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_ERRORnobooleanOnly 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_PATTERNyesCDATA, max. 90Name of the created order; placeholders of this job's order are replaced, and JOX appends _ and a time stamp.
REF_TEMPLATE_IDfor RidA job template of the referenced group, written above.
PARAMETERno, repeatablewraps JOX_FLAG_TEMPLATE_PARAMETERSA value for a parameter of the created order.
DESCRIPTIONnowraps JOX_TEXTS

JOX_FLAG_TEMPLATE_PARAMETERS (inside PARAMETER)

ElementRequiredTypeMeaning
FLAG_TEMPLATE_PAR_IDyesidOwn id.
PAR_TEMPLATE_IDyesidA parameter template of the referenced group, written above.
FLAG_TEMPLATE_IDyesidThe enclosing JOX_FLAG_TEMPLATES.
VALUE_PATTERNyesCDATAThe value. Placeholders of this job's order are replaced, so :LOAD_DATE: passes the current order's value on.
DESCRIPTIONnowraps JOX_TEXTS

A parameter with INITIAL_ENTRY true in the referenced group must get a valid value here, or the order is not created.

19. Associated files and queries

Top-level objects written after their job template. They are saved only if their TEMPLATE_ID refers to a template written above.

JOX_ASSOC_FILES_TEMPLATES

ElementRequiredTypeMeaningDefault
FILE_TEMPLATE_IDyesidOwn id.
TEMPLATE_IDyesidThe job template.
FUNCTIONALITY / FUNCTIONALITY_IDyesfunctionality / idThe directory of the file (code U).
SERVER_TEMPLATE_IDyesidThe machine.
FILE_TEMPLATE_CAPTIONyesCDATA, max. 30Title.
FILE_TEMPLATEyesCDATA, max. 254File name relative to the directory; placeholders such as :JOX_ORDER_ID: may be used.
ATTACHABLE, LOAD_DATA, DELETE_AFTER_LOADwrite thembooleanFields of the same name.false
STATUSyescodeA
DESCRIPTIONnowraps JOX_TEXTS

JOX_ASSOC_QUERIES_TEMPLATES

ElementRequiredTypeMeaning
QUERY_TEMPLATE_IDyesidOwn id.
TEMPLATE_IDyesidThe job template.
FUNCTIONALITY / FUNCTIONALITY_IDyesfunctionality / idDatabase account (code O).
SERVER_TEMPLATE_IDyesidThe database.
QUERY_TEMPLATE_CAPTIONyesCDATA, max. 30Title.
QUERY_PATTERNyeswraps JOX_TEXTSThe query; placeholders are replaced.
STATUSyescodeA
ATTACHABLE, EXECUTE_BEFORE_JOB, EXECUTE_JOB_BY_ERROR, EXECUTE_AFTER_JOB, EXECUTE_BY_JOB_ERRORwrite thembooleanFields of the same name.
DESCRIPTIONnowraps JOX_TEXTS

20. JOX_OS_ENV (OS environment variables)

An environment variable set for the OS jobs of a job template or of a whole group. Top level, after its template or group.

ElementRequiredTypeMeaning / valuesDefault
VARIABLE_IDyesidOwn id.
VARIABLE_NAMEyesCDATA, max. 255Name of the environment variable.
VARIABLE_VALUEyesCDATAValue.
TEMPLATE_ID or GROUP_IDyes (one)idScope: one job template, or every template of the group. Written above.
ACTIVATION_TIMEyes14-digit date-timeWrite a time in the past, e.g. 20200101000000; the import sets it to the time of the import.
DEACTIVATION_TIMEno14-digit date-timeOmit it. A variable whose deactivation time has passed is not imported.
SETTING_TYPEnocodeR replace an existing value, A append to it, I insert before it.R
CODEDwrite itbooleanWrite false. A coded (secret) variable is not taken from the file: the import asks the user for its value.false
DESCRIPTIONnowraps JOX_TEXTS

21. Message templates and mailing lists

Mails on events of a job or a group. Optional; not used in the examples.

JOX_MESSAGE_TEMPLATES

ElementRequiredTypeMeaning / valuesDefault
MESSAGE_TEMPLATE_IDyesidOwn id.
TEMPLATE_ID or GROUP_IDyes (one)idScope: a job template or a group, written above.
MESSAGE_TYPEyescodeEvent, 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
STATUSyescodeA active, D inactive.A
SUBJECTyeswraps JOX_TEXTSSubject; placeholders are replaced.
PATTERNyeswraps JOX_TEXTSBody; placeholders are replaced.
ATTACH_OUTPUT, MULTIPLE_REPETITIONwrite thembooleanFields of the same name.false
DESCRIPTIONnowraps JOX_TEXTS

Do not write TIMEOUT_PATTERN, AREA_ID, LOCATION_ID or DOWNTIME_ID here; never write the text null as a value.

JOX_ML_TEMPLATES (mailing lists) and JOX_ML_MESSAGES

ObjectElementsMeaning
JOX_ML_TEMPLATESML_TEMPLATE_ID (own id), ML_TEMPLATE_NAME (CDATA, max. 256), DESCRIPTIONA mailing list, mapped by name onto the installation; its recipients are maintained there.
JOX_ML_MESSAGESMESSAGE_TEMPLATE_ID, ML_TEMPLATE_IDSends a message template to a mailing list. Both written above.

22. JOX variables

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.

ObjectElementTypeMeaning
JOX_VARIABLESVARIABLE_IDidOwn id.
PLACE_HOLDERCDATA, max. 30The text replaced by the value at run time.
STATUScodeA active, D inactive.
AREA_RELEVANT, LOCATION_RELEVANT, GROUP_RELEVANT, MANDATORY, TRANSLATE_TO_ENV, CODED, SCAN_JOB_OUTPUT_FOR_VALUEbooleanFields of the same name. Write all of them.
DESCRIPTIONwraps JOX_TEXTS
JOX_VARIABLE_VALUESVALUE_IDidOwn id.
VARIABLE_IDidThe variable, written above.
GROUP_IDidThe group the value applies to, written above.
ACTIVATION_TIME14-digit date-timeA time in the past.
VARIABLE_VALUECDATAThe 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.

23. Placeholders replaced at run time

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.

PlaceholderReplaced by
the PAR_PLACE_HOLDER of an order parameterthe parameter value of the order
the PLACE_HOLDER of a JOX variableits 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

24. What not to write

  • 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.
  • Any element not listed on this page. Unknown elements abort the import in most objects and are silently dropped in others.
  • Content objects (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.
  • A nested SERVER_TEMPLATE object inside an SQL action: use SERVER_TEMPLATE_ID.
  • The text null as a value or id.
  • AREA_ID anywhere: areas are not part of the format and such a reference resolves to nothing.
  • Job template codes A and R, DEFAULT_STATUS D, view commands, calendars, default locations of order jobs: not covered here.
  • Attributes on JOX_VERSION, a DOCTYPE.

25. The file check (JOXXmlCheck)

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.

Running it

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 codeMeaningOutput
0No problem in the file itself.stdout: <file>: nothing to complain about in the file itself. and a note that column widths were not checked.
1Problems found.stderr: <file>: N problem(s), then one line per problem: line <n>, <ELEMENT>: <message>. Line 0 means "the file as a whole".
2Wrong 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).

The rules

Messages are quoted from their beginning; the full text explains the consequence.

#ProblemMessage begins withFix
File
F1File missing or unreadablethere is no file ... / the file could not be read: ...Check the path.
F2Not well-formed XML, or a DOCTYPE. Ends the check.the file is not well-formed XML: ...Fix the XML; remove any DOCTYPE.
F3First element is not JOXExportthe file does not start with <JOXExport> - this is not a JOX exportUse JOXExport as root.
Version
V1No JOX_VERSION (line 0)the file has no <JOX_VERSION>. ...Add <JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION>.
V2More than onethe file has N <JOX_VERSION> elements; it may have one.Keep one.
V3Emptythe version is empty.Write 3.4.126.
V4Not at least two numbers separated by a dot'x' does not look like a version. ...Write 3.4.126.
V5Major.minor newer than the checking JOXthe file was written by JOX ... and this is ...Use the version of the target JOX.
Ids
I1An 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.
I2The same own id used for two different objects of one kindthe id N describes something else here than it did on line M. ...Give different objects different ids. Repeating an identical object is fine.
R1SERVER_TEMPLATE_ID, LOCATION_ID or FUNCTIONALITY_ID refers to an id not declared aboveN is not declared in this file - not above this line, at least. ...Declare the object (with its name) before its first use.
Job templates
J1No SERVER_TEMPLATE_ID as a direct childthe job template says nothing about WHERE it runs ...Add the machine's server template.
J2Code F, S, P, C, E or A without its content wrapperthe job template is of code 'X' and carries no <WRAPPER>. ...Add the wrapper with its content object.
J3A content object outside a job templatethis belongs INSIDE the job template it names, wrapped in <WRAPPER>. ...Move it into its template.
J4Job template OPERATIONAL_CODE not in U F R A S P C Eenumeration message (E1)Use a listed code.
J5DEFAULT_STATUS not in P M WE1Use P or M.
SQL checks, locations, functionalities
C1CHECK_TYPE not in R N SE1
C2CHECK_SIGN not in EQ NE GT GE LT LEE1Write GE, not >=.
L1Location OPERATIONAL_CODE not in U W O 2 C I A M P S NE1
L2LOCATION_TYPE not in P VE1
S1Functionality OPERATIONAL_CODE not in U OE1
S2Functionality OPERATIONAL_TYPE not in E L AE1
S3A 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.
ST1One 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
G1A group without JOX_GROUPS_DEFAULT_SUB_GROUPthe group says which sub groups it has and not which of them is the DEFAULT one ...Add it.
G2The default sub group is not one of the group's ownsub 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
D1Not four fields'...' has N fields, and a dependency has four: previous, next, group, kind.
D2Field 1, 2 or 3 not an integerfield i of '...' is not a number.
D3Type not L or T'X' is not a dependency type - L (logical) or T (time).
D4The same (previous, next) pair twicethe dependency of template B on template A is already declared on line N. ...Keep one line per pair.
D5A template id not declared in the filethe previous template N is not declared in this file. ... (or next)Declare the template, or fix the id.
D6Premise has a higher start numberthe premise '...' (start number x) is numbered after '...' (start number y), which waits for it. ...Renumber so the premise is lower.
D7Equal start numbers, neither template an on-error templatethe premise '...' (start number x) carries the same number as ...Renumber.
Widths (only in the import, not on the command line)
W1A value longer than its columnthe value is N characters and TABLE.COLUMN holds M. ...Shorten it (section 3).
Enumeration message (E1)
E1A 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.

26. What only the import finds

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:

  • An element name not listed on this page.
  • Spaces or line breaks inside a number, id, boolean or dependency line.
  • An object without its own id element.
  • A reference to an object below it (other than the three the check covers): it silently becomes 0.
  • Two job templates with the same name in one group.
  • A functionality whose name exists in the installation with another code or type.
  • DEFAULT_STATUS M together with MAX_REPETITIONS above 1.
  • A JOX Order job that creates an order of its own group for a sub group it belongs to.
  • A JOX_OS_ENV without ACTIVATION_TIME, or with a future one and no DEACTIVATION_TIME.
  • A JOX variable value that exists for the group with another text.
  • Missing rights of the importing user (section 6).
  • Missing 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.

27. Checklist before handing the file to a human

  1. The file is UTF-8, starts with the XML declaration, has no DOCTYPE, and its root is JOXExport.
  2. <JOX_VERSION><![CDATA[3.4.126]]></JOX_VERSION> once, first, without attributes.
  3. Every object has its own id; all ids are integers, unique in the file.
  4. Every reference points to an object above it.
  5. Server templates: one per machine and one per database, never both roles; names at most 30 characters and matching the names in the target installation where they exist.
  6. Functionalities: U/E for scripts, U/L for output and extract files, O/A for database accounts; names matching the target installation.
  7. Every group has sub groups and a default sub group; SUB_GROUP_ID comes before GROUP_ID.
  8. Every job template has a unique name, a start number, at least one sub group, a SERVER_TEMPLATE_ID, a code and the matching content wrapper, and a description.
  9. Every dependency runs from a lower to a higher start number and appears once.
  10. SQL checks have CHECK_TYPE, CHECK_SIGN (letters) and CHECK_VALUE_PATTERN; SQL actions say how they commit.
  11. No whitespace around numbers, ids, booleans and dependency fields; text values within their widths.
  12. Only elements from this page; none of those in section 24.
  13. java -cp JOXMan.jar com.joxit.jox.xml.JOXXmlCheck file.xml exits with 0.
  14. Tell the human which server templates, functionalities and parameters the file expects, so the target installation can provide them.

28. Examples

All four files pass JOXXmlCheck of JOX 3.4.126 with exit code 0. Each one is a complete file.

Example 1: OS job and SQL check with a dependency

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>

Example 2: SQL action, extract, parameters and an OS variable

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>

Example 3: JOX Order job and a multi-instance job

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>

Example 4: SQL pipe

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>
Try it

Import a file and run it in an environment of your own.

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.