I am doing the following.
The UC4 windows agent server where the environment variable previously defined was removed and the server restarted to ensure the variable was removed from the environment.
Windows job -
- Windows job is defined as 'Command', with external app executable path in 'Command' window.
- Attributes tab is set to "Generate Task at - Runtime"
preprocess tab
:SET &ENV_VARIABLE# = "AcctName" (environment variable 'name' external application is expecting).
:SET &ENV_VAR_VALUE# = "AcctPswd123" (environment variable 'password' external application is expecting).
process tab
@SET &ENV_VARIABLE#=&ENV_VAR_VALUE# (I have also tried this placed on the preprocess tab, same error).
echo The variable value is set to &ENV_VARIABLE#=&ENV_VAR_VALUE#.
If I execute the job without the job 'command' all the variable creates and displays (echo listings) are the correct values.
When the job is executed with the 'Command' or actual job executable I get 1 of 2 errors,
either
Error:
Unhandled exception. System.ArgumentNullException: Pwd is required (Parameter 'decryptedPwd')
or (after application logging changed)
Unhandled exception. System.InvalidOperationException: Missing "EnvironmentVariable" environment variable.