<?xml version="1.0" encoding="utf-8" ?>
<task name="Task1" [enabled] [id] [fatal] [showalloutput]>
<task name="TaskN" [enabled] [id] [fatal] [showalloutput]>
There are two ways that the ToolBox will locate chain files:
<!--This file is named ‘SampleValidateProjectDetails.xml’ -->
<?xml version="1.0" encoding="utf-8" ?>
<var name="!(serverpath)">C:\Program Files\Quest\Enterprise Reporter\Server</var>
<var name="!(configpath)">C:\Program Files\Quest\Enterprise Reporter\ConfigurationManager</var>
<var name="!(reportpath)">C:\Program Files\Quest\Enterprise Reporter\ReportManager</var>
<var name="!(asmversion)">3.1.0.0</var>
<var name="!(fileversion)">3.1.0.1736</var>
<task name="ValidateProjectDetailsTask" id="server" fatal="false" enabled="false">
<arg name="AssemblyVersion">!(asmversion)</arg>
<arg name="FileVersion">!(fileversion)</arg>
<arg name="CompanyName">Quest</arg>
!(serverpath)\DatabaseWizard.exe,
<!-- Configuration Manager -->
<task name="ValidateProjectDetailsTask" id="configuration manager" fatal="false">
<arg name="AssemblyVersion">!(asmversion)</arg>
<arg name="FileVersion">!(fileversion)</arg>
<arg name="CompanyName">Quest</arg>
!(configpath)\CollectorUI\Quest.Reporter.Consoles.Discovery.
CollectorViews.dll,
!(configpath)\ConfigurationManager.exe,
!(configpath)\Quest.Common.AMConnector.dll,
!(configpath)\Quest.Reporter.Configuration.PowerShell.dll
<task name="ValidateProjectDetailsTask" id="report manager" fatal="false">
<arg name="AssemblyVersion">!(asmversion)</arg>
<arg name="FileVersion">!(fileversion)</arg>
<arg name="CompanyName">Quest</arg>
!(reportpath)\Quest.Common.AccessManagerHelper.dll,
!(reportpath)\Quest.Common.AMConnector.dll,
!(reportpath)\Quest.Common.SqlParsing.dll
Variable names are case-insensitive and come in four different flavours:
Declared variables are placed into a <vars></vars> block at the head of a chain file.
<?xml version="1.0" encoding="utf-8" ?>
<var name="!(questroot)">C:\Program Files\Quest\Enterprise Reporter<var>
<var name="!(serverpath)">!(questroot)\Server</var>
<var name="!(configpath)">!(questroot)\ConfigurationManager</var>
<var name="!(reportpath)">!(questroot)\ReportManager</var>
<var file="c:\globalvariables.xml"/>
Variables defined in other chain files can also be included.
Declared variables are GLOBAL and visible to ALL tasks in a chain file.
Injected variables are GLOBAL and visible to ALL tasks in a chain file.
<?xml version="1.0" encoding="utf-8" ?>
<var name="!(message)">This is a test message</var>
<arg name="Message">The message variable contains: !(message)</arg>
Exe: c:\Projects\Toolbox\bin\ToolBox.exe
Script: c:\Projects\testecho.xml
Arguments: -execute c:\Projects\testecho.xml
--------------------------------------------------------------------------------
The message variable contains: This is a test message
END [Echo (msg)] OK 00m 00s 006ms
--------------------------------------------------------------------------------
[Echo (msg)] OK 01:39:12.197 - 01:39:12.204 (00m 00s 006ms)
Output variables allow a task to produce named variables that can be consumed by other tasks.
<?xml version="1.0" encoding="utf-8" ?>
<arg name="Message">This is a test message</arg>
<outarg name="MessageLength" description="The length of the message"/>
<arg name="Message">Message msg01 is !(msg01.MessageLength) characters long</arg>
<outarg name="MessageLength" description="The length of the message"/>
<arg name="Message">Message msg02 is !(msg02.MessageLength) characters long</arg>
This chain file produces the following output:
Exe: c:\Projects\Toolbox\bin\ToolBox.exe
Script: c:\Projects\testecho.xml
Arguments: -execute c:\Projects\testecho.xml
--------------------------------------------------------------------------------
END [Echo (msg01)] OK 00m 00s 007ms
--------------------------------------------------------------------------------
Message msg01 is 22 characters long
END [Echo (msg02)] OK 00m 00s 000ms
--------------------------------------------------------------------------------
Message msg02 is 35 characters long
END [Echo (msg03)] OK 00m 00s 001ms
--------------------------------------------------------------------------------
[Echo (msg01)] OK 01:42:34.053 - 01:42:34.060 (00m 00s 007ms)
[Echo (msg02)] OK 01:42:34.066 - 01:42:34.066 (00m 00s 000ms)
[Echo (msg03)] OK 01:42:34.072 - 01:42:34.073 (00m 00s 001ms)
Output variables are GLOBAL and visible to ALL tasks in a chain file.
<?xml version="1.0" encoding="utf-8" ?>
<arg name="TimeInSeconds">1</arg>
<arg name="TimeInSeconds">5</arg>
<arg name="TimeInSeconds">10</arg>
The output for this chain file looks like this:
Exe: c:\Projects\Toolbox\bin\ToolBox.exe
Script: c:\Projects\testsleep.xml
Arguments: -execute c:\Projects\testsleep.xml
--------------------------------------------------------------------------------
END [Sleep (1s)] OK 00m 01s 008ms
--------------------------------------------------------------------------------
END [Sleep (5s)] OK 00m 05s 001ms
--------------------------------------------------------------------------------
END [Sleep (10s)] OK 00m 10s 002ms
--------------------------------------------------------------------------------
[Sleep (1s)] OK 01:47:23.633 - 01:47:24.642 (00m 01s 008ms)
[Sleep (5s)] OK 01:47:24.648 - 01:47:29.649 (00m 05s 001ms)
[Sleep (10s)] OK 01:47:29.653 - 01:47:39.656 (00m 10s 002ms)
In the output, the first thing is the name of the chain file that was executed (“sleepychain.xml”).
Finally, there is a summary of the entire chain file.
<?xml version="1.0" encoding="utf-8" ?>
<arg name="Message">Start</arg>
<arg name="TimeInSeconds">10</arg>
<arg name="TimeInSeconds">10</arg>
<arg name="TimeInSeconds">10</arg>
<arg name="Message">Start</arg>
Graphically, this execution looks like so, where time runs down the vertical:
<?xml version="1.0" encoding="utf-8" ?>
<arg name="Message">Start</arg>
<arg name="TimeInSeconds">10</arg>
<arg name="TimeInSeconds">10</arg>
<arg name="TimeInSeconds">10</arg>
<arg name="Message">Stop</arg>
Graphically, this looks like so, where time runs down the vertical:
This example shows how sequential blocks can be useful:
<?xml version="1.0" encoding="utf-8" ?>
<arg name="Message">Start</arg>
<arg name="TimeInSeconds">10</arg>
<arg name="TimeInSeconds">10</arg>
<arg name="TimeInSeconds">2</arg>
<arg name="TimeInSeconds">2</arg>
<arg name="TimeInSeconds">2</arg>
<arg name="Message">Stop</arg>
Graphically, this looks like so, where time runs down the vertical:
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Conditions d’utilisation Confidentialité Cookie Preference Center