Hello,
We currently have a process that allows an employee in customer service to allow an order to be changed via a backend UI. When the change is completed an nservicebus event is fired ( OrderChangeCompleted Event ).
We have a new requirement in which another system is feeding in data that we would like to automatically perform the same change automatically using a saga without the involvement of a customer service user.
My First Idea, was to reuse the existing application layer service/use-case ( since it’s the same use-case, just automated ). This would allow me to reuse the same logic without duplicating code. My Saga could Send a command to the same nservicebus handler to make the change on the order and subscribe to the same event ( OrderChangeCompleted Event ).
Now comes the problem. If the customer service user is allowed to edit an order any time via the backend UI, how can i differentiate between when the OrderChangeCompleted event occured from the automated process (the saga starting and completing the change ) VS the manual process? For Example, I do not want my saga to execute logic when the manual flow occurs.
Hope this makes sense. Thanks