Wednesday 25 February 2015

Oracle Managed Files handson part 1: Basics

[Part 1] [Part 2] [Part 3] [Part 4]

This tutorial demonstrates the first steps with Oracle Managed File Transfer (MFT). Prerequisites are an installed and running system, the installation guide can be found under http://www.oracle.com/technetwork/middleware/mft/documentation/index.html.
This tutorial has been done using Oracle Linux 6. For other systems, the OS commands have to be adapted accordingly.


Starting with the MFT-Console. It is located at [servername]:[MFT-Server Port]/mftconsole, in this case http://localhost:7003/mftconsole. The UI is grouped into three parts: Design, Monitoring and Administration. We start at the design tab where the needed artifacts can be defined.


We need three folders in the file system first: File-Source, only-txt and only-zip. To get some payload, we need two text files with meaningful names (e.g. touch asdf.txt). One text file will be zipped (zip hjkl.txt). You should end up with files and folders like the ones in the screenshot above.


These directories need to be configured in MFT. Clicking on Sources in the left area opens the Create Source Dialog. It needs a name, the type File and the path to the folder created above. To finish click on Create.


Do the same by clicking on Targets and configure both targets.


In the left tree, the source and the two targets should be shown. Clicking on one of them diplays detail information on the right side.


Now the first Transfer can be defined by clicking on Transfers. There are no additional parameters at this stage, click on Create to finish.


In the transfers detail view, the source can be added by clicking on the <add source> link or by drag & drop from the tree view.


Then the targets can be assigned. The <add target> link opens the Select targets dialog. Multiple targets can be chosen here, so move all targets to the right side and click OK.


To make sure, that only .txt files will be transfered, enter an according (*.txt) wildcard below ‚Content Filters'. For more complex filters, regular expressions also could be defined.


The only-zip target should only receive zipped files. So a compress actions needs to be added via <add pre-processing actions>.


The result should look as shown above. One file source with a filter on a *.txt wildcard. Both targets,
only-txt and only-zip, are registered. The only-zip target has an additional Compress pre-processing action.
In this state, the tranfer is defined, but not running on the server. To achieve this, click on the links ‚Save' and then‚Deploy' in the top right corner. Close the dialog with Deploy and OK. Now the link should read Deployed as shown above.


On the monitoring page, click on Deployments in the left area. Not only the file-txt-transfer has been deployed, but also the source and both targets. As all three are needed to run the transfer, MFT automatically deployed all artifacts that the transfer relies on.


For testing, copy one file (e.g. asdf.txt) into the file-source folder.


The results can be seen on the Dashboard in the Monitoring section. The Active Deliveries area on the bottom left can be switched to auto refresh. After a short period of time, both successfull transfers should be shown here.


In the file system, it can be seen that the file has been copied to the only-txt folder whereas it has additionally been compressed for the only-zip folder.

For practicing, a second transfer could be set up, doing just the opposite of the file-txt-transfer. Zip-files should be copied into only-zip and txt-files should be compressed first, then transfered to only-txt.

--> Part 2: ftp-Transfer

[Part 1] [Part 2] [Part 3] [Part 4]