CWL Classic Dag is having issues when referencing a packed CWL File


Seeing the packed workflow diagram as follows:

The image should instead look like diagram in the link below (note there are way too many inputs for this diagram to look any good anyway)

The CWL Viewer option also breaks

The error being:

The Common Workflow Language Viewer was unable to process the CWL. It returned the following error:
Http failure response for 400 OK


Regarding the CWL Viewer issues, as you can probably tell by the error message, we’re calling out to an external service to generate the diagram. I skimmed their issues and found two that might be applicable, one regarding packed CWL, and one regarding .json file extensions:

You might want to vote or add comments to those issues. Be forewarned, they’ll probably ask you to contribute a PR to fix it :).

We’ll follow up separately on the classic DAG issue – that one is our code.

How did you generate your diagram? It looks neat, but yeah, that’s a lot of inputs!


Yes sorry, I also put in a comment here regarding the external viewer - support output from cwltool's `--pack` · Issue #103 · common-workflow-language/cwlviewer · GitHub

How did you generate your diagram? It looks neat, but yeah, that’s a lot of inputs!

From here - cwl-ica-cli/classes/ at 5d63863bd095079ce58c64cdcc3d6d0fbdb267e0 · umccr/cwl-ica-cli · GitHub

Essentially running

cwltool --debug --print-dot /path/to/packed-cwl | dot -Gratio {ratio_value} -Tsvg -oOutPut.svg /dev/stdin

where ratio_value is equal to round(min(1 / math.log(inputs_len), 1.0), 3) if inputs_len > 1 else 1 (no commentary on this, I did the maths on it a really long time ago).

Previously there was a lot of internal magic inside the svg where nodes would contain links to the relevant tool / subworkflow in the catalogue and the hover would trigger the documentation attribute to pop up. Doesn’t seem to be working at the moment. But the colouring of subworkflows in orange seems to still be working


Following up on the classic DAG issue, I have created a GitHub issue to improve our diagrams.

Thank you!