Specifying programs to run with MFT
You can run programs on a system where a Managed File Transfer Agent is running. As part of a file transfer request, you can specify a program to run either before a transfer starts, or after it finishes. Additionally, you can start a program that is not part of a file transfer request by submitting a managed call request.
About this task
- As part of a transfer request, at the source agent, before the transfer starts.
- As part of a transfer request, at the destination agent, before the transfer starts.
- As part of a transfer request, at the source agent, after the transfer completes.
- As part of a transfer request, at the destination agent, after the transfer completes.
- Not as part of a transfer request. You can submit a request to an agent to run a program. This scenario is sometimes referred to as a managed call.
- SourceTransferStartExit(onSourceTransferStart).
- PRE_SOURCE Command.
- DestinationTransferStartExits(onDestinationTransferStart).
- PRE_DESTINATION Command.
- The Transfer request is performed.
- DestinationTransferEndExits(onDestinationTransferENd).
- POST_DESTINATION Command.
- SourceTransferEndExits(onSourceTransferEnd.
- POST_SOURCE Command.- The DestinationTransferEndExits is run only when the transfer completes, either successfully or partially successfully.
- The postDestinationCall is run only when the transfer completes, either successfully or partially successfully.
- The SourceTransferEndExits is run for successful, partially successful, or failed transfers.
- The postSourceCall is called only if:
- The transfer was not canceled.
- There is a successful or partially successful outcome.
- Any post-destination transfer programs ran successfully.
Procedure
- Use an Apache Ant task
-
Use one of the
fte:filecopy,fte:filemove, andfte:callAnt tasks to start a program. Using an Ant task, you can specify a program in any of the five scenarios, using thefte:presrc,fte:predst,fte:postdst,fte:postsrc, andfte:commandnested elements. For more information, see Program invocation nested elements. - Edit the file transfer request message
-
You can edit the XML that is generated by a transfer request. Using this method, you can run a program in any of the five scenarios, by adding preSourceCall, postSourceCall, preDestinationCall, postDestinationCall, and managedCall elements to the XML file. Then, use this modified XML file as the transfer definition for a new file transfer request, for example with the fteCreateTransfer -td parameter. For more information, see MFT agent call request message examples.
- Use the fteCreateTransfer command
-
You can use the fteCreateTransfer command to specify programs to start. You can use the command to specify programs to run in the first four scenarios, as part of a transfer request, but you cannot start a managed call. For information about the parameters to use, see fteCreateTransfer: start a new file transfer. For examples of using this command, see Examples of using fteCreateTransfer to start programs.