fte:awaitoutcome

Waits for a fte:filecopy, fte:filemove, or fte:call operation to complete.

Attributes

id
Required. Identifies the transfer to await an outcome from. Typically, this is a property set by the idProperty attribute of the fte:filecopy, fte:filemove, or fte:call tasks.

rcproperty
Required. Names a property to store the return code of the fte:awaitoutcome task in.

timeout
Optional. The maximum amount of time, in seconds, to wait for the operation to complete. The minimum timeout is one second. If you do not specify a timeout value, the fte:awaitoutcome task waits forever for the outcome of the operation to be determined.

Example

In this example a file copy is started, and its identifier is stored in the copy.id property. While the copy is progressing, other processing can take place. The fte:awaitoutcome statement is used to wait until the copy operation completes. The fte:awaitoutcome statement identifies which operation to wait for using the identifier stored in the copy.id property. The fte:awaitoutcome stores a return code indicating the outcome of the copy operation into a property called copy.result.

<-- issue a file copy request -->
<fte:filecopy
src="AGENT1@QM1"
dst="AGENT2@QM2"
idproperty="copy.id"
outcome="defer">
              
<fte:filespec
  srcfilespec="/home/fteuser1/file.bin"
  dstdir="/home/fteuser2"/>

</fte:filecopy>

<fte:awaitoutcome id="${copy.id}" rcProperty="copy.rc"/>

<echo>Copy id=${copy.id} rc=${copy.rc}</echo>