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

Can I embed a function inside another? And if so, how? #44

Open jldl1n17 opened 6 years ago

tmcphillips commented 6 years ago

You can nest code blocks delimited by @begin and @end tags. For example:

@begin outer_block
    @begin intermediate_block
      @begin inner_block
      @end inner_block
    @end intermediate_block
@end outer_block

However, yw graph only renders one code block, and its immediate child blocks, at one time. By default it renders the outermost code block (the overall 'workflow'), and the blocks in that outermost block (the steps in the overall workflow). But you can use the graph.subworkflow configuration property to request that a different, nested block be considered the workflow, and so render that block and its child blocks instead.

Does that help?

jldl1n17 commented 6 years ago

Yes, thank you very much