Information about the terminal that saved the latest changes has been added to orders and reserves
New property LastChangedTerminalId
added to order (IOrder
. LastChangedTerminalId
) and to reserve (IReserve
.LastChangedTerminalId
), it allows you to determine on which terminal the current state of these objects was saved.
In some scenarios, such as event processing OrderChanged
, DeliveryOrderChanged
or ReserveChanged
, there may be a need to separate changes stored on the local terminal from changes received over the network from neighboring terminals. Now, to do this, just compare LastChangedTerminalId
and PluginContext.Operations.GetHostTerminal().Id
.
Previously for these purposes was added method GetLastChangedOrderTerminal
, returning the terminal where the last changes to the specified object were saved. However, between the plugin receiving a certain IOrder
state and calling GetLastChangedOrderTerminal
, new changes could have been made on a different terminal, and then the GetLastChangedOrderTerminal
method would return this different terminal, focusing on a newer IOrder
state than the plugin has. Now there is no such problem, since the plugin receives the LastChangedTerminalId
property directly in the IOrder
object. The GetLastChangedOrderTerminal
method has been removed.