Author |
Topic: Why order states changes from one state to the same one? (5 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
CZendejas116 Posts: 51 Joined: Apr 13, 2011 |
Hi,
I see the following behaviour in OnOrderStateChanged event when I sent an order: *Order status changed: Order.ID=60749069 FROM Sent TO Sent *Order status changed: Order.ID=60749069 FROM Sent TO Completed *Order status changed: Order.ID=60749069 FROM Sent TO Completed Why occur the event if OldOrderState = Order.CurrentState ? also, why do I have twice OnOrderStateChanged events from Sent status to Completed status? Thanks in advance :) Claudia Zendejas |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Hello,
I don't see any signs that we sent two Completed states for this order. Victor Vins Software Developer |
||||
CZendejas116 Posts: 51 Joined: Apr 13, 2011 |
Hi,
I think I understand what's happening. I made several tests and I can see things in my log like this: State changed: Order.ID=-1 FROM Unknown TO Sent State changed: Order.ID=60800516 FROM Sent TO Sent State changed: Order.ID=60800516 FROM Sent TO Sent State changed: Order.ID=60800516 FROM Sent TO Completed After some tests I became to thing that Order object received in OnOrderStateChanged it's the same along all events of this type, and for some reason my log delays too much between each line printed, so, state in order change before I can print the order's current state. It's safe to assume all OnOrderStateChanged executions are because the state change and there is no way the Completed state gets duplicated? Thank you so much! Claudia Zendejas |
||||
CZendejas116 Posts: 51 Joined: Apr 13, 2011 |
Object Order is the same all the time? I have the theory that API OEC mantains same reference with updated information, is that right?
Claudia Zendejas |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Hello,
right - all references are the same during one session Victor Vins Software Developer |
||||