Table of Contents |
---|
...
- Console https://console.aws.amazon.com/swf/home
- Documentation https://aws.amazon.com/documentation/swf/
- be sure to read the AWS Flow Framework Developer Guide
- User forum https://forums.aws.amazon.com/forum.jspa?forumID=133
- AWS Java SDK http://aws.amazon.com/sdkforjava/
- be sure to look at the sample code in
aws-java-sdk-x.y.z/samples/AwsFlowFramework/
- be sure to look at the sample code in
- Make sure you are able to build and run Synapse locally. See Workflow Developer Bootstrap or Developer Bootstrap for instructions.
...
(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/sanity check your new package, every SageBio workflow has the Hello World workflow embedded in it. Make sure you can run it from your new package:
~/platform/trunk/tools/MyNewWorkflow>java -javaagent:/Users/deflaux/Downloads/aws-java-sdk-1.3.3/third-party/aspectj-1.6/aspectjweaver.jar -cp target/MyNewWorkflow-0.11-SNAPSHOT.jar com.amazonaws.services.simpleworkflow.flow.examples.helloworld.ActivityHost
~/platform/trunk/tools/MyNewWorkflow>java -javaagent:/Users/deflaux/Downloads/aws-java-sdk-1.3.3/third-party/aspectj-1.6/aspectjweaver.jar -cp target/MyNewWorkflow-0.11-SNAPSHOT.jar com.amazonaws.services.simpleworkflow.flow.examples.helloworld.WorkflowHost
java -javaagent:/Users/deflaux/Downloads/aws-java-sdk-1.3.3/third-party/aspectj-1.6/aspectjweaver.jar -cp target/MyNewWorkflow-0.11-SNAPSHOT.jar com.amazonaws.services.simpleworkflow.flow.examples.helloworld.WorkflowExecutionStarter
(4) if the Java 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
(45) write your code, at a minimum you will likely want code similar to the following TODO ADD LINKS AFTER THE MERGE TO TRUNK
- workflow interface:
- activity interface:
- workflow implementation:
- activity implementation:
- workflow runner (runs the decider):
- activity runner (runs the activities):
- workflow initiator (kicks off workflows): note that this particular example is rather complicated, an initiator could just kick off a single workflow instance
- workflow configuration utility:
- workflow configuration properties:
- workflow configuration properties template:
- workflow test (important this will help you ensure that your Promise variables are configured correctly):
Include Page | ||||
---|---|---|---|---|
|
...
This can happen when the activity or workflow code throws a runtime exception such as a NullPointerException. Unfortunately the unit testing framework provided by SWF does not log them.
"java.lang.IllegalStateException",{"cause":null,"message":"not ready","localizedMessage":"not ready"
Promise Variables were used Incorrectly
...