ActiveTransfer Server 10.15 | webMethods ActiveTransfer Documentation | Working with Services in ActiveTransfer | Asset Document Types | Overview | Event Document Types | wm.mft.assets.rec.event.action.properties:ExecuteScript
 
wm.mft.assets.rec.event.action.properties:ExecuteScript
Document type that contains the details of the execute script action in ActiveTransfer Server.
Variables
command
String Specifies the command to be run by the action.
arguments
String (Optional) Specifies the arguments for the command. For example, {real_path}/archive/{name}: specifies that if the file is uploaded to /uploads/stuff.zip, it will be copied to /archive/stuff.zip.
separator
String (Optional) Specifies the separator character that you use to separate arguments.
workingDirectory
String Specifies the path to the directory where the command will execute. For example, when an application looks for a resource such as a configuration file, the application looks in the location specified here.
You should configure the variables of this document type depending on your operating system. One example each for the Windows and Unix/Linux platforms are listed below:
*Windows Platform: If you want to execute the batch file C:\SAG\batchfiles\test.bat, the properties that you need to specify for the Execute Script action are:
command C:\Windows\System32\cmd.exe
argument /c;start;test.bat
separator ;
workingDirectory C:\SAG\batchfiles\
*Unix/Linux Platforms: You can directly specify the script file name. If you want to execute the batch file /home/data/batchfiles/test.sh, use the following settings in the Execute Script action.
command ./test.sh
argument
separator ;
workingDirectory /home/data/batchfiles
The above configuration settings can vary depending on the specific operating system that hosts your ActiveTransfer Server. In some of the operating systems, you might require an exit command at the end of the script file to properly terminate the command process.