[Solved] 7.1.6 - Variable Parsing - VisualCron - Forum

Community forum

KJDavie
2014-04-23T00:36:44Z
Hi Henrik,

I think variable parsing is still causing some issues in some circumstances.

I have tried to show some examples in the screen prints attached.

See notes below, Powershell also uses Curly Brackets which is perhaps part of the problem.

1) Variable Substitution - Command Line Arguments
- Note use of Job Variable is how we had it pre 7.1.6 (were using 7.1.0)
- use of User Variable (set to job variable in prior task) is our work around for the problem in 7.1.6

2) Variable Substitiution - PowerShell Example
- Again we had the trigger variables 3 times previously (were using 7.1.0)
- As shown in the comments with 7.1.6 first 2 lines worked, but last line failed with the error shown
- setting a variable at the top of the script and then using it is the workaround we have put in place.
KJDavie attached the following image(s):
Support
2014-04-23T07:10:45Z
Could you paste the two full strings that do not work here (the images has cut parts off) and we want to be sure that we do not have any typo within.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
KJDavie
2014-04-23T22:34:15Z
Sure,

Scenario 1 - Execute Task with *many* Arguments

Here is the original Arguments (that worked with 7.1.0 but not in 7.1.6 for us)

SQL_Incremental_Import.ps1 {{USERVAR(OSS - ENV TEST - DB Host)}} {{USERVAR(OSS - ENV TEST - DB Port)}} {{USERVAR(OSS - ENV TEST - DB REF Database)}} {{USERVAR(OSS - ENV TEST - DB REF ADMIN)}} {'{USERVAR(OSS - ENV TEST - DB REF ADMIN PWD)}'} {{USERVAR(OneStop Server Filepath - Input)}} {{USERVAR(SQL_SQLName)}_{JOB(Active,Variable,VisualCron_ProcessDate)}} {{JOB(Active,Variable,SQLName)}}

Here is the revised Arguments for 7.1.6 (that simply replaces the Job Variable references with a user variable set to the Job Variable in a prior task).

SQL_Incremental_Import.ps1 {{USERVAR(OSS - ENV TEST - DB Host)}} {{USERVAR(OSS - ENV TEST - DB Port)}} {{USERVAR(OSS - ENV TEST - DB REF Database)}} {{USERVAR(OSS - ENV TEST - DB REF ADMIN)}} {'{USERVAR(OSS - ENV TEST - DB REF ADMIN PWD)}'} {{USERVAR(OneStop Server Filepath - Input)}} {{USERVAR(SQL_SQLName)}_{JOB(Active,Variable,VisualCron_ProcessDate)}} {{USERVAR(SQL_SQLName)}}

Note the other Job Variable in the Arguments {JOB(Active,Variable,VisualCron_ProcessDate)}
continued to Work fine . . . . so I Didn't change this one.

i.e. value of User Variable SQL_SQLName = {JOB(Active,Variable,SQLName)}

Scenario 2 - PowerShell Script Text with Trigger Variables

Have included a VCSettings.zip with 2 Job Examples (1 with each) and a second zip with the 2 Powershells and a Sample File that should allow you to replicate the issue in 7.1.6 on a local server / client

You will see in the Jobs that it uses a trigger which looks for the file in C:\Temp

Hope that's what you were after
File Attachment(s):
VC-Settings.zip (5kb) downloaded 40 time(s).
20140424 Variable Substitution Powershell.zip (2kb) downloaded 44 time(s).
KJDavie attached the following image(s):
Support
2014-04-24T06:37:48Z
Hmm...first part worked for us. Are you sure the Server part is also upgraded to 7.1.6 and not just the Client?

Could you simplify it with one Variable? Because maybe it is the Variable content in one of these that messes things up.

About second scenario. This sounds like you are not running 7.1.6 as we had the exact same problem that was fixed. Perhaps you are running a beta of 7.1.6?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2014-04-24T06:47:35Z
I take it back on the last one - something fishy going on there. Investigating.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2014-04-24T14:47:58Z
KJDavie
2014-04-28T22:08:14Z
Hi Henrik,

7.1.7 beta looks good, and has fixed the example scenarios.

I will do some further testing with the Beta & the <later 7.1.7 release>, and will update there if I have any issues, but looks good.

Thanks for the quick turnaround.

Kevin
Support
2014-04-29T06:33:53Z
Thanks for the feedback!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top