-
-
Notifications
You must be signed in to change notification settings - Fork 162
Global Variables
Akram El Assas edited this page Nov 1, 2022
·
1 revision
Global variables are declared by default in the file C:\Wexflow\GlobalVariables.xml
The path of this file can be edited from the configuration file C:\Wexflow\Wexflow.xml
Here is an example of GlobalVariables.xml:
<?xml version="1.0" encoding="utf-8" ?>
<GlobalVariables>
<Variable name="file1" value="C:\WexflowTesting\file1.txt" />
<Variable name="file2" value="C:\WexflowTesting\file2.txt" />
<Variable name="file3" value="C:\WexflowTesting\file3.txt" />
</GlobalVariables>
The variables can then be used in workflow files as follow:
<Workflow xmlns="urn:wexflow-schema" id="114" name="Workflow_FilesLoaderGlobalVariables" description="Workflow_FilesLoaderGlobalVariables">
<Settings>
<Setting name="launchType" value="trigger" />
<Setting name="enabled" value="true" />
</Settings>
<Tasks>
<Task id="1" name="FilesLoader" description="Loading files" enabled="true">
<Setting name="file" value="$file1" />
<Setting name="file" value="$file2" />
<Setting name="file" value="$file3" />
</Task>
<Task id="2" name="ListFiles" description="Listing files" enabled="true">
</Task>
</Tasks>
</Workflow>
When Wexflow server loads the workflow file, the workflow file is parsed so that the global variables are replaced by their values.
Copyright © Akram El Assas. All rights reserved.