Assemble job



Assemble job is a processor that offers various schemes for assembling a job folder from individual job files.

Keywords

Keywords can be used with the search function above the Elements pane.

The keywords for the Assemble job element are:


Connections

Assemble job supports outgoing traffic-light connections of the following types:


Properties

Property

Description

Name

The name of the flow element displayed in the canvas

Scheme

Determines the scheme used to assemble jobs:


  • Arbitrary files: combines arbitrary files based on number and/or time

  • Numbers in filename: uses digit groups in the incoming filenames to combine files

  • Filename patterns: uses filename patterns to combine up to 5 related files in a job

  • Ungrouped job: uses the information stored by an instance of ungroup job to reassemble a job

  • Custom: allows specifying a custom formula for determining matching files

Every N jobs

Displayed when Scheme is Arbitrary files. A job is completed whenever it contains at least the indicated number of files; a value of 0 means this option is disabled

Every N minutes

Displayed when Scheme is Arbitrary files. A job is completed whenever more than the indicated time has expired since the previous assembly was completed; a value of 0 means this option is disabled

After N minutes

Displayed when Scheme is Arbitrary files or Custom. A job is completed whenever more than the indicated time has expired since the first job in this assembly arrived; a value of 0 means this option is disabled

Number index for total

Displayed when Scheme is Numbers in filename. The one-based index of the digit group determining the total number of files; automatic means the digit group that represents the largest number

Number index for serial

Displayed when Scheme is Numbers in filename. The one-based index of the digit group determining the serial number for each file; automatic means the digit group that represents the smallest number

Match filename

Displayed when Scheme is Numbers in filename. The filename without the indexed numbers of the files to asemble in job must be the same.

Filename pattern 1

Filename pattern 5

Displayed when Scheme is Filename patterns. Up to five filename patterns (using the regular wildcards ? and *) that serve to detect matching files; empty patterns are ignored

For filenames to match, they must conform to the specified patterns and the text portions matched by the wildcards must be identical

When the Assemble job tool takes an incoming job, it matches the job file name with the file patterns. When the job file name matches with a filename pattern, the matched pattern is no longer used. Therefore, the order in which you enter the filename patterns is important.

For example: You have two filename patterns and one is an extension of the other, viz., *.png and *_test.png. It is recommended to enter *_test.png in the Filename pattern 1 field and enter *.png in Filename pattern 2 field.

Private data key

Displayed when Scheme is Ungrouped job. The first portion of the private data key used to store the ungroup information; specify the same value as in ungroup job

Number of files

Displayed when Scheme is Ungrouped job or Custom. The total number of files expected to complete the output job:


  • Automatic: the same number of files as was present in the original folder before it was ungrouped

  • Inline value: enter an explicit value in the field

  • Define single-line text with variables: a constant integer or a short JavaScript expression in function of the variable "N" (example: "N+2" or "2*N"); this function has NO access to the scripting API

  • Define script expression: a script expression (with full access to the scripting API) that has an integer result; the expression is re-evaluated for each newly arrived job in the context of that job

Job identifier

A string value using variables ( or a script expression), evaluated in the context of each arriving job, that identifies the output job in which the arriving job belongs

The string is used only for the purpose of determining which jobs belong together; it has no other meaning

Complete condition

A job (using Custom scheme) is completed if this condition is true, even if the required number of jobs hasn't arrived. The condition is re-evaluated for each newly arrived job in the context of that job. A value of None means this option is disabled.

Merge metadata

If set to no, the metadata for the assembled job is copied from a single (arbitrary) incoming job, and metadata from all other jobs is lost. If set to yes, the metadata for the assembled job is derived from all incoming jobs:


  • All email addresses are used, and email bodies are merged.

  • User name and Job state will be arbitrarily selected from all jobs, or will be empty if this is empty for all jobs

  • The highest priority among all incoming jobs will be used.

  • Private data and External datasets will all be retained. If multiple jobs have private data or external datasets with the same tag, a dataset or value will be arbitrarily chosen.

    All other metadata will be arbitrarily selected from one of the incoming jobs

Job folder name

The filename of the created job folder, or Automatic to construct a default name depending on the scheme (e.g. the reassemble scheme uses the job name stored by the ungroup tool)

Question marks in the filename pattern are replaced by a running count; e.g. Job??? will produce Job001, Job002, ...

Variables ( and script expressions) are executed in the context of one of the incoming jobs, chosen arbitrarily

Subfolder levels

The number of nested subfolder levels in the job folder being assembled

The tool uses the hierarchy location path or the ungrouped job private data to determine where the job should be stored, up to the specified nesting level (similar to archive hierarchy)

Strip unique name

If set to yes, the unique name prefix is removed before placing the job in the job folder being assembled

Duplicates

Determines what happens when "strip unique name" is set to yes and a job arrives with the same name and location as a job already residing in the job folder being assembled:


  • Overwrite: replace the existing job with the new one – this is the default behavior

  • Keep unique name: preserve the new job's unique name prefix, leaving the existing job untouched (without unique name prefix)

  • Add version number: add an incrementing version number at the end of the filename body for the new job ( "2", "3", … "9", "10", "11"), leaving the existing job untouched

  • Fail: move the new job to the problem jobs folder, leaving the existing job untouched

Orphan timeout (minutes)

The time delay after which incoming jobs are considered orphaned because they are not part of a completed job

Incoming jobs remain in their respective input folder until the last job arrives that completes an output job folder; whenever a new job arrives, the timeout counter is reset for already arrived jobs that are part of the same output job folder

Orphaned jobs are moved along the outgoing data error connection, or if there is no such connection, they are moved to the problem jobs folder