Search code examples
c#moryx

How to listen for final reports with MORYX


I am handling production orders with MORYX. When an order gets reported, I want to send related data to a 3rd party service.

For partial reports I use the OrderManagements OperationPartialReport event:

_orderManagement.OperationPartialReport += OnOperationPartialReport;

For final reports, though, I can't find an equivalent that seems appropriate.


Solution

  • In MORYX a final report completes the operation and therefor you receive the final report in the OperationCompleted event.

    You can use the same listener as your partial report, as they have the same signature.

    _orderManagement.OperationPartialReport += OnOperationReport;
    _orderManagement.OperationCompleted += OnOperationReport;