开发者

Workflow Foundation with DDD

I'm curious if anyone has applied workflow foundation to a DDD project and if s开发者_C百科o what the pitfalls/gotchas were.

I'm looking at a extremely complex state processes that looks like WF would be a good fit for, but am trying to determine how to isolate the workflows from manipulating the state of my domain model. It was suggested to me to make a decent anti-corruption layer and go from there.

Anyone else had experiences with this?


A really great solution are domain events, as described by Udi Dahan here (this is part three; you should probably also read his two previous parts). Basically, instead of injecting domain objects into you workflow infrastructure, you raise events that get routed to the appropriate aggregate roots.


"I'm looking at a extremely complex state processes that looks like WF would be a good fit for"

That's actually not something that activity-based workflows are good at doing. Unfortunately, that is the architectural model of WF. In WF 4.0 they've gone so far as removing the state machine workflow from the toolbox.

You may be better off with something in the form of ILog. Here's a nice blog post comparing it to BizTalk, which arguably has a more powerful workflow/orchestration capability than WF:

http://geekswithblogs.net/AndrewSiemer/archive/2009/03/30/ilog-rules-for-.net-3.0-ndash-quick-overview.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜