Hello IIkka. First of all, you're wellcome, you don't have to say thank you to me :) I don't deserve it, I'm nobody, just someone who lately read a lot about ports&adapters architecture and trying to implement it in a new project. I think new picture you added is ok and clear. About the primary ports and interfaces... I honestly should add interfaces. Primary ports are the API of the app core, the use case boundary, and they would be described by operation contracts (method's signatures), doesn't matter if you just have one implementation for them. If tomorrow you decide to change the implementation, it would afect to the caller primary adapter. With interfaces, the adapter gets the service interface by injection, and the implementation is apart. It's a best practice in ge neral to write interfaces and implementation apart when you write a service (being this service a primary port or not). In my project primary ports are interfaces of services (the application services, the use cases of the app), and the implementation of them call (orchestrate) the domain services to achieve the goals of the use case. In such app services is where you put transactional and security concerns, they are the gate to the application.
In this task the following modifications are made:
Extract from the comments of http://java-design-patterns.com/blog/build-maintainable-systems-with-hexagonal-architecture/:
In this task the following modifications are made: