Copy and paste the following into a new Powershell ISE script and hit F5:
workflow workflow1{
"in workflow1"
func1
}
function func1 {
"in func1"
func2
}
function func2 {
"in func2"
}
workflow1
the error I get is:
The term 'func2' is not recognized as the name of a cmdlet, function, script file, or operable program
I don't understand this. Why would func1 be in scope but not func2? Any help much appreciated. TIA.
Func1is invoked from within the workflow definition directly butfunc2is not. From reading about workflow processing there do seem to be a number of restrictions about working between scopes.