yesworkflow-org / yw-prototypes

Research prototype with tutorial. Start here to learn about and try YesWorkflow.
http://yesworkflow.org/wiki
Other
33 stars 13 forks source link

How to render sub-workflows? #36

Open olyerickson opened 8 years ago

olyerickson commented 8 years ago

The graphviz visualization is accurately showing that I have sub-workflows (ie the heavier border), but I can't figure out how to have it expand the rendering to show the entire workflow with all levels included.

I know there is a graph.subworkflow directive in the yw.properties file, but putting the name of the subworkflow in there only causes the parsing to barf...

ludaesch commented 8 years ago

If I understand correctly, we can currently show one nesting level at a time, so that if you have a 3-level workflow graph, you would end up with three graphs - one for each level. This might be a graphviz issue (or we need to figure out how to make graphviz do what we want). Tim will be able to say more..

tmcphillips commented 8 years ago

The value given to the graph.subworkflow property needs to be qualified with the names of its containing workflows separated by dots, e.g. if you have this description of a script...

@begin A
@begin B
@begin C
@end C
@end B
@end A

...you would draw sub-workflow B by assigning the value A.B to graph.subworkflow, and to draw sub-sub-workflow C, you'd assign the value A.B.C.

Thanks for pointing out that this is undocumented! I'll work on a documentation page describing how to use the various configuration properties for YW. I'll also try to improve the error message displayed when the named subworkflow cannot be found.

olyerickson commented 8 years ago

So I'm still not sure if I understand what graph.subworkflow achieves.

Imagine I have the following in yw.properties:

:
# model configuration
model.workflow      = A
:
# graph configuration
graph.subworkflow = A.B
:

Does that result in the subworkflow A.B being rendered within the A graph? Or only the A.B graph being rendered?

Thanks!

tmcphillips commented 8 years ago

Each invocation of yw graph renders just one workflow or subworkflow at a time. So for your example only the A.B subworkflow will be rendered, and no indication will be made of the structure of A (other than implying that it provides the inputs and consumes the outputs of B).

We have talked about adding support for rendering integrated views of multiple levels of subworkflows either in some kind of flattened view (nesting removed) or as nested graphs (with borders drawn around subworkflows). Would either of these be useful to you? Some other view?

olyerickson commented 8 years ago

I think what we have been expecting is the nested graph --- it would be very helpful to draw a boundary around a chunk of code and say "this does this" or "this does that." The "flattened view" would be helpful but not as useful, because we would immediate try to draw boundaries around the bits...

ludaesch commented 8 years ago

I can see the utility of both: the flattened, one at a time and the nested. One question would be how easy it is to teach graphviz nested dataflows. Might be not that difficult. If I remember correctly, Taverna has nested workflows that appear to be drawn with Graphviz -- haven't looked in a while though, but we might be able to use the same graphviz structures (if indeed they use that..)

On Thu, Dec 17, 2015 at 2:12 PM, John S. Erickson, Ph.D. < notifications@github.com> wrote:

I think what we have been expecting is the nested graph --- it would be very helpful to draw a boundary around a chunk of code and say "this does this" or "this does that." The "flattened view" would be helpful but not as useful, because we would immediate try to draw boundaries around the bits...

— Reply to this email directly or view it on GitHub https://github.com/yesworkflow-org/yw-prototypes/issues/36#issuecomment-165569638 .