Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

File Transfer jobs are technically shell jobs that execute the YADE command line interface (CLI). Therefore the job script looks like this:Image Removed


Code Block
languagebash
titleYADE Client Job Script example
linenumberstrue
#!/bin/sh

$JS7_YADE_BIN \
  -profile $YADE_PROFILE \
  -file_path $YADE_FILE_PATH


Explanation:

  • The job script can make use of a number of JS7 - Job Environment Variables that are automatically available. This includes any environment variables prefixed with JS7 such as:
    • JS7_YADE_BIN points to the YADE start script that is available
      • for Windows from %JS7_AGENT_HOME%/yade/bin/yade.cmd
      • for Unix from $JS7_AGENT_HOME/yade/bin/yade.sh
    • JS7_YADE_CONFIG_DIR points to the YADE configuration directory that corresponds to the Agent's configuration directory, i.e. JS7_AGENT_CONFIG_DIR
  • The following environment variables are specific to this File Transfer job as they are mapped from order variables and node arguments, see JS7 - Order Variables:
    • YADE_PROFILE is the name of the profile to be applied from the the YADE configuration file.
    • YADE_FILE_PATH is the path of the file to be transferred.
  • The mapping of order variables and optionally node arguments to environment variables for the job looks like:


  • The declaration of the above order variables looks like:



  • Note that use of default values is not required. If a no default value is not specified then the order has to specify a value for the variable in question.

...

The YADE Client allows a number of additional command line arguments to be specified:Image Removed


Code Block
languagebash
titleYADE Client Job Script Parameterization example
linenumberstrue
#!/bin/sh

# Any environment variables assigned the job are automatically applied if used by the YADE profile

$JS7_YADE_BIN \
  -settings $JS7_YADE_CONFIG_DIR/yade.xml \
  -profile $YADE_PROFILE \
  -java-options "-Xmx32m" \
  -log-level debug

Explanation:

  • The following command line arguments can be used with a File Transfer job:
    • -settings is the path to a YADE *.xml or *.ini configuration file that holds fragments and profiles for transfer of files.
      • YADE configurations can be managed from the Configuration -> File Transfer View and can be exported to *.xml files.
      • As the YADE configuration file has to be located with an Agent we recommend manually deploying or transferring this file to the Agent.
    • -profile is the name of the profile to be applied from the the YADE configuration file.
    • -java-options are options for the Java Virtual Machine. Frequently such options are used to specify the maximum heap size. By default YADE will use 32 MB, however, if 1000s of files are transferred with a single call to the YADE Client, e.g. when using a file specification to transfer any files from a directory, then it will be necessary to increase the default heap size.
    • -log-level enables to specify Log4j2 log level indicators such as info, debug, trace that will provide more detailed information, e.g. in case that files permanently could not be transferred.
  • The job script is does not indicating indicate a specific selection of files for transfer. This gives you two options:
    1. Hard-wire the file selection directly with the YADE configuration file (yade.xml).
    2. Specify the file selection from an order variable that is mapped to an environment variable with the job script. Use this environment variable with the YADE configuration.
      • Example:
        • Add an environment variable such as e.g. YADE_FILE_SPEC to your mapping of environment variables.
          • The value can be a hard-wired regular expression:



          • The value can be mapped from an order variable or node argument:


        • The YADE configuration can makes use of the ${YADE_FILE_SPEC} environment variable that will be substituted at run-time, e.g. with:



        • Note that this mechanism can be used for any environment variable names that are available for a job and with the YADE configuration.

...

The File Transfer View allows monitoring of current transfers and detailed checking of past and present transfers:


Explanation:

  • The view shows details about each transfer such as
    • the source, target, transfer result that are reported individually for each file included in a transfer,
    • any errors occurring during transfer.
  • The Advanced Search allows individual files to be looked up by name, path etc.

...

  • Connection Management
    • Use of secure protocols such as SFTP, FTPS, WebDAVS
    • Use of private/public keys for authentication
    • Use of a YADE Credential Store for  for file transfer connections
  • Access Management
  • Logging
    • The JS7 - Logging stores information about access by users, including connection attempts and permission violations.
    • The JS7 - Audit Log stores information about any operations on file transfers such as starting, stopping a transfer.
    • The JS7 - History holds information about past file transfers.

...

In this situation consider to use the JS7 - Lock InstructionResource Locks to implement an exclusive lock or a shared lock that will limit parallel access to a resource. Any file transfer jobs that cannot immediately acquire a resource lock Resource Lock will wait until the lock is freed.

...