Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

(4) Each time you run the Initiator, you should see some "hello world!" messages in the Activity worker output.  If not, log into the AWS console and look at the SWF tab to see what's going on with your workflows.

How to make a new workflow

(1) under PLFM/trunk/tools mvn archetype:generate to make your new code module

(2) use PLFM/trunk/tools/tcgaWorkflow/pom.xml as the example for your pom.  You'll want to copy the <dependencies>, <properties>, and <build> sections.  There's a lot of java magic wrapped up in that pom.

(3) if package for the workflow code is not already listed in PLFM/trunk/lib/lib-workflow/src/main/resources/META-INF/aop.xml add it there

Common Errors

"java.lang.IllegalStateException",{"cause":null,"message":"not ready","localizedMessage":"not ready"

This can happen when you have @Asynchronous annotations but aspectj weaving is not correctly configured and enabled.  Make sure:

(1) load-time weaving is enabled by passing JVM argument -javaagent:/Path/To/aspectj-1.6/aspectjweaver.jar

    1. for mvn exec:java you do this via setting the environment variable 

      Code Block
      export MAVEN_OPTS=-javaagent:/Path/To/aspectj-1.6/aspectjweaver.jar
    2. for the surefire plugin, this is configured via 

      Code Block
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <forkMode>pertest</forkMode>
                <argLine>-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${org.aspectj.version}/aspectjweaver-${org.aspectj.version}.jar</argLine>
              </configuration>
            </plugin>

...

    1. for Java it might look something like this 

      Code Block
      java -javaagent:/Users/deflaux/Downloads/a-java-sdk-1.3.3/third-party/aspectj-1.6/aspectjweaver.jar -cp target/tcgaWorkflow-0.11-SNAPSHOT.jar org.sagebionetworks.workflow.curation.TcgaWorkflowInitiator

(2) load-time weaving is configured correctly in PLFM/trunk/lib/lib-workflow/src/main/resources/META-INF/aop.xml You should see some log output like the following:

Code Block
[AppClassLoader@1ef6a746] info AspectJ Weaver Version 1.6.10 built on Friday Oct 22, 2010 at 03:50:26 GMT
[AppClassLoader@1ef6a746] info register classloader sun.misc.Launcher$AppClassLoader@1ef6a746
[AppClassLoader@1ef6a746] info using configuration file:/Users/deflaux/platform/trunk/tools/tcgaWorkflow/target/tcgaWorkflow-0.11-SNAPSHOT.jar!/META-INF/aop.xml
[AppClassLoader@1ef6a746] info register aspect com.amazonaws.services.simpleworkflow.flow.aspectj.AsynchronousAspect
[AppClassLoader@1ef6a746] info register aspect com.amazonaws.services.simpleworkflow.flow.aspectj.ExponentialRetryAspect