I recently faced a problem when I designed the microservices architecture of our new system. To give more context on that, let's suppose that we have two different services.
A service is responsible to make payments and the other one
B service is responsible to keep track of the orders.
We have a use case that we need to update an order state from the service A.
We have these states in an enumeration list inside the service B.
How can I avoid the sharing of this enumeration between two services? I need to have decoupled services.
Please feel free to ask for clarifications.