MassTransit/Automatonymous — Issue #1: Add Request support
Author: enix
Created: 2012-02-21 18:40:02+00:00
State: open

Hi,

I opened this issue to discuss a notation for adding Request support to the lib. The basic stuff shouldn't be hard to do, it can probably follow the Publish annotation. What might be a bit interesting modeling the timeout.

It could be something like, following MT:

class StateMachine
{
ctor(){
During(Initial,
When(Initialized)
.Request(Running, c => {
c.HandleTimeout(() => ...);
}
));
}
}

or a bit more statemachine-ish approach and perhaps:

class StateMachine
{
enum Timeouts {
First,
Second
}

ctor(){
During(Initial,
When(Initialized)
.Request(Running, c => {
c.SetTimeoutTag( Timeouts.First );
}
)
When(Timeout, Timeouts.First)
.Then(...);
}
}

Any thoughts on this?

cheers,
Ernst