inline

On Fri, May 21, 2010 at 5:45 AM, Jan Limpens <[email protected]> wrote:

> Hello,
>
> I am writing a largish OrderShipment saga and have a few questions:
>
> 1) Currently my saga only manipulates the order entity directly, but
> changes to the order state trigger a dozen of things (emails,
> reports,..). As a rule of thumb - should these actions be performed
> from within the saga, or should I create small services for each of
> those?
>
>
Yes, the saga just needs to trigger those things, not to actually execute
them.
It may send messages such as:
NotifyUserAboutSuccessfulOrder, NotifyUserAboutDeclinedCreditCard
RefreshLostSalesReport, RefreshTotalMoneyMadeRport



> 2) If so, should these services listen to the same ISagaMessages or
> should the consumers of the ISagaMessages send a different message
> (and the services wait for those, then)?
>
>
No, see above.


> 3) The saga State could be my order entity or I could wrap my order
> entity with it. Good practice? Or better have something lightweight
> there and update the entity when the need arises from the state?
>
>
That really depends on you. It is pretty easy to make the saga state the
entity, so you might want to go with that.
If you need to track additional stuff that aren't in the order entity, you
might want to have a separate state.


> --
> 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]<rhino-tools-dev%[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.

Reply via email to