Workflows dehydrate and re-hydrate.
The concept of “hydration” is the moving of the workflow code back and forth from memory and the database. In other words, the workflow is dehydrated when moving from in memory to the database and then is subsequently re-hydrated when moved from the database back to in memory.
Practical Implementation with example pls visit the below link
Thanks to : lelandholmquest