| 1 |
# Task b(1) triggers: |
| 2 |
# - a(2), which succeeds after b(1) finishes (to avoid merge) |
| 3 |
# - c(2) --wait, which succeeds after merge with b(1) |
| 4 |
# Then b waits for c:x before succeeding. |
| 5 |
# When flow 2 reaches c, it should |
| 6 |
# - spawn onward to d(1,2) |
| 7 |
# - retroactively spawn on c:x => x(1,2) |
| 8 |
|
| 9 |
[scheduling] |
| 10 |
[[graph]] |
| 11 |
R1 = """ |
| 12 |
a => b => c => d |
| 13 |
c:x => x |
| 14 |
""" |
| 15 |
[runtime] |
| 16 |
[[a]] |
| 17 |
script = """ |
| 18 |
if ((CYLC_TASK_SUBMIT_NUMBER == 2)); then |
| 19 |
cylc__job__poll_grep_workflow_log "\[1/d/01(flows=1,2):submitted] (received)started" |
| 20 |
fi |
| 21 |
""" |
| 22 |
[[b]] |
| 23 |
script = """ |
| 24 |
if ((CYLC_TASK_SUBMIT_NUMBER == 1)); then |
| 25 |
cylc trigger --flow=new ${CYLC_WORKFLOW_ID}//1/a |
| 26 |
cylc trigger --flow=2 --wait ${CYLC_WORKFLOW_ID}//1/c |
| 27 |
cylc__job__poll_grep_workflow_log "\[1/c/01(flows=2):running] (received)x" |
| 28 |
fi |
| 29 |
""" |
| 30 |
[[c]] |
| 31 |
script = """ |
| 32 |
cylc__job__wait_cylc_message_started |
| 33 |
cylc message x |
| 34 |
if ((CYLC_TASK_SUBMIT_NUMBER == 1)); then |
| 35 |
cylc__job__poll_grep_workflow_log "merged" |
| 36 |
fi |
| 37 |
""" |
| 38 |
[[[outputs]]] |
| 39 |
x = x |
| 40 |
[[d, x]] |