Submit hierarchy

Submit hierarchy is a producer that supports one or more levels of subfolders. Since it is a producer, a Submit hierarchy can be used only to submit jobs into a flow. The backing folder (on disk) for a Submit hierarchy should typically be user-managed.

Each subfolder up to the nesting level specified by the "Subfolder levels" property is treated as if it were an individual hot folder.

A file placed inside a subfolder at the specified nesting level, or at any level closer to the main folder, moves along the flow as a file.

A job folder placed inside a subfolder at the specified nesting level moves along the flow with its contents as a single entity (that is, as a job folder).

A job folder placed on the same level as the allowed subfolders is treated as a subfolder by mistake, and its contents are moved along as separate files.

Keywords

Keywords can be used with the search function available in the Flow elements pane.

The keywords for the Submit hierarchy element are:

Connections

Submit hierarchy does not allow incoming connections.

Submit hierarchy injects folder filter properties into its outgoing connections so that it is possible to include/exclude certain subfolders in the hierarchy for particular connections.

Note: The number of eligible jobs for processing is shown in a small rectangle beside the Submit hierarchy element.

Properties

Property

Description

Name

The name of the flow element displayed in the canvas.

Description

A description of the flow element displayed in the canvas. This description is also shown in the tooltip that appears when moving your cursor over the flow element.

Path

The path of the Submit hierarchy's backing folder on disk. This is the highest level where Switch must start searching for files or folders to be processed.

Note:
  • From Switch 13 onwards, it is no longer possible to define "auto-managed" Submit hierarchy elements.
  • If you have different Submit Hierarchy flow elements in one flow, they are allowed to point to (partly) the same paths as required. As this is special behavior (not allowed for other flow elements!):
    • You will get a warning in the error log, but it won't stop the flows from being activated.
    • In the Jobs pane, the content of all Submit hierarchies using the same path will be shown when clicking on each individual element. The same goes for the counters on the canvas.

Leave originals in place

If set to Yes, incoming jobs are left untouched in the folder hierarchy; read-only access rights suffice. For more information, see Leaving originals in place.

If set to No (default value), incoming jobs are moved out of the folder hierarchy; Switch needs full access rights to rename, create and remove files and folders in the hierarchy.

Ignore updates

This option is only available if Leave Originals in place is set to Yes.

If set to Yes, a job will only be processed once, regardless of any changes to the file size or modification date. This can be used for workflows where the input job is replaced by the processing result, to avoid triggering endless loops.

If set to No, the job will be reprocessed when its file size or modification date is different. This allows processing jobs which have the same file name as previously submitted jobs.

Minimum file size (KB)

Used to set the minimum file size (in KB) limit before Switch picks up the files or folders. To set no limits, leave it empty (value None).

Scan every (seconds)

The frequency with which this submit hierarchy is scanned for newly arrived jobs; if set to Default or zero, the global user preference is used instead; see Switch preferences: Processing.

Time-of-day window

If set to Yes, Submit hierarchy detects (and moves) newly arrived jobs only during a certain time of the day (specified in the subordinate properties).

Allow from (hh:mm)

Only available if Time-of-day window is set to Yes.

The time-of-day window during which to detect jobs; the values are structured as "hh:mm" (hours, minutes) indicating a time of day on a 24 hour clock; an empty value means midnight; two identical values mean Submit hierarchy always detects jobs.

Allow to (hh:mm)

Day-of-week window

If set to Yes, Submit hierarchy detects (and moves) newly arrived jobs only during certain days of the week (specified in the subordinate properties).

Allow from

Only available if Day-of-week window is set to Yes.

The days of the week (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday) during which to detect jobs; two identical values mean Submit hierarchy only detects jobs on that specific day.

Allow to

Day-of-month window

If set to Yes, Submit hierarchy detects (and moves) newly arrived jobs only during a certain day of the month (specified in the subordinate properties).

Day

Only available if Day-of-month window is set to Yes.

The day in the month during which to detect jobs, as a number in the range [1 . .31]; the default value (1) means the first or the last day of the month (depending on the following property).

Relative to

Determines whether the day of the month is relative to "Start of the month" or "End of the month".

Subfolder levels

The number of nested subfolder levels considered to be hot folders (as opposed to job folders); indicates how many levels deep Switch must search for new files or jobs. Note that, if the specified level contains another subfolder, this subfolder will be considered as one job, i.e. it will be processed as one entity, and not as a separate job.

Tip: If you are not sure about the number of levels, or if you want all files to be processed separately (regardless of their nesting level in the hierarchy), set the Subfolder levels property to a very high value (for example: 999).

Process these folders

Defines the initial set of folders that should be processed by the Submit hierarchy tool. This set can be adjusted by defining one or more rules in the subsequent properties. Options available in this menu are:
  • All Folders (default)
  • No Folders

Adjusted by (rule 1)

This property defines a rule for adjusting the set of folders to be processed, by including or excluding folders matching or not matching a folder name. Different rules can be applied, and will be processed in the order as they are specified.

Options available in this menu are:

  • None (default)

  • Including folders named

  • Including folders not named

  • Excluding folders named

  • Excluding folders not named

Folder name

The following properties are only available if Adjusted by (rule1) is enabled.

A pattern for the folder name to be included or excluded.

For example: all folders containing a particular prefix (e.g. "input_") or a particular value (e.g. the current date).

Note: If you're using a script expression, remember that the script expression should return a boolean value (true or false), instead of a string matching the folder name. For example, you could create a script expression to filter out all folders smaller than 1 MB. If the checked folder < 1 MB (= matches), the result of the script is "true" and the folder is filtered out.

On levels

The level or range of levels to which this rule applies.

Restriction

Defines an optional restriction on the parent or ancestors for the folder in this rule. Options available are:
  • None (default)

  • With immediate parent named

  • With no immediate parent named

  • With any ancestor named

  • With no ancestor named

Parent name or Ancestor name

Only available if a restriction is set on a parent or ancestor for the folder.

A pattern for the folder name of the parent or ancestor.

Nesting

Defines whether this rule operates on subfolders of the target folder, which are deeper in the hierarchy than the defined level range. The matching rule is also applied on these subfolders.

  • Exclude/Include nested subfolders as well
  • Don't exclude/include nested subfolders

Adjusted by (rule 2)

. . .

Adjusted by (rule 5)

You can configure up to 5 rules for adjusting the set of folders to be processed. The properties are identical to Adjusted by (rule 1).

Attach hierarchy info

If set to Yes, (part of) a job's submit location, depending on the hierarchy info configuration, is added to its hierarchy location path as it is submitted in the flow.

By default, once the files have been processed, they are all placed in the same output folder, at the highest level. However, if you set Attach hierarchy info to Yes, the original location of the job in the hierarchy is stored with the file (in a so called “internal job ticket”), so that it can be used to recreate the hierarchy.

Thanks to this mechanism, you can "on the fly" (so while the job is passing different flow elements) construct the path in which the processed job will be placed.

For more details, refer to Using hierarchy info.

Include hierarchy name

Only available if Attach hierarchy info is enabled.

If set to Yes, the name of the flow element is included at the top of the remembered location path.

Include subfolder levels

Identifies the number of hierarchy segments in the hierarchy information.

Save top subfolders

If set to Yes, the top-most subfolders are remembered in the location path.

If set to No, the bottom-most subfolders are remembered.

Attach email info

Email addresses and body text specified with the editor for this property are added to each job's email info as the job is submitted in the flow; the information added can vary depending on the subfolder in which the job was submitted. See Using email info in Switch.

Allow subfolder cleanup

If set to Yes, subfolders created in the Submit hierarchy (by an external process or a user) are automatically removed when they become empty.

Starting from this level

Only available if Allow subfolder cleanup is set to Yes.

The number of upper levels for which not to clean up subfolders