...
Code Block |
---|
| from ecflow import *
defs = Defs() + Suite("s1")
defs.s1 += [ Task("t1"),Task("t2"),Task("t3"),Task("t4") ]
defs.s1.t2 += Trigger( "t1 == complete" )
defs.s1.t3 += Trigger( "t2 == complete" )
defs.s1.t4 += Trigger( "t3 == complete" ) |
|
Code Block |
---|
| from ecflow import *
defs = Defs() + Suite("s1")
defs.s1 += [ Task("t1"),Task("t2"),Task("t3"),Task("t4") ]
defs.s1.t2 += Trigger( ["t1"] )
defs.s1.t3 += Trigger( ["t2"] )
defs.s1.t4 += Trigger( ["t3"] ) |
|
Code Block |
---|
| from ecflow import *
defs = Defs() + Suite("s1")
defs.s1 >> Task("t1") >> Task("t2") >> Task("t3") >> Task("t4")
# >> relies on the leading node to be a Family or Suite |
|
Reverse Chaining
It is also possible to << to reverse chain task.
The following suites are identical:
Code Block |
---|
| defs = Defs() + Suite("s1")
defs.s1 += [ Task("t1"),Task("t2"),Task("t3"),Task("t4") ]
defs.s1.t1 += Trigger( "t2 == complete" )
defs.s1.t2 += Trigger( "t3 == complete" )
defs.s1.t3 += Trigger( "t4 == complete" ) |
|
Code Block |
---|
| defs = Defs() + Suite("s1")
defs.s1 << Task("t1") << Task("t2") << Task("t3") << Task("t4")
# << relies on the leading node to be a Suite or Family |
|