【问题标题】:Is it possible to invoke a antscript in postdst and presrc call in MQFTE?是否可以在 MQFTE 的 postdst 和 presrc 调用中调用 antscript?
【发布时间】:2011-05-13 00:13:31
【问题描述】:
是否可以在 MQFTE 的 postdst 和 presrc 调用中调用 antscript??
【问题讨论】:
标签:
scripting
ant
ibm-mq
websphere-mq-fte
【解决方案1】:
这是一个例子:
<request version="4.00" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FileTransfer.xsd">
<managedTransfer>
<originator>
<hostName>$hostName</hostName>
<userID>$userID</userID>
</originator>
<sourceAgent QMgr="$sourceQM" agent="$sourceAgent"/>
<destinationAgent QMgr="$destQM" agent="$destAgent"/>
<transferSet priority="5">
<metaDataSet>
<metaData key="some_key">Some value</metaData>
</metaDataSet>
<postSourceCall>
<command name="example.xml" retryCount="0" retryWait="0" successRC="0" type="antscript">
<property name="ant.FILEPATH" value="$filepath"/>
<property name="antSrcAgent" value="$sourceAgent"/>
</command>
</postSourceCall>
<item checksumMethod="MD5" mode="binary">
<source disposition="delete" recursive="false">
<file>$filepath</file>
</source>
<destination exist="error" type="directory">
<file>$destFile</file>
</destination>
</item>
</transferSet>
<job>
<name>Example FTE job</name>
</job>
</managedTransfer>
</request>
传递给 ant 脚本的属性是任意名称。您可以通过这种方式传递任何属性。我使用了 postSourceCall,但您可以将其更改为 postDest、preSource 等。