为什么组合任务无法执行Spring Cloud Data Flow中的其他组合任务?

问题描述

创建2个名为foobar的组合任务之后,我想创建另一个名为baz的组合任务来运行foo && bar。但是,由于此错误,我没有这样做:

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)

组合任务似乎只能由基本任务应用程序组成。为什么我不能创建由其他组合任务组成的组合任务?谢谢。

解决方法

这是设计使然。 SCDF不支持在另一个组合任务中运行组合任务。请随时在https://github.com/spring-cloud/spring-cloud-dataflow/issues上打开增强功能请求。谢谢!