Можно ли получить список переданных файлов после успешной передачи в WMQ-FTE?

Я хотел бы переместить некоторые файлы в каталог с отметкой времени после их передачи с помощью WMQ-FTE. Я использую v7.0.4.1.

Моя проблема в том, что в каталог, из которого я переношу файлы, всегда записываются новые файлы, так что просто слепо переносить все не получится. Я также группирую триггеры передачи, так как они происходят партиями примерно по 1000, поэтому на каждую 1000 файлов, подлежащих передаче, приходится только одна передача.

Я надеялся, что будут какие-то метаданные, содержащие список путей к переданным файлам, чтобы я мог переместить их в каталог до или после передачи. Создание каталога будет частью исходного вызова до или после него.


person Lexman    schedule 05.06.2012    source источник


Ответы (1)


Взгляните на DestinationTransferEndExit.java API документация. В частности, обратите внимание на параметр fileResults. Задача ANT может использовать этот параметр для выполнения действий с определенными файлами.

/**
 * Invoked immediately after the completion of a transfer on the agent acting as
 * the destination of the transfer.
 * 
 * @param transferExitResult
 *            a result object reflecting whether or not the transfer completed
 *            successfully.
 * 
 * @param sourceAgentName
 *            the name of the agent acting as the source of the transfer.
 * 
 * @param destinationAgentName
 *            the name of the agent acting as the destination of the
 *            transfer.  This is the name of the agent that the 
 *            implementation of this method will be invoked from.
 * 
 * @param environmentMetaData
 *            meta data about the environment in which the implementation
 *            of this method is running.  This information can only be read,
 *            it cannot be updated by the implementation.  The constants
 *            defined in <code>EnvironmentMetaDataConstants</code> class can 
 *            be used to access the data held by this map.
 * 
 * @param transferMetaData
 *            meta data to associate with the transfer.  The information can
 *            only be read, it cannot be updated by the implementation.  This 
 *            map may also contain keys with IBM reserved names.  These 
 *            entries are defined in the <code>TransferMetaDataConstants</code> 
 *            class and have special semantics.
 * 
 * @param fileResults
 *            a list of file transfer result objects that describe the source
 *            file name, destination file name and result of each file transfer
 *            operation attempted.
 * 
 * @return    an optional description to enter into the log message describing
 *            transfer completion.  A value of <code>null</code> can be used
 *            when no description is required.
 */
String onDestinationTransferEnd(TransferExitResult transferExitResult,
                String sourceAgentName,
                String destinationAgentName,
                Map<String, String>environmentMetaData,
                Map<String, String>transferMetaData, 
                List<FileTransferResult>fileResults);
person T.Rob    schedule 05.06.2012
comment
Я не указывал, что все это должно происходить на исходном сервере, но нашел выход для исходных передач, SourceTransferEndExit.java. Я буду внедрять и сообщать о своих выводах - person Lexman; 06.06.2012