Suicide Triggers

Warning

Suicided triggers were needed in Cylc 7 and earlier to remove pre-spawned waiting tasks from graph branches not taken at runtime, which would stall the workflow.

However, Cylc 8 does not need suicide triggers for graph branching.

They remain supported, and documented, for backward compatibility and for a rare edge case.

Suicide triggers remove waiting tasks from the scheduler’s active active window at runtime.

They are activated just like normal task triggers but they remove the downstream task (prefixed with !) instead of triggering it to run.

Here, the task bar will be removed if foo succeeds:

foo => !bar

Suicide triggers combine in the same way as normal triggers, so this graph:

foo => !baz
bar => !baz

is equivalent to this:

foo & bar => !baz

i.e. both foo and bar must succeed for baz to be removed.

To remove a task after any one of several events, use an OR operator:

foo | bar => !baz

Note

  • There’s no point removing tasks that are not in the waiting state

  • In Cylc 8 all waiting tasks in front of the active window are virtual and don’t need to be “removed”

  • The only non-virtual waiting tasks in Cylc 8 are those actively waiting on an external trigger; these might need to be removed if they will never run

Remaining Use Case

Suicide triggers may be needed to remove an active-waiting task when it can be inferred from the status of another task that the external trigger will never be satisfied.

In the following example imagine that the two xtriggers watch two locations for the same file to appear. The file will be delivered to one location or the other but not to both, so if one xtrigger is satisfied the other will never be. The stuck waiting task can be removed with a suicide trigger, so that it doesn’t stall the workflow:

@xtrigger1 => A
@xtrigger2 => B

A => !B  # If A succeeds, remove B
B => !A  # If B succeeds, remove A