Gener question: How do Shopify handle order workflow management internally?

Hi Shopify Dev,

I’m curious how Shopify handles all the different workflows internally ? Shopify also uses the Flow platform ?

More importantly how do you handle state transitions?