That work is done by the decorators! They wrap around your functions and store the execution state of your workflows in Postgres, specifically:
- Which workflows are executing
- What their inputs were
- Which steps have completed
- What their outputs were
Here's a reference for the Postgres tables DBOS uses to manage that state: https://docs.dbos.dev/explanations/system-tables