...
The next screen-shot shows the job chain node parameter form for the example (the Details for JobChain form). This form is opened with the Parameter button shown in the previous screenshot (top right):
...
When using hot folders, the configuration monitor looks for the job chain parameter file in the current hot folder and expects the name job_chain_name.config.xml. So in this case, the name of the job chain parameter file is chain_a.config.xml
.
The full chain_a.config.xml
has three <params>
elements:
- The first one is a child of the
<order>
element. It configures parameters for all steps of the job chain. That's why the log showsparam1
as10
in both steps. - The second
<params>
element is a child of<process state="first">
. It configures parameters for the first node (called "first") of the job chain. It sets two additional parametersparam3
andparam4
.param4
uses a special${paramname}
-syntax to reference other parameters. It referencesparam2
which was set in the first params element. As you see in the log, this part is later resolved toabc
. - The third is the
global_test_var
parameter that is a variable defined inconfig/scheduler_global_vars.xml
.
By configuring the global scheduler variableglobal_configuration_params
inscheduler.xml
to point to that file (scheduler_global_vars.xml
), we tell the configuration monitor to always read that file and process it's parameters. Inconfig/scheduler_global_vars.xml
the value forglobal_test_var
is set todef
, so the reference inparam4
is resolved to that value.
The full chain_a.config.xml
file is listed in the following block: file is listed in the next block. This file is opened and edited by clicking on the Open XML button in the job chain node parameter form (the Details for JobChain form) shown in the screenshot above.
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="scheduler_configuration_documentation.xsl"?> <settings> <job_chain name="chain_a"> <order> <params> <param name="param1" value="10"/> <param name="param2" value="abc"/> </params> <process state="first"> <params> <!-- create parameter only for this state --> <param name="param3" value="foo"/> <!-- use global and chain parameter in value of new parameter --> <param name="param4" value="${param2}---${global_test_var}"/> </params> </process> <process state="second"> <params> <!-- overwrite param2 parameter --> <param name="param2" value="xyz"/> <!-- use global and chain parameter in value of new parameter --> <param name="param4" value="${param2}---${global_test_var}"/> </params> </process> </order> </job_chain> </settings> |
The chain_a.config.xml
file has three <params>
elements:
- The first one is a child of the
<order>
element. It configures parameters for all steps of the job chain. That's why the log showsparam1
as10
in both steps.
Parameters here were set in the job chain node parameter form (the Details for JobChain form) shown in the screenshot above. - The second
<params>
element is a child of<process state="first">
. It configures parameters for the first node (called "first") of the job chain. It sets two additional parametersparam3
andparam4
.param4
uses a special${paramname}
-syntax to reference other parameters. It referencesparam2
which was set in the first params element. As you see in the log, this part is later resolved toabc
. - The third is the
global_test_var
parameter that is a variable defined inconfig/scheduler_global_vars.xml
.
By configuring the global scheduler variableglobal_configuration_params
inscheduler.xml
to point to that file (scheduler_global_vars.xml
), we tell the configuration monitor to always read that file and process it's parameters. Inconfig/scheduler_global_vars.xml
the value forglobal_test_var
is set todef
, so the reference inparam4
is resolved to that value.
Note that:
- The second
<params>
element is a child of<process state="second">
. It configures parameters for the second node (called "second") of the job chain. It overwrites theparam2
parameter and sets it toxyz
.param3
is not set at all, thus it doesn't appear in the log for statesecond
. param4
is defined in the same way as in statefirst
, but this time the resulting value is different becauseparam2
has been overwritten for this state.
Scope / Application
In job chain parameter files the ${paramname}
-syntax can be used to reference:
...