Page History
...
- The Order ID of file orders for example is created like this:
#<ISO date>#F<Seconds since Jan 1st 1970>-<ID of file order source>:<file name>
, where:#<ISO date>#
is the date of appearance of the file, e.g.2021-03-17
., enclosed by #. The date is calculated for the time zone assigned the File Order Source.F
is a qualifier to indicate a File Order Source.<Seconds since Jan 1st 1970>-
is what it says and is followed by a hyphen.<File Order source ID>:
is the unique identifier of the File Order Source configuration object followed by a colon.<file name>
is the name of the incoming file.
- Such file orders can be considered triggers for workflow execution, which implies that the workflow can be executed by the monitoring Agent or by any other Agent.
...
Workflow Name
: A workflow is assigned to which an order is added per incoming file.Agent
: An Agent is assigned that performs file watching. Standalone Agents and Agent Clusters can be assigned. In an Agent Cluster the active Director Agent performs file watching, Subagents do not perform file watching.Directory
: The directory that the Agent watches for incoming files:- Unix: A path can be specified such as
/tmp/incoming
- Windows: A path can be specified with backslashes or forward slashes such as
C:\tmp\incoming
andC:/tmp/incoming
- Unix, Windows: OS environment variables can be used that are known to the Agent, for example from its Instance Start Script. Environment variables and constant strings can be concatenated using the
++
operator and considering quoting for constant strings like this:- Unix:
env("HOME") ++ '/incoming'
- Windows:
env("TMP") ++ '/incoming'
- Unix:
- Unix: A path can be specified such as
Pattern
: The pattern to match an incoming file is not a wildcard expression such as *.csv, instead it represents a Java Regular Expression. The pattern has to match the path of an incoming file including the directory hierarchy, not just the file name. Consider the following examples:- match any files:
.*
- match files with a .csv extension:
.*\.csv$
- match files that end with a date in yyyy-mm-dd format:
.*\d{4}-\d{2}-\d{2}$
- match any files:
Delay
: The delay in seconds for which a file is checked to be stable and does not change its size or timestamp.
Using Files in Workflows
For incoming files the JS7 File Order Source provides a built-in variable $file
that holds the path to the incoming file. This variable does not have to be declared but can be used for example to create an environment variable that is used from a job script:
- The below example assigns the environment variable
FILE
the value of the built-in$file
variable. - This configuration step is the same for jobs executed with Unix or Windows.
In the job script the environment variable FILE
can be used like this:
- The below example shows a Windows job script using
%FILE%
. - For Unix an environment variable is used from
$FILE
or${FILE}
.
File Handling
Checking for Incoming Files
...
Overview
Content Tools