# How to handle workflow stalling

**URL:** <https://cylc.discourse.group/t/how-to-handle-workflow-stalling/700>\
**Category:** Cylc Support\
**Created:** [July 19, 2023, 2:03pm UTC](https://cylc.discourse.group/t/how-to-handle-workflow-stalling/700 "2023-07-19T14:03:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clement](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@clement](https://cylc.discourse.group/u/clement)\
**Post date:** [July 19, 2023, 2:03pm UTC](https://cylc.discourse.group/t/how-to-handle-workflow-stalling/700/1 "2023-07-19T14:03:33Z")

</div>

Hello everrbody,

I am using the cylc’s version `8.0.1`, I get some issue with one of my workflow that is permanently stalling. Here is what my workflow should look like if it is successfull

[![](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/547d26937c105b299f2cca6bc28b190e399dd655.jpeg)](https://mermaid-js.github.io/docs/mermaid-live-editor-beta/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbkFbQV0gJiBCW0JdIC0tPiBDW0NdIC0tPiBEW0RdIC0tPiBFW0VdXG4iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ)

```plaintext
[scheduling]
    initial cycle point = now
    #max active cycle points = 1
    runahead limit = P1
    [[special tasks]]
        clock-trigger = A
    [[dependencies]]
    
        T-00 = """
                  A? & B? => C? => D? => E?
                 (A:fail? & B?) | (A:submit-fail? & B?) => A_error 
                 (A? & B:fail?) | (A? & B:submit-fail?) => B_error
                 (A:fail? & B:fail? ) | (A:sumbmit-fail? & B:submit-fail?) => AB_error 
                 C:fail? | C:submit-fail? => C_error 
                 D:fail? | D:submit-fail? => D_error
                 E:fail? | E:submit-fail? => E_error
             """

```

```plaintext
*_error represents dummy task that will print message in case of failure of the tasks

```

So this i what my workflow should look like if it is successfull  
[![](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/ef2c5db5bf68b17349294e7eb24d24be95fd8e0f.jpeg)](https://mermaid-js.github.io/docs/mermaid-live-editor-beta/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbkFbQV0gJiBCW0JdIC0tPiBDW0NdIC0tPiBEW0RdIC0tPiBFW0VdXG5BICYgQi0tPiBBMVtBX2Vycm9yXSAgXG5BICYgQiAtLT4gQTJbQl9lcnJvcl1cbkEgJiBCIC0tPiBBM1tBQl9lcnJvcl1cbkMgLS0-IEMxW0NfZXJyb3JdXG5EIC0tPiBEMVtEX2Vycm9yXVxuRSAtLT4gRTFbRV9lcnJvcl0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ)

I have some issue concerning the _A & B_ task if one of these taks failed i get some workflow stalled. So i wanted to know if there is some tools except the graph that can help me to overcome this issue ? Also i wanted to know if the way i do to redirect failed task to the dummy task is good or if there is more efficient way to do it ?

---

<div class="post-metadata">

**Author:** ![oliver.sanders](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/oliver.sanders/32/110_2.png) [@oliver.sanders](https://cylc.discourse.group/u/oliver.sanders)\
**Post date:** [July 19, 2023, 2:35pm UTC](https://cylc.discourse.group/t/how-to-handle-workflow-stalling/700/2 "2023-07-19T14:35:54Z")

</div>

Hello there,

> I am using the cylc’s version `8.0.1`

Cylc 8.0.1 is almost one year old now, we would strongly recommend upgrading to 8.1.4 which has many improvements, including a new graph view:

[https://cylc.github.io/cylc-doc/stable/html/reference/changes.html#graph-view](https://cylc.github.io/cylc-doc/stable/html/reference/changes.html#graph-view)

> I have some issue concerning the _A & B_ task if one of these taks failed i get some workflow stalled

A “stall” means that the path through the graph is blocked because one or more tasks have dependencies which cannot be satisfied.

The easiest way to find out which task(s) have caused the stall is to look at the graph view in the GUI which was added in Cylc 8.1.0.

Here’s an example of the Cylc 8 graph view, in this case the tasks bar, bool and pub will not run because fool failed:

![Screenshot from 2023-07-19 15-31-54](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/945ff96b94579034490ec8c8cf32df2c9dc38463.png)

> So i wanted to know if there is some tools except the graph

If you don’t want to use the graph view, then you can use the `cylc show` command. This command will tell you which prerequisites and outputs are completed.

Here’s an example of `cylc show`, in this case the task `bar` will not run because the task `fool` did not succeed:

![Screenshot from 2023-07-19 15-31-43](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/cc36ded3253c6581d3f820637018e1b24429113e.png)

The `cylc show` functionality will be added to `cylc gui` in a future release.

---

<div class="post-metadata">

**Author:** ![MetRonnie](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/metronnie/32/125_2.png) [@MetRonnie](https://cylc.discourse.group/u/MetRonnie)\
**Post date:** [July 20, 2023, 9:35am UTC](https://cylc.discourse.group/t/how-to-handle-workflow-stalling/700/3 "2023-07-20T09:35:43Z")

</div>

> [@clement](#):
>
> `*_error represents dummy task that will print message in case of failure of the tasks`

You may be able to use event handlers for this purpose - you can read about them in the docs here: [Task Configuration — Cylc 8.2.2 documentation](https://cylc.github.io/cylc-doc/stable/html/user-guide/writing-workflows/runtime.html#eventhandling)

> [@clement](#):
>
> I have some issue concerning the _A & B_ task if one of these taks failed i get some workflow stalled.

The reason this workflow stalls if A or B fails is because C can only run after both A & B succeed. If this does not need to be the case you could do something like

```auto
(A:finish & B:finish) => C

```

Otherwise a stall allows you intervene e.g. manually triggering whichever of A or B that failed.
