During the execution of a workflow, an execution context is generated, which usually contains information such as built-in variables and built-in functions.
In the conditions statement field, you can call built-in variables by their names, for example:
In regular string fields (fields outside of conditions statements are usually string fields), you can use ${}
statements to call built-in variables. This syntax is similar to template literals in JS. For example, ${ProgramFiles_X64}
represents the path of the Program Files
directory, so you can write it like this:
When executing this step, assuming the system drive letter is C:
, lib.dll
will be moved to C:/Program Files/Microsoft/VSCode/lib.dll
.
If you want to use template string syntax in a conditional statement, make sure the expression is within a string (""
):
You can find the complete definition of built-in variables in Definitions and APIs.
Built-in functions are usually used in conjunction with conditions, for example:
This means if the code.exe
process is still running, kill that process.
Note that built-in functions are typically simple functions with a single string input and a boolean output; if you need to use complex functions, consider executing a script with step Execute
.
You can find the complete definition of built-in functions in Definitions and APIs.