Open xnickmx opened 10 years ago
Thanks for your feedback. I could add such an integration test. It is a little tricky getting it the credentials that it needs. Maybe not if I don't run it in the public build. We always point people to Asgard as the "integration test". :) So you started your workflow, and all of that looks great. I can tell that you have done some research. It is going to time out because there is no decider to figure out what to do next. If there was then it would decide to schedule an activity. It would then timeout because nothing is polling for activity tasks. So you need to poll of decision tasks and activity tasks, and you can do this with the SWF WorkflowWorker and ActivityWorker respectively. Check out how we bootstrap all of this in Asgard FlowService.afterPropertiesSet(). https://github.com/Netflix/asgard/blob/master/grails-app/services/com/netflix/asgard/FlowService.groovy#L65
BTW, the task pollers don't have to even be in the same application, but that is just how we do it in Asgard at the moment.
Hi Clay, thanks for the pointers on WorkflowWorker and ActivityWorker. That with the Asgard code was enough for me to figure it out. I created an integration test that works and sent it to you as a Pull Request. It looks like I sent it way prematurely though: it breaks the build. It was already automatically rejected by your CI server. As I mentioned earlier, I am not a Gradle expert. Hopefully the fix is straightforward.
A few more thoughts -- (note these are numbered 1, 2, 3 in the editor, but GitHub is unhelpfully displaying them as 1, 1 and 1 again)
com.amazonaws.services.simpleworkflow.model.TypeAlreadyExistsException: Status Code: 400, AWS Service: AmazonSimpleWorkflow, AWS Request ID: 83b49589-afdd-11e3-bb7a-1f04d5203743, AWS Error Code: TypeAlreadyExistsFault, AWS Error Message: WorkflowType=[name=BayAreaTripWorkflow.start, version=1.0]
I'm not really sure what I can do, other than change the version number of the workflow, which doesn't seem like something I should have to do. Any ideas?
Anyway, I still feel like there is quite a bit I don't understand. I would love to learn more.
I created a little example program that runs the BayAreaWorkflow example: https://github.com/xnickmx/GlistenRunnableExample
I am planning on improving it in the future. I could use your help to figure out how to:
Thanks!
Would it be possible to do a simple Grails project that does the "Hello World" example or the bay area example? I'm struggling with getting this running.
@dashfwd was this message for me?
I could do a Grails project, but I thought that a one-class console app would be simpler.
BTW, I added the improvements mentioned in my comment from a couple of days ago.
I could make a small example Grails project rather than always pointing to Asgard's use of SWF and Glisten.
That would be immensely helpful, thanks!
I would like to actually run the example workflow (not just the unit tests), but I haven't been able to get it to work. While I use several other AWS products I have never run any SWF workflow successfully before, so I am guessing there is some basic setup I haven't completed. Can you help me bridge the gap?
Here's what I tried:
Added an integration test that is based on the "Executing a workflow (in your own code)" section of your wiki (https://github.com/Netflix/glisten/wiki/Basics#executing-a-workflow-in-your-code). Here's my code:
At first it fails because the domain and workflow type aren't in SWF. So, I manually added them using the AWS console. After that, the code runs, but it doesn't seem to do anything. Looking in the AWS console, it seems that the workflow has timed out. In addition, it seems like the local Java code, BayAreaTripWorkflowImpl and BayAreaTripActivitiesImpl, is never called.
Any ideas?
Any chance you could add a simple integration test to the existing code base that would allow for running the workflow for real, instead of just in a unit test?