Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Workflow Foundation with DDD

I'm curious if anyone has applied workflow foundation to a DDD project and if so 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?

like image 323
Sean Chambers Avatar asked Nov 16 '25 07:11

Sean Chambers


1 Answers

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.

like image 113
pmf Avatar answered Nov 18 '25 20:11

pmf