By Juergenkress-Oracle on Apr 09, 2016
Scriptable File Transfers are "Groovy", or Node or Python, batch files or plain ole boring Bourne shell scripts invoked by the MFT runtime server. Maybe you want to maintain a library of custom callouts, java code or manage moving them from one environment to another? No problem, use the Ginzu knife of callouts to extend MFT, the Run Script Pre-Processing callout now available on the MFT OTN page at bit.ly/learnmft. This baby can do it all, file processing, add new endpoints, enable REST, notify or validate. Got your attention, read on for more details or if you're already sold, just click the link to download and open the README file.
I hate repeating myself but there is virtually no limit to what can be done with this tool but before we blogstorm on this topic, lets briefly review MFT Java callouts from previous blog entries and the official Oracle MFT 12.1.3 documentation. To create a callout from scratch, you have these 6 basics steps.
- Create code
- Create XML defintiion
- Copy jar to disk
Not really that painful for the DIY types but to use RunScript, you can skip the 1st 3 and just do import, copy and test.
- Import Sample Transfer
- Copy the jar (as described in the readme)
- Test basic scenarios
Internal Processing Things Callouts Can Do
- Rename and Replace file with different file
- Reject a file and return an error
- Update the monitoring dashboard transfer report
- protocol headers section
- Duplicate the file elsewhere
Source pre-processing is triggered right after a file has been received and has identified a matching Transfer. This is the best place to do validation or extend MFT to go grab a file from some external source. There is an FTPGet.sh example in the RunScript download that shows how to do custom FTP commands such a SITE often needed when interacting with mainframes.
Target pre-processing triggered just before the file is delivered to the Target by the Transfer. This is a good place to send files to external locations and protocols not supported in MFT. RunScript supports retry semantics and if an error is received, it is reflected in the MFT monitoring dashboard where it can be diagnosed or resubmitted.
can not be invoked for Target Post processing. A separate callout would
be required for that. Post Target processing is not suited for file
manipulation and is best for notifications, analytic/reporting or maybe
remote endpoint file rename. Read the complete article here.
For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.