In ITP/Server every script can be used as a command in any other script. For this reason, these scripts are also called 'script components'. When a script is used as a command, its parameters become the parameters of the command. For instance, one could create the following script component to copy a file, but to delete the target file before copying, because the command Copy will fail if the destination file already exists:
Script CopyFile:
Parameter Text SourceFile;
Parameter Text DestinationFile;
Delete
File (DestinationFile);
Copy
Src (SourceFile)
Dest (DestinationFile);
This script could be used as follows from an ITP/Server service script:
Run an ITP Model, producing a result document:
ITPRun
Model (model)
Result (temp_result_doc);
Copy the result document to its final location:
CopyFile
SourceFile (temp_result_doc)
DestinationFile (result_file);