I’m trying to do the following and it’s not quite working. I want to retrieve a value from a file and if it’s not there have the User enter the value to use in a Manual Step. I set it up like this but the entire script fails if the manual step runs.
Step 1) Try to retrieve the value from an XML file.
If that fails Exit 1 (This is so the manual step will run)
If it succeeds it sets an output variable with the value.
Step 2) I have a manual step setup to run on failure. This asked the user to enter the value in Notes.
Step 3) Depending on if the output variable is set in Step 1 or Step 2 set a Step 3 Output Variable that all other steps can rely on to have the Value.
As I said the problem I’m having is if Step 1 fails and Step 2 runs than the entire script exits out after Step 2. How can I resolve this or is there a better way to do what I’m trying to do.
We don’t currently support complex steps based on branched conditions. In your particular scenario here is one approach that we through of that might work.
- Configure your variable as a prompted variable.
- Step1 checks your XML file and if the value exists it sets the output variable as that. If not then it just sets the output variable to be the value from the prompted variable
- Subsequent steps are then still configured to run on success but they use the output variable.
What this means is that although the prompted variable will always show up, if the user knows that there will be a value in the file they can enter nothing/anything and it will just be populated from the XML. If they don’t know the correct value and the don’t know if it will be in the file. Then they would be in the same position as your previous set up and would be unable to continue the deployment.
While this set-up may not be ideal, it is the only way we can think that might suit your particular unique scenario.
Let me know what you think about this approach.
Unfortunately I don’t want to use a prompted variable. I only want to have user interaction when it’s a new install vs an upgrade install. A new install will happen very infrequently and is something we detect through our script. I’ll go back to the drawing board and see if I can figure out something else.