The basic idea when you are using wf persistence is as follows:
- get the workflow identity of a runnable workflow (using the workflow instance guid)
- get the definition for that identity
- load the workflow state
- run.
This is mostly covered by wf persistence except for step 2: getting the definition from the identity, this you have to implement yourself. How you do that is fully up to you, the only requirement is given an identity you must be able to provide
a System.Activities.Activity instance that is the root of your workflow definition. You can do that pretty much any way you want e.g. hardwiring predefined workflows, parsing a file by XamlReader, parsing a string value from database by the
same XamlReader, etc. Since you're taking the database path the simplest way would be to store the definitions in a table keyed by the identity fields (name, package, version), and the xaml file content as a basic varbinary field. Then you can use
bare ado.net/your favorite ORM/whatever to manage it.