In one of the sequencer I see we are using nested condition stage with condition $ServId1='' then execute echo command in execute command stage(to write into a log file that $ServId1 doesn't exist) otherwise run the following job.
My question is $ServId1 is an environment variable with a default value and for no reason it will be empty then what does the condition $ServId1=''implies.
Is there anyway we can overwrite the default value for the environment variable during the sequence run?
Any suggestions will be appreciated.
thanks
Nested Condition
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 397
- Joined: Wed Apr 12, 2006 2:28 pm
- Location: Tennesse
Nested Condition
hi sam here
-
- Premium Member
- Posts: 397
- Joined: Wed Apr 12, 2006 2:28 pm
- Location: Tennesse
I wasn't saying that it *was* being overridden, just that the possibility exists that it *could* be or may not even been set and it looks like someone is trying to check for that possibility, even if it is remote.
For a Project variable, you can use $UNSET in the job (rather than $PROJDEF) to unset it in the job's runtime. Heck, you could even use it at the Project level if it was set on the server and you didn't want it set for any job by default.
For a Project variable, you can use $UNSET in the job (rather than $PROJDEF) to unset it in the job's runtime. Heck, you could even use it at the Project level if it was set on the server and you didn't want it set for any job by default.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 397
- Joined: Wed Apr 12, 2006 2:28 pm
- Location: Tennesse
Thanks to both for your valuable suggestion.
Let me elaborate my sequence design.
I have 2 jobs to run simultaneously in the seq, each job updates the same table for different database instance ($ServId1 & $ServerId2).
Before running these jobs we have a nested condition stage to check whether server id exists or not (as mentioned in my post above).
Both Server ids have been set as an environment variable with $PROJDEF in job properties and has provided default value through administrator.
When I see the log for the previous run of the sequencer in production,I found it is showing one or the other Server Id doesn't exist. Means sometime its getting $ServId1 or $ServerId2 as empty ('').
![Confused :?](./images/smilies/icon_confused.gif)
Let me elaborate my sequence design.
I have 2 jobs to run simultaneously in the seq, each job updates the same table for different database instance ($ServId1 & $ServerId2).
Before running these jobs we have a nested condition stage to check whether server id exists or not (as mentioned in my post above).
Both Server ids have been set as an environment variable with $PROJDEF in job properties and has provided default value through administrator.
When I see the log for the previous run of the sequencer in production,I found it is showing one or the other Server Id doesn't exist. Means sometime its getting $ServId1 or $ServerId2 as empty ('').
![Confused :?](./images/smilies/icon_confused.gif)
hi sam here
Well... the fact that both environment variables have been setup in the Administrator for the project with "default values" should mean they are set to those values in every job's environment in that project unless overridden. Have you checked what's in the second log entry for the job, the one that lists all of the environment variables in effect at the time the job ran? Are they both listed there? Or do they match up with your Nested Condition check, truly not existing when the check fails? ![Confused :?](./images/smilies/icon_confused.gif)
Also, the "default values" in the Administrator for these variables, are they hard-coded values or something else?
![Confused :?](./images/smilies/icon_confused.gif)
Also, the "default values" in the Administrator for these variables, are they hard-coded values or something else?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers