Search code examples
javac#domain-driven-designsoabpel

BPEL vs Domain Events for integrating several bounded contexts


Is there a place for BPEL when doing Domain Driven Design?

As far as I understand from Vaughn Vernon's Implementing Domain Driven Design we should use Domain Events to communicate between different bounded contexts.

Does that exclude the usage of BPEL? or do they solve different problems?

What I'm trying to achieve is to have each bounded context run as a service and use domain events to communicate between these services. Another team member (not familiar with DD) suggested using BPEL instead.


Solution

  • I'd say that if BPEL were to be used at all, you would use it in a specific bounded context. In any case, you'd want to use an event-based collaboration model between your bounded contexts (assuming that they are well aligned with your sub-domains), as well as UI composition as needed to decrease the amount of data that needs to be passed between them.

    The reason I'd say not to use BPEL to coordinate bounded contexts is that it will create an additional place where domain logic may be written. The whole idea of a bounded context is that everything that deals with the given ubiquitous language stays within the boundary.

    I'd say that the use of BPEL (and other integration) tools can be appropriate within a bounded context for the purpose of integrating multiple 3rd-party systems and other cases where we want to provide some kind of UI that a semi-technical domain expert could use to tweak the behavior of some aspects of that bounded context.