XML Document Formats - Results

MOVEit Automation API optionally returns information about overall task status, and the status of individual job steps.  These results are in XML format.

A package of XSL templates that show how to easily render XML returned from the "- tf:..." and "-sf:..." commands as simple HTML, styled HTML and CSV reports is available in the Distribution/MOVEit/Central/API/Windows/Extras folder on the Ipswitch MOVEit support site, https://moveitsupport.ipswitch.com.   A Windows batch file, XSL-render utility and a (Flash) demonstration video that shows how to use these templates and utilities to quickly generate user-friendly output is included in this package.

Overall task status format

The command-line client's -tf argument and the API's queryTaskRunInfo method both return a single row from the taskruns table in the micstats database, as an XML string of the form:

<Records>
  <Record>
    <TaskID>id of task</TaskID>
    <TaskName>name of task</TaskName>
    <TimeStarted>YYYY-MM-DD hh:mm:ss</TimeStarted>
    <TimeEnded>YYYY-MM-DD hh:mm:ss</TimeEnded>
    <FilesSent>number of files sent</FilesSent>
    <TotalBytesSent>total number of bytes sent to destinations</TotalBytesSent>
    <LastErrorType>0 if task succeeded</LastErrorType>
    <LastErrorText>empty if no errors</LastErrorText>
    ... other fields ...
  </Record>
</Records>

For example:

<Records>
   <Record><ID>405659</ID>
      <LogStamp>2006-06-21 13:58:21.67</LogStamp>
      <TaskID>133254349</TaskID>
      <Node>0</Node>
      <NominalStart>2006-06-21 13:58:20</NominalStart>
      <TaskName>Monthly Reports</TaskName>
      <TimeStarted>2006-06-21 13:58:20.49</TimeStarted>
      <TimeEnded>2006-06-21 13:58:21</TimeEnded>
      <StartedBy>(a local user)</StartedBy>
      <Success>Success</Success>
      <FilesSent>2</FilesSent>
      <TotalBytesSent>36350</TotalBytesSent>
      <HasBeenRead>0</HasBeenRead>
      <LastErrorType>0</LastErrorType>
      <LastErrorText></LastErrorText>
   </Record>
   <More>0</More>
</Records>

For a complete list of the fields returned, see the description of the taskruns table in the MOVEit Automation help file, under the topic Advanced Topics - Database - Schema.

Detailed job step status format

The command-line client's -sf argument and the API's queryTaskRunXfers method both return potentially many rows from the stats table, as an XML string of the form:

<Records>
  <Record>
    <TaskID>id of task</TaskID>
    <TimeStarted>YYYY-MM-DD hh:mm:ss</TimeStarted>
    <TimeEnded>YYYY-MM-DD hh:mm:ss</TimeEnded>
    <Action>get, send, process, or delete</FilesSent>
    <SourceFilename>filename of source, with path</SourceFilename>
    <DestFilename>filename of source, with path</DestFilename>
    <NBytes>number of bytes sent</NBytes>
    <ErrCode>0 if success</ErrCode>
    ... other fields ...
  </Record>
  ... more row nodes ...
 </Records>

For example:

<Records>
   <Record><ID>360670</ID>
      <LogStamp>2006-06-21 13:58:21.27</LogStamp>
      <TaskID>133254349</TaskID>
      <Node>0</Node>
      <NominalStart>2006-06-21 13:58:20</NominalStart>
      <Action>get</Action>
      <SourceHost>localhost MS FTP</SourceHost>
      <SourceFilename>/uploads/test1.ggg</SourceFilename>
      <SourceFilenameOnly>test1.ggg</SourceFilenameOnly>
      <SourceFileID></SourceFileID>
      <SourceNBytes>33408</SourceNBytes>
      <SourceDuration>0.34</SourceDuration>
      <SourceMDN></SourceMDN>
      <DestHost></DestHost>
      <DestFilename></DestFilename>
      <DestFilenameOnly></DestFilenameOnly>
      <DestFileID></DestFileID>
      <NBytes>0</NBytes>
      <DestDuration>0</DestDuration>
      <DestMDN></DestMDN>
      <ErrCode>0</ErrCode>
      <Message></Message>
   </Record>
   <Record><ID>360671</ID>
      <LogStamp>2006-06-21 13:58:21.32</LogStamp>
      <TaskID>133254349</TaskID>
      <Node>0</Node>
      <NominalStart>2006-06-21 13:58:20</NominalStart>
      <Action>get</Action>
      <SourceHost>localhost MS FTP</SourceHost>
      <SourceFilename>/uploads/test1.hhh</SourceFilename>
      <SourceFilenameOnly>test1.hhh</SourceFilenameOnly>
      <SourceFileID></SourceFileID>
      <SourceNBytes>2942</SourceNBytes>
      <SourceDuration>0</SourceDuration>
      <SourceMDN></SourceMDN>
      <DestHost></DestHost>
      <DestFilename></DestFilename>
      <DestFilenameOnly></DestFilenameOnly>
      <DestFileID></DestFileID>
      <NBytes>0</NBytes>
      <DestDuration>0</DestDuration>
      <DestMDN></DestMDN>
      <ErrCode>0</ErrCode>
      <Message></Message>
   </Record>
   <Record><ID>360672</ID>
      <LogStamp>2006-06-21 13:58:21.64</LogStamp>
      <TaskID>133254349</TaskID>
      <Node>0</Node>
      <NominalStart>2006-06-21 13:58:20</NominalStart>
      <Action>send</Action>
      <SourceHost>localhost MS FTP</SourceHost>
      <SourceFilename>/uploads/test1.ggg</SourceFilename>
      <SourceFilenameOnly>test1.ggg</SourceFilenameOnly>
      <SourceFileID></SourceFileID>
      <SourceNBytes>33408</SourceNBytes>
      <SourceDuration>0.34</SourceDuration>
      <SourceMDN></SourceMDN>
      <DestHost>(Default)</DestHost>
      <DestFilename>c:\tmp\two\test1.ggg</DestFilename>
      <DestFilenameOnly>test1.ggg</DestFilenameOnly>
      <DestFileID></DestFileID>
      <NBytes>33408</NBytes>
      <DestDuration>0.33</DestDuration>
      <DestMDN></DestMDN>
      <ErrCode>0</ErrCode>
      <Message></Message>
   </Record>
   <Record><ID>360673</ID>
      <LogStamp>2006-06-21 13:58:21.67</LogStamp>
      <TaskID>133254349</TaskID>
      <Node>0</Node>
      <NominalStart>2006-06-21 13:58:20</NominalStart>
      <Action>send</Action>
      <SourceHost>localhost MS FTP</SourceHost>
      <SourceFilename>/uploads/test1.hhh</SourceFilename>
      <SourceFilenameOnly>test1.hhh</SourceFilenameOnly>
      <SourceFileID></SourceFileID>
      <SourceNBytes>2942</SourceNBytes>
      <SourceDuration>0</SourceDuration>
      <SourceMDN></SourceMDN>
      <DestHost>(Default)</DestHost>
      <DestFilename>c:\tmp\two\test1.hhh</DestFilename>
      <DestFilenameOnly>test1.hhh</DestFilenameOnly>
      <DestFileID></DestFileID>
      <NBytes>2942</NBytes>
      <DestDuration>0.01</DestDuration>
      <DestMDN></DestMDN>
      <ErrCode>0</ErrCode>
      <Message></Message>
   </Record>
   <More>0</More>
</Records>

There will generally be more than one row for each file, corresponding to the various actions performed on the file.  In this example, you can see two get records, followed by two send records.

For a complete list of the fields returned, see the description of the stats table in the MOVEit Automation help file, under the topic Advanced Topics - Database - Schema.

Do not assume that MOVEit Automation will return only the fields described here, in the exact order described there.  Future versions of MOVEit Automation will likely include additional fields in the database. Therefore, an assumption that, for instance, the field after NBytes will always be DestDuration may create an incompatibility with future versions of MOVEit Automation.

Running Tasks Status format

The API's ShowRunningTasks method can return potentially many rows as an XML string of the form:

<Tasks>
  <Task>
    <TaskID>id of task</TaskID>
    <NominalStart>YYYY-MM-DD hh:mm:ss</NominalStart>
    <TimeStarted>YYYY-MM-DD hh:mm:ss</TimeStarted>
    <StartedBy>user name</StartedBy>
    <Status>current task status</Status>
    <CurFileBytes>number of bytes transferred for current file</CurFileBytes>
    <TotFileBytes>total number of bytes transferred</TotFileBytes>
    <LastErrorType>0 if success</LastErrorType>
    <LastErrorText>text of error</LastErrorText>
  </Task>
  ... more row nodes ...
 </Tasks>

For example:

<Tasks>
   <SchedulerStatus>On</SchedulerStatus>
       <Task><TaskID>12345</TaskID>
           <TaskName>MyTempTask</TaskName>
           <NominalStart>2007-10-24 10:06:26</NominalStart>
           <TimeStarted>2007-10-24 10:06:26</TimeStarted>
           <StartedBy>(a local user)</StartedBy>
           <Status></Status>
           <CurFileBytes>0</CurFileBytes>
           <TotFileBytes>-1</TotFileBytes>
           <LastErrorType>0</LastErrorType>
           <LastErrorText></LastErrorText>
       </Task>
</Tasks>

The fields returned here are similar to database fields, but are not returned from the MOVEit Automation database. They are created from status information kept internally in MOVEit Automation. They are, therefore, not described in any MOVEit Automation Database Schema information in the MOVEit Automation help file.

Do not assume that MOVEit Automation will return only the fields described here, in the exact order described there.  Future versions of MOVEit Automation will likely include additional fields in the running task status. Therefore, an assumption that, for instance, the field after Status will always be CurFileBytes may create an incompatibility with future versions of MOVEit Automation.

RunCustomSQL Results Format

The API's RunCustomSQL method can return potentially many rows as an XML string of the form:

<Records>
  <Record>
    ... whatever fields are requested ...
  </Record>
  ... more row nodes ...
  <More> 0 if this is the end, or 1 if more data to be sent <More>
</Records>

For example, a request of the form:

oAPI.RunCustomSQL("SELECT TaskID, NominalStart, TimeEnded, LastErrorType, LastErrorText FROM TaskRuns LIMIT 5", 9999, 0, false, "")

could return data like this:

<Records>
   <Record><TaskID>741317087</TaskID>
      <NominalStart>2006-07-27 08:00:00</NominalStart>
      <TimeEnded>2006-07-27 08:00:50</TimeEnded>
      <LastErrorType>0</LastErrorType>
      <LastErrorText></LastErrorText>
   </Record>

   <Record><TaskID>729570621</TaskID>
      <NominalStart>2006-07-27 08:00:00</NominalStart>
      <TimeEnded>2006-07-27 08:00:50</TimeEnded>
      <LastErrorType>0</LastErrorType>
      <LastErrorText></LastErrorText>
   </Record>

   <Record><TaskID>729570621</TaskID>
      <NominalStart>2006-07-26 08:00:00</NominalStart>
      <TimeEnded>2006-07-26 08:00:26</TimeEnded>
      <LastErrorType>0</LastErrorType>
      <LastErrorText></LastErrorText>
   </Record>

   <Record><TaskID>222222</TaskID>
      <NominalStart>2006-07-27 02:15:00</NominalStart>
      <TimeEnded>2006-07-27 02:15:26</TimeEnded>
      <LastErrorType>0</LastErrorType>
      <LastErrorText></LastErrorText>
   </Record>

   <Record><TaskID>507522607</TaskID>
      <NominalStart>2006-07-27 08:00:00</NominalStart>
      <TimeEnded>2006-07-27 08:00:53</TimeEnded>
      <LastErrorType>6</LastErrorType>
      <LastErrorText>Script Command Line App returned error -2: WARNING - 'c:\stdnet\s
      ilock\AS2\ASxSender\bin\debug\ASxSender.exe AS1 C:\TEMP\MIC\7e8-0002\atc10001.tm
      p as1test AS1TestFile4 1>c:\temp\AS2Demo\AS1TestFile4Out.txt 2>c:\temp\AS2
      Demo\AS1TestFile4Err.txt' retur</LastErrorText>
   </Record>

   <More>0</More>
</Records>

For a complete list of the possible fields that may be returned from the database, see the MOVEit Automation help file, under the topic Advanced Topics - Database - Schema.