On Mon, Mar 15, 2010 at 11:33 PM, Jan Limpens <[email protected]> wrote:
>> 1/ bus.DelaySend > > how could I cancel this, in case the payment arrives? I could of course, upon state change delaysend a CheckIfIsStillInStateMessage, that would either be answered with a AbendondedWarningMessage or nothing. Would this be the way to go? (A bit non-obvious in my eyes) >> 3/ A saga is just a way to encapsulate a state machine, it is pretty >> common to have the current state flag in the saga state. Ah, I see so the saga would actually be _the_ place where the state is saved. But this would somewhat transgress the borders between domain and services, wouldn't it? If my order object is an entity (persited via nhib), the saga would have to become its component and subsequently have to move into the domain (not doing domain like things, being persistence conscious). I had imagined that the Order exposes a state setter, that the service would be able to change from the outside. On impl level I have no idea how this could work. A message becoming part of the entity? After all, I have to query for that state quite often... >> On Tue, Mar 16, 2010 at 1:17 AM, Jan Limpens <[email protected]> >> wrote: >>> >>> hello, >>> >>> a few more question on how to implement things in a nice way :) >>> >>> I have an OrderSaga and I want it to send a message if n days went by and >>> the customer has not yet paid for the order. I suppose it is no good idea to >>> Thread.Sleep for n days :) >>> How does one implement such a thing? >>> Is the saga kept alive for the whole period of its non-conclusion or is >>> it brought to live every now and then and checked, if there is something >>> that needs to be done? >>> >>> Should I reference the persisted Order in the Saga (via it's id)? >>> >>> If the Order has an enum State of possible states, should my OrderStates >>> class (the one I pass to the Saga via ISaga<OrderState>) wrap the enum and >>> the order to conclude which the current state is? Or should I better keep >>> this decoupled (and duplicated) >>> >>> Sorry for spamming the list & thanks!! >>> >>> -- >>> Jan >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Rhino Tools Dev" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/rhino-tools-dev?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Rhino Tools Dev" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/rhino-tools-dev?hl=en. > > > > -- > Jan > -- Jan -- You received this message because you are subscribed to the Google Groups "Rhino Tools Dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rhino-tools-dev?hl=en.
