Each instantiated class exists for the life of the orchestration. It is serialized into the MessageBoxDb at certain persistence points. All the messages, variables and the processing state are saved. If your Biztalk server is switched off, the orchestration will restart from the last persistence point. If your orchestration has a long wait then it is persisted and removed from memory (dehydrated) and can be rehydrated when the event it was waiting for occurs.
Orchestrations are
defined in a BizTalk Visual Studio project, and are compiled into .NET
classes that implement the BTXService interface.At run time, the XLANG/s sub-service creates instances of these classes.Each instance is an in-memory state machine that receives, processes and returns messages to and from the MessageBox.
This is taken from Charles Young blog titled “How Subscription works“