cylc-flow icon indicating copy to clipboard operation
cylc-flow copied to clipboard

Workflow State Xtrigger Outputs

Open wxtim opened this issue 6 months ago • 0 comments

Description

According to the code the workflow_state xtrigger returns the following items as a dictionary:

  • workflow
  • task
  • point
  • offset
  • status
  • message
  • trigger
  • flow_num
  • run_dir

And according to description in Cylc Docs we would expect each of these items to be made available in downstream tasks in cylc__job__inst__user_env. A brief experiment has demonstrated, however, that only

  • status
  • point
  • task
  • status

Are available.

Reproducible Example

Include a workflow trigger from another workflow:

    [[xtriggers]]
        from_upstream = workflow_state('upstream//2000/foo')
    [[graph]]
        R1 = @from_upstream => foo

And examine log/job/<cycle>/foo/NN/job looking at cylc__job__inst__user_env.

Additionally ensure that the list of outputs in cylc doc is corrected, or possibly removed, since it duplicates the contents of the auto-documented docstring, and does so inaccurately.

wxtim avatar Jul 10 '25 13:07 wxtim