An administrator is attempting to use the Generator's HOST action.
The action itself is to just run a simple batch file that renames a file. We are doing this to test the HOST action's functionality as we have more complex tasks we would like to build.
When run, the green notification is given at the top, but on the server the action is not ran.
Is there something wrong perhaps with our configuration or some sort of permissions issue?
Release : 4.9
Component : Web Portal - Publishing
It turned out the batch file was not properly setup. The following command lines worked under the System logon for the Portal Service:
CD \TDM
DIR *.*
IF NOT EXIST myTest.txt EXIT
echo 'file myTest.txt Exist!'
RENAME myTest.txt yourTest.txt
DIR *.*
exit %ERRORLEVEL%
where C:\TDM is the folder where my batch file is located as well as myTest.txt file is located.
My HOST command looked like this:
C:\TDM\test.bat >> C:\TDM\Batch_out.log 2>&1
Which produced this as an output
C:\Program Files\CA\CA Test Data Manager Portal\tomcat\bin>CD \TDM
C:\TDM>DIR *.*
Volume in drive C is loddisk1
Volume Serial Number is B877-3E59
Directory of C:\TDM
12/20/2021 04:12 PM <DIR> .
12/20/2021 04:12 PM <DIR> ..
12/20/2021 04:11 PM 9,117 Batch_out.log
12/17/2021 02:56 PM 2 BatOut.log
12/16/2021 06:10 PM 21 myTest.txt
12/20/2021 04:12 PM 137 test.bat
4 File(s) 9,277 bytes
2 Dir(s) 198,653,390,848 bytes free
C:\TDM>IF NOT EXIST myTest.txt EXIT
C:\TDM>echo 'file myTest.txt Exist!'
'file myTest.txt Exist!'
C:\TDM>RENAME myTest.txt yourTest.txt
C:\TDM>DIR *.*
Volume in drive C is loddisk1
Volume Serial Number is B877-3E59
Directory of C:\TDM
12/20/2021 04:12 PM <DIR> .
12/20/2021 04:12 PM <DIR> ..
12/20/2021 04:11 PM 9,117 Batch_out.log
12/17/2021 02:56 PM 2 BatOut.log
12/20/2021 04:12 PM 137 test.bat
12/16/2021 06:10 PM 21 yourTest.txt
4 File(s) 9,277 bytes
2 Dir(s) 198,653,390,848 bytes free
C:\TDM>exit 0