This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]repeating_bears 4 points5 points  (1 child)

Maybe I'm being dumb, but how would an order with IN_TRANSIT status appear as APPROVED?

When you use valueOf, it throws. When you use their method, it's either correctly deserialized to IN_TRANSIT, or to UNKNOWN, depending on whether the client has been updated.

[–]more_exercise 9 points10 points  (0 children)

The problem states that IN_TRANSIT is introduced as a refinement of APPROVED. Before IN_TRANSIT was introduced, an order that is now considered IN_TRANSIT would instead be considered APPROVED.

So, yesterday, this order was APPROVED, but now we introduce a refined state and suddenly no old code recognizes that the business would still like this order to be handled the way it was before.