After I create 2 Composed Tasks named foo
and bar
, I want to create another Composed Task named baz
to run foo && bar
. However, I failed to do so because of this error:
dataflow:>task create baz --definition "foo && bar"
Command failed org.springframework.cloud.dataflow.rest.client.DataFlowClientException: The 'task:foo' application could not be found.
The 'task:foo' application could not be found.
org.springframework.cloud.dataflow.rest.client.DataFlowClientException: The 'task:foo' application could not be found.
at org.springframework.cloud.dataflow.rest.client.VndErrorResponseErrorHandler.handleError(VndErrorResponseErrorHandler.java:65)
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674)
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:418)
at org.springframework.cloud.dataflow.rest.client.TaskTemplate.create(TaskTemplate.java:156)
at org.springframework.cloud.dataflow.shell.command.TaskCommands.create(TaskCommands.java:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282)
at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:68)
at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:59)
at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:134)
at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533)
at org.springframework.shell.core.JLineShell.run(JLineShell.java:179)
at java.lang.Thread.run(Thread.java:748)
It seems that a Composed Task can only consist of basic Task Applications. Why can't I create a Composed Task that consists of other Composed Tasks? Thanks.
This is by design. SCDF doesn't have support for running Composed Tasks within another Composed Task. Please feel free to open an enhancement request here: https://github.com/spring-cloud/spring-cloud-dataflow/issues. Thanks!