1

I'm working through the SWF tutorial right now and trying to get GreeterActivitiesClient in GreeterWorkFlowImpl. I'm getting "Cannot resolve symbol" error for the Client and the ClientImpl. Per the AWS materials, I thought these would be generated from the annotations in the Activities class, which I have. Any ideas?

Dependencies in my pom.xml, (taken from the materials):

<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>

The SWF guide I'm using: https://docs.aws.amazon.com/amazonswf/latest/awsflowguide/setup.html#installing-maven

ajjabajja
  • 19
  • 2

2 Answers2

0

That is old content. If you want to work with SWF and Java - look at V2 content here - including the POM dependencies.

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

Better yet, if you want to build workflows on the AWS Cloud, consider using AWS Step Functions.

There is a Java V2 AWS Step Functions tutorial here that walks you through how to create a workflow that interacts with other AWS Services.

Create AWS serverless workflows by using the AWS SDK for Java

smac2020
  • 9,637
  • 4
  • 24
  • 38
  • Thanks for the reply! I took the bom from the pom.xml to see if that was what I was missing but it didn't resolve my client error. Do you have any inkling as to why the ActivitiesClient can't be resolved when I have the @Activities annotation in my activities class? – ajjabajja Mar 29 '21 at 22:02
0

I ran into the same issues running this tutorial with Maven. My pom.xml looked exactly the same.

I did two things to fix this issue:

  1. Go to settings > Build, Execution, Deployment > Compiler > Annotation Processors. Check Enable annotation processing

  2. Add maven-compiler-plugin to your pom.xml (latest at the time of writing). Such as:

    `

        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    

    `

Go ahead and run a build, the client classes should appear. I hope this helps.

wals
  • 1
  • 1