web services - Entity fetched from a webservice: how to integrate in DDD model? -


i have "process" application complex model (simplified here). application has webservice such:

webservice             | application behind webservice ------------------------------------------------------ processdto             | process     .getlabel()        |     .getlabel()                        |     .getsubcomponents()                        |     .execute(input) // calls processcomponent.execute                        | processcomponent                        |     .execute(input) processservice         | processrepository     .findprocess(id)   |     .findprocess(id)     .executeprocess(..)| 

the problem is: how integrate process entities inside application using webservice?


i thinking of creating process entity instead of directly using dto entity.

for example, in application, have module has process.

i can hook in orm "association" part not problem. problem how module executes process?

  • by calling processservice: that's ugly because i'll end anemic process entity doesn't offer domain logic. furthermore, make module entity use service, not right?

  • by adding execute() method in process? entity method calls service not good

in ddd, external web services should encapsulated anti-corruption layer (acl). in acl, dto contracts of web service should mapped locally defined value objects.

as far calling external service, should done application service hosting corresponding use case, not entities observed.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -