[meta]
    title = "Test workflow for task state change on poll result."
    description = """
        Task A fails silently - it will be stuck in 'running'
        unless polled. Task B then polls A to find it has failed, allowing A to
        suicide via a :fail trigger, and the workflow to shut down successfully.
    """

[scheduler]
   [[events]]
       expected task failures = 1/a

[scheduling]
    [[graph]]
        R1 = """
           a:start => b
           a:fail => handled
           """
[runtime]
    [[a]]
        init-script = cylc__job__disable_fail_signals ERR EXIT
        script = """
           cylc__job__wait_cylc_message_started
           exit 1
        """
    [[b]]
        script = cylc poll "$CYLC_WORKFLOW_ID//*/a"
    [[handled]]
        # (allows a:fail to be removed as handled)
        script = true
