我正在尝试使用 AWS 的 java 流框架从亚马逊简单工作流服务中的工作流运行子工作流。下面是主要的工作流实现代码:
package SWF.ChildWorkFlow;
import org.springframework.core.annotation.Order;
import com.amazonaws.services.simpleworkflow.flow.core.Promise;
public class OrderWorkflowImpl implements OrderWorkflow {
private OrderActivitiesClient client = new OrderActivitiesClientImpl();
ProcessPaymentWorkflowClientFactory factory = new ProcessPaymentWorkflowClientFactoryImpl();
@Override
public void getCustomerOrder() {
Promise<String> a = client.getOrder();
ProcessPaymentWorkflowClient childWorkflowClient = factory.getClient("ChildWorkflow");
childWorkflowClient.paymentProcessor(a);
}
}
来自主工作流的活动正在运行,但来自 childorkflow(paymentProcessor) 的活动在引发一些错误后正在运行。
以下是错误消息-
Dec 08, 2014 3:11:21 PM com.amazonaws.services.simpleworkflow.flow.worker.AsyncDecisionTaskHandler createDecider
SEVERE: Received decision task for workflow type not configured with a worker: workflowType={Name: OrderWorkflow.getCustomerOrder,Version: 1.1}, taskToken=AAAAKgAAAAIAAAAAAAAAAjtd06ct8IXpzt5gbkfiKHXQbZci9kmJuSq1rKtpPVW+l+7hhLESuQDt5e3oVobCfbjEhfrRae26bnGLV3Kz2zsOUDBxpMGlFGReCBKeUc9BNGzKyOj4uiX5bPMdvez6zn8/Xfy69KTARDWvy15EsoP/4fp/9z3t4XJkzuk/Ks857gvtfNEZ1RfnlBqaqv2i9hpVBgHQXeoly0soewELhUxdOWHhYOxsGnGnM/MsEPFaXwKgzqwddXfuco7Pho0qle2xViYudOs7wcEECfi2Tgw=, workflowExecution={WorkflowId: workflow,RunId: 22fW/b5Qf+8M5AYj7S2PHY9N74LQGlouoWwszAFXH8VFI=}
Dec 08, 2014 3:11:21 PM com.amazonaws.services.simpleworkflow.flow.worker.DecisionTaskPoller pollAndProcessSingleTask
WARNING: DecisionTask failure: taskId= 9, workflowExecution={WorkflowId: workflow,RunId: 22fW/b5Qf+8M5AYj7S2PHY9N74LQGlouoWwszAFXH8VFI=}
java.lang.IllegalArgumentException: No implementation was found for {Name: OrderWorkflow.getCustomerOrder,Version: 1.1}
at com.amazonaws.services.simpleworkflow.flow.worker.AsyncDecisionTaskHandler.createDecider(AsyncDecisionTaskHandler.java:111)
at com.amazonaws.services.simpleworkflow.flow.worker.AsyncDecisionTaskHandler.handleDecisionTask(AsyncDecisionTaskHandler.java:49)
at com.amazonaws.services.simpleworkflow.flow.worker.DecisionTaskPoller.pollAndProcessSingleTask(DecisionTaskPoller.java:201)
at com.amazonaws.services.simpleworkflow.flow.worker.GenericWorker$PollServiceTask.run(GenericWorker.java:94)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Dec 08, 2014 3:11:21 PM com.amazonaws.services.simpleworkflow.flow.worker.GenericWorker uncaughtException
SEVERE: Failure in thread SWF Decider HelloWorldListParallel 1
java.lang.IllegalArgumentException: No implementation was found for {Name: OrderWorkflow.getCustomerOrder,Version: 1.1}
at com.amazonaws.services.simpleworkflow.flow.worker.AsyncDecisionTaskHandler.createDecider(AsyncDecisionTaskHandler.java:111)
at com.amazonaws.services.simpleworkflow.flow.worker.AsyncDecisionTaskHandler.handleDecisionTask(AsyncDecisionTaskHandler.java:49)
at com.amazonaws.services.simpleworkflow.flow.worker.DecisionTaskPoller.pollAndProcessSingleTask(DecisionTaskPoller.java:201)
at com.amazonaws.services.simpleworkflow.flow.worker.GenericWorker$PollServiceTask.run(GenericWorker.java:94)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
谁能帮我解决这个问题。而且我也无法在互联网上找到有关 AWS SWF 服务中子工作流的任何适当文档。提前致谢。