I have a task that i’m pausing until a file gets crated. I’m asking for the file name and the appending the .xml extension for the check. The task is failing with an exception.
Fri, 02 Nov 2018 13:56:46 -0400 DebugMessage bumping active action line
Fri, 02 Nov 2018 13:56:46 -0400 DebugMessage Command succeeded action parameter query “_file_name” with description “Please enter the File number for this check:” (action:7580)
Fri, 02 Nov 2018 13:56:46 -0400 DebugMessage bumping active action line
Fri, 02 Nov 2018 13:56:46 -0400 VerboseMessage RelevanceSubstitution::SubstituteStrings() entering, input = {not exists false whose (exists file “C:\temp” & {parameter “_file_name”} &".xml" ) }
Fri, 02 Nov 2018 13:56:46 -0400 VerboseMessage RelevanceSubstitution::EvaluateRelevanceAsString() entering, input = not exists false whose (exists file “C:\temp” & {parameter “_file_name"
Fri, 02 Nov 2018 13:56:46 -0400 DebugMessage RelevanceSubstitution::EvaluateRelevanceAsString() exception. Exiting
Fri, 02 Nov 2018 13:56:46 -0400 DebugMessage RelevanceSubstitution::SubstituteStrings() error, returning false
Fri, 02 Nov 2018 13:56:46 -0400 DebugMessage Command failed (Relevance substitution failed) pause while {not exists false whose (exists file “C:\temp” & {parameter “_file_name”} &”.xml" ) } (action:7580)
The Task Action is:
action parameter query “_file_name” with description “Please enter the File number for this check:”
So I ran a slightly modified version through the fixlet debugger and got a better error message:
q: not exists false whose (exists file "C:\temp" & ("test") & ".xml" )
E: The operator "concatenate" is not defined.
This is an “order of operations” issue. The statement exists file "C:\temp" & ("test") & ".xml" is attempting to create a file object “c:\temp”, and then concatenating the “test” and “.xml” strings to the file. You actually need to wrap the filename in parentheses so that the filename string is built first, and then the result is instantiated as file object.
Try
pause while {not exists false whose (exists file ("C:\temp\" & (parameter "_file_name" of action) & ".xml") )}