In Windows Workflow (WF), how is the concept of a "work item" expressed?
===

Years ago (before WF existed) I worked on a custom workflow engine. It worked like this: Design a workflow (known as the definition), associate a specific type of work item with that definition (e.g.: Workflow Definition X processes Widgets), and process that work item through it's various states and transitions by creating one instance of that definition per work item.

The work item implemented an IWorkItem interface, which allowed it to be processed as a kind of state machine (for example, it had a current state and a set of methods such as Run, Stop, Pause, etc. to control it).

In Windows Workflow, how do you define a work item? Can it be a custom entity modeled in my SQL Server database? Do I have to give it any particular fields? Does the object that represents it in my code have to implement particular interfaces? How does it respond to persistance/de-persistance in terms of the underlying row data? How can I easily query the database to get my entity's state?