Closed rantonmattei closed 10 years ago
It looks like you logged this against the wrong repo. You are probably looking for https://github.com/aws/aws-flow-ruby.
I doubt it is a Flow issue. Flow eventually calls the API with [ClassName].[MethodName] as name param (SimpleWorkflow service with RegisterWorkflowType action).
It is inherent to the SWF service, I guess. The main issue is that we cannot register WorkflowType with a colon in it (like "MyWorkflow::HelloWorld.sayHello"). Therefore, using Ruby namespaces is excluded.
However, I was able to register a Workflow using backslashes in the name from the console. So that means you can register workflow classes within namespaces using Php. Unfortunately, there is no Php implementation of Flow...
I guess a workaround could be implemented at the SDK level and replace those colons with another separator before registration. And then replace them back when retrieving the WorkflowTypes after polling for tasks.
BTW, the same thing is happening when registering Activities.
The Ruby SDK specifically chooses to not modify user supplied input before sending values to the remote service. This can cause lots of downstream issues where values are not formatted as expected.
I suggest opening this as an issue with the flow framework project. They should be providing SWF friendly values.
Closing this issue for now as there is no SDK changes required.
If my workflow class is part of a namespace like shown below, I get the following error: ruby-2.1.2/gems/aws-sdk-1.42.0/lib/aws/core/client.rb:375:in `return_or_raise': Invalid name: MyWorkflows::HelloWorldWorkflow.hello (AWS::SimpleWorkflow::Errors::ValidationException)
A quick look to the doc @ http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RegisterWorkflowType.html confirms that the RegisterWorkflowType API action cannot take a name with a colon.
So that raises at least 2 main concerns: