In the previous chapter, we saw how to define a variable
for a task
When all the tasks of the same family
share the same variable value,
the value could be defined at the family level.
In the examples below the variable
could have been defined at the
level of the suite
, achieving the same results.
Variables are inherited from the parent node.
If a variable is redefined lower in the tree, it is said to be overridden.
In this case the new definition is the one being used.
It is possible to override generated variables.
This is not recommended and you should understand all the consequences
if you decide to do so.
# Definition of the suite test.
edit ECF_INCLUDE "$HOME/course" # replace '$HOME' with the path to your home directory
edit ECF_HOME "$HOME/course"
edit SLEEP 20
from ecflow import Defs,Suite,Family,Task,Edit
print("Creating suite definition")
home = os.path.join(os.getenv("HOME"), "course")
defs = Defs(
print("Checking job creation: .ecf -> .job0")
print("Saving definition to file 'test.def'")
Let us have a quiz. Consider the following suite:
edit SLEEP 100
edit SLEEP 80
edit SLEEP 9
edit SLEEP 89
edit SLEEP 10
edit SLEEP 77
edit SLEEP 12
Here is the value for SLEEP for the above suite. Make sure you understand this.
What to do
- Do the modifications
- Replace the suite
python: python test.py
text: ecflow_client --suspend=/test; ecflow_client --replace=/test test.def
- Watch in ecflow_ui .