aws-swf icon indicating copy to clipboard operation
aws-swf copied to clipboard

Control Information for timer

Open sukrit007 opened this issue 11 years ago • 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.

sukrit007 avatar Feb 24 '14 11:02 sukrit007

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.

toaster33 avatar Mar 17 '15 17:03 toaster33