AWS SWF - 活动客户端生成不起作用Maven、IntelliJ

问题描述

我现在正在学习 SWF 教程,并尝试在 GreeterWorkFlowImpl 中获取 GreeteractivitiesClient。我收到客户端和 ClientImpl 的“无法解析符号”错误。根据 AWS 材料,我认为这些将根据我拥有的活动类中的注释生成。有什么想法吗?

我的 pom.xml 中的依赖项,(取自材料):

<dependency>
  <groupId>log4j</groupId>
  <artifactId>log4j</artifactId>
  <version>1.2.17</version>
</dependency>
<dependency>
  <groupId>com.amazonaws</groupId>
  <artifactId>aws-swf-build-tools</artifactId>
  <version>1.0</version>
</dependency>

我正在使用的 SWF 指南: https://docs.aws.amazon.com/amazonswf/latest/awsflowguide/setup.html#installing-maven

解决方法

那是旧内容。如果您想使用 SWF 和 Java - 请在此处查看 V2 内容 - 包括 POM 依赖项。

https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2/example_code/swf

更好的是,如果您想在 AWS 云上构建工作流,请考虑使用 AWS Step Functions

此处有一个 Java V2 AWS Step Functions 教程,可指导您了解如何创建与其他 AWS 服务交互的工作流。

Create AWS serverless workflows by using the AWS SDK for Java