ericabouaf/aws-swf

Control Information for timer

sukrit007 opened this issue · 1 comments

Refer
https://github.com/neyric/aws-swf/blob/master/lib/decision-response.js#L262

The start_timer method uses the "name" parameter as control information. Instead, we should call it "control". Reason: We can add a JSON message to this parameter, which will enable us to implement different strategies like:
ExponentialBackoff
LinearBackoff
.....

In my current use case, I will be implementing my own exponential strategy for retries, however need to add the state for the same as control information.
http://docs.aws.amazon.com/amazonswf/latest/apireference/API_TimerStartedEventAttributes.html

So that decider can evaluate next delay and fire the timer again.

Do you have an example of using the timer? I added the code to my decider and I am not seeing the swfClientMock.respondDecisionTaskCompleted(p, cb) being called. Also, I am not clear on what to set defaultTaskList too.