Project Automation

 

Overview

 
A project can be run from the command line or via a batch file to automate processes.
 
A Project Definition will need to be created and then called from the command line.
 
Syntax:-
 
SwiftDpsCmd.exe <project path and name>
 
 
Example:-
 
SwiftDpsCmd.exe ProjectName.xml
 
 
Parameters
Switch
Values
CPU Thread Control
/Threads=
 
 

Validation

 
All parameters are validated. If they are found to be incorrect the project will be aborted.
 
 

Return Codes

 
A vast amount of Return Codes have been implemented to allow users to define a more considered approach of how to progress via return codes.
 
Return Codes
Definition
0
Completed Successfully
-1
Input Format Invalid
-2
Input File Missing
-3
Input File IO Exception
-4
Field Conflict
-5
User Cancelled
-6
Unexpected Error In Batch Processor
-7
System Settings Missing
-8
No Parameters Defined
-9
User Parameter File Error
-10
User Parameter File Missing
-11
Input File Field Conflict
-12
Fixed Width Record Size Conflict
-13
Log File Error
-14
Automation Not Licensed
-15
ODBC Not Licensed
-16
Cancelled By User
-17
No Input
-18
Invalid Character In File Root
-19
Invalid Character In Client Description
-20
Invalid Character In Project Id
-21
Burst Database Not Found
-22
Interim Db Already Exists
-23
Output Already Exists
-24
Merged Output File Already Exists
-25
Merged Unmatched Output File Already Exists
-26
Error Writing To SQLite Database
-27
System Field Not Specified
 
 

Return Codes - Usage Example

 
This example shows a simple way of how to use the 'Completed Successfully' Return Code (0). Any Return Code other than '0' is considered a failure.
 
 
"C:\SwiftSort\Swift\SwiftDpsCmd.exe" "C:\SwiftDPS\Definitions\Project Definitions\ProjectName.xml"
 
echo Return Code = %ERRORLEVEL%
 
if %ERRORLEVEL% neq 0 GOTO Failed
echo ****  SUCCESSFUL  ****
goto End
 
:Failed
echo ****  FAILED  ****
 
:End
echo Completed Successfully
 
 
 

Tip

 
An Environment Variable (Path) can be setup so that SwiftDPSCMD can be called and run from any directory on the machine. Environment Variables are set in the Windows OS System Properties. Example of use:-
 
SwiftDpsCmd.exe "C:\SwiftDPS\Definitions\Project Definitions\ProjectName.xml"
 
 
SwiftDPS and its resources can be kept up to date via the command line, see the Applying Updates topic for further information.