Yade- Yet Another Data Exchange
Introduction: -
JS7 makes use of the YADE Add-on for transferring files using several protocols such as FTP, FTPS, SFTP, WebDAV, HTTP/HTTPS etc.
JS7 Yade uses three segments to perform file transfer Fragment, Profile, Operation.
Steps -
- Create a workflow (w).
- Create a Job Resource -jr(A Job Resource provides the environment configuration required for executing a job, such as paths, variables, or credentials. It helps decouple script logic from environment-specific settings.
- Add arguments (e.g., test) and environment variables (e.g., TEST).
- In the workflow, click the job and declare the name, label, agent, and job resource.
- Use this script in job.
#!/bin/bash
##!include YADE-SetOptions
"$JS7_YADE_BIN"
--settings="$ENV_name"
--profile “profile_name”
- At settings, provide the name of the environment variable used in the job resource. In the profile parameter, specify the name of the profile (e.g., p99) that will be used for file transfer.
- Go to the File Transfer section and click New.
- In the File Transfer section, go to the Configuration column – click on the Action button and add the job resource.
- Now configure the Fragment, Profile, and Operation.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Fragment-
To understand fragments, compare them to electrical sockets — the details provided in a fragment define how the job will connect to the appropriate server.
You can define multiple fragments based on your requirements.
→ Fragment → Protocol Fragment
Here, you will see several protocol options. This determines which system or server the file will be transferred to.
For example, if you're using SFTP for the transfer:
- Click on Fragment.
- Click on Protocol Fragment.
- Select SFTP Fragment.
- Enter the server credentials.
- Click on Basic Connection and add Hostname and Port.
- Go to SSH Authentication → Authentication Method: Password → Enter Password.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Profile-
A Profile in YADE defines the configuration for a specific file transfer, including source and target fragments. It acts as a reusable template used in workflows to execute transfers consistently.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Operation-
We can perform multiple operations on the file like copy, remove, move, getlist.
- Operation -> copy
- Copy Source: Choose the source fragment for reference. There are multiple options — select the one you want to use (e.g., Local Source).
- Click on the Copy Source action button and add the source file option.
- In the Selection Node, select the type of source:
- File Path (exact path)
- File Spec (use regex)
- File List (list of file paths to be transferred).
- Now go to Copy Target → click on Copy Target Fragment, provide the reference — it will show the fragment you created earlier.
- Click on Copy Target again, create a Directory Node, and specify the path.