Day 9
On Windows you can configure FileAgent by selecting the shortcut on the desktop or using the Start menu "Configure Connect Direct FileAgent". You should see something like the following:

The FileAgent comes with a default configuration file which is what it is showing above. You select the configuration you want to work with in the left pane of the application. In the right pane you have two tabs. The tab that is showing above is the "FileAgent" tab where we configure it to connect via the API with the Connect:Direct.
In this rule I have defined a match for all the .dat files within the watch directory. On detecting a new file that matches this pattern FileAgent will submit the C:D process specified in the "Process Name" field with the arguments to be passed to the C:D process on in the next field.

On Windows you can configure FileAgent by selecting the shortcut on the desktop or using the Start menu "Configure Connect Direct FileAgent". You should see something like the following:
The FileAgent comes with a default configuration file which is what it is showing above. You select the configuration you want to work with in the left pane of the application. In the right pane you have two tabs. The tab that is showing above is the "FileAgent" tab where we configure it to connect via the API with the Connect:Direct.
We also list the directories we want to FileAgent to watch. There should be no reason to change the default values that you see above that were already in the configuration, unless they clash with some other software already using those values.
You can have multiple instances of FileAgent running which would need you to have separate "Gate Keeper" ports for each. In most cases that would not be necessary.
By default when FileAgent is running it will use this "Default_Config.ser" configuration file unless overridden by options on the command line if running FileAgent from the command prompt, or by editing the appropriate .lax file to override the arguments that get passed to FileAgent. If running as a Windows service then that would be the "cdfa$.lax", or the "cdfa.lax" if runing from the command prompt or shortcut on Windows or on UNIX.
If you just use the "Default_Config.ser" then you will not need to override anything.

On the "Rules" tab you can see a "Submit Process Rules" tab within it. This is where we define our rules to automatically submit C:D processes for the new file detected in the directory that was specified to watch. If there are any problems with submitting a process from FileAgent the first things to check will be the "Enabled" check-box on this tab and also within the definition of the matching file pattern as can be seen on the next screenshot.

In my C:D process I have some variables that take their values from the "Process arguments" field within this FileAgent rule. The C:D process variables are &NODE which is assigned to CD.REMOTE, &FILESPEC and &NAME . They take their values from some built in FileAgent variables "%FA_FILE_FOUND." and "%FA_NOT_PATH." respectively. It is important to note that these special FileAgent variable names start with a "%" and end with a "." . Miss off the period at the end of the name and they will not work.
Above you can see the C:D process that is used by the FileAgent rule. Previously when we sent a test file using the C:D Requester we used the "Send/Receive File" function in the left hand pane of the Requester which presented you with a form which we filled out. Behind the scenes that form constructed a textual C:D process like the one you see above.
I will go into C:D processes in more detail at a later date. For now hopefully you see some sort of script with a COPY command where the source of the copy is specified by &FILESPEC and the destination by &NAME . Also note that the destination node or secondary node (SNODE) is specified by the C:D process variable &NODE .
This means that potentially we could use this single C:D process template for all our FileAgent rules.
If the transfer is successful then the source file is removed as it has been safely received at the destination.
Next post I will explain how to run the FileAgent and test that this rule is working.
No comments:
Post a Comment