Replies: 2 comments 2 replies
-
@rupello I tried the following and it works fine but I am confused about why it needs an input parameter. I think Argo might try to resolve the inner workflow with Workflow(
generate_name="inner-workflow-",
entrypoint="diamond",
) as w_inner:
echo = Container(
name="echo",
image="alpine:3.7",
command=["echo", "{{inputs.parameters.message}}"],
inputs=[Parameter(name="message")],
)
with DAG(name="diamond"):
A = echo(name="A", arguments={"message": "A"})
B = echo(name="B", arguments={"message": "B"})
C = echo(name="C", arguments={"message": "C"})
D = echo(name="D", arguments={"message": "D"})
A >> [B, C] >> D
with Workflow(generate_name="outer-workflow-", entrypoint="main") as w_outer:
w1_resource = Resource(
name="w1-resource",
action="create",
manifest=w_inner,
inputs=[Parameter(name="message", value="A")], # <<<<<<<<<<<<< placeholder with default param value
success_condition="status.phase == Succeeded",
failure_condition="status.phase in (Failed, Error)",
)
with Steps(name="main"):
w1_resource(name=f"sub-workflow-1-0")
w1_resource(name=f"sub-workflow-1-1")
w_outer.create() |
Beta Was this translation helpful? Give feedback.
2 replies
-
Apologies for the delayed reply, it turns out this is an Argo Workflows feature that's missing :( See discussion in the AW repo + suggestion of workaround: argoproj/argo-workflows#12634 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to understand the workflow-of-workflows example to see if I can solve a problem I have with my workflow getting too large.
I modified the example by using the diamond-DAG as the inner workflow, but get an error on submitting this
I noticed that the generated file is missing single quotes in the embedded workflow resource:
- {{inputs.parameters.message}}
instead of- '{{inputs.parameters.message}}'
not sure if this is a bug or something I am doing the wrong way?
Beta Was this translation helpful? Give feedback.
All reactions