# Check targetting a specific flow works, with trigger --wait.

# At start-up, trigger f with --wait for flow 2
# Then when flow 1 reaches d, trigger flow 2 at b.

# Flow 1 should overrun the manually triggered f.
# Flow 2 should skip over it to g.

[scheduling]
   [[graph]]
      R1 = """
         trigger-happy
         a => b => c => d => e => f => g
      """
[runtime]
   [[a, b, c, d, e, f,g]]
   [[trigger-happy]]
      script = """
         cylc trigger --flow=2 --wait ${CYLC_WORKFLOW_ID}//1/f
      """
   [[d]]
      script = """
         if [[ "$CYLC_TASK_SUBMIT_NUMBER" == "1" ]]; then
            cylc trigger --flow=2 ${CYLC_WORKFLOW_ID}//1/b
         fi
      """
