I have an execute task that runs a decryption program with a bunch of arguments as follows:
-D -u -k "{USERVAR(DesKey)}" OD{DATEFORMAT(yyyyMMdd)}.des OD{DATEFORMAT(yyyyMMdd)}.txt
As you can see, I have a global variable with the decryption key and want to read the encrypted file named OD<today's date>.des and save the decrypted data to OD<today's date>.txt
However the task fails with the program saying it can't find the file even though it's there. If I remove the variables and just write the key and file names in the arguments it works fine.
I tried putting the whole string into the Variables window and discovered something weird. The amount of characters between variables seems to matter for if it will parse the variables or not.
The above string did not parse any variables at all, just returning the same string.
If I add two more characters between the first and second variable, it will parse the first variable, but not the others
Input: -D -u -k "{USERVAR(DesKey)}" xxOD{DATEFORMAT(yyyyMMdd)}.des OD{DATEFORMAT(yyyyMMdd)}.txt
Result: -D -u -k "12345678" xxOD{DATEFORMAT(yyyyMMdd)}.des OD{DATEFORMAT(yyyyMMdd)}.txt
Adding more characters at that place made no difference. However if I add more characters between the second and third variable it will parse all of them correctly:
Input: -D -u -k "{USERVAR(DesKey)}" xxOD{DATEFORMAT(yyyyMMdd)}.des xxxxxxxxxxxxxxxxOD{DATEFORMAT(yyyyMMdd)}.txt
Result: -D -u -k "12345678" xxOD20140214.des xxxxxxxxxxxxxxxxOD20140214.txt
I have tested this on VisualCron 7.0.8, 7.1.0 and 7.1.3. Of those, the bug only exists in 7.1.3. In the earlier versions it works as expected.
Edited by moderator
2014-02-20T08:07:47Z
|
Reason: Not specified
Mikael attached the following image(s):