Given that in Workflow Foundation, a "Workflow Instance" stores the information about how far through the workflow that instance is, how would people recommend reporting on that?
Contrived Example
Consider a workflow for repairing a PC. It has simple states: Investigating, Obtaining parts, Repairing, Returning.
In theory I might also have in my database a table called RepairJob, where each record relates to the job. There will be foreign keys to technicians, skus etc.
However, I might want to query RepairJobs by their current state:
select * from RepairJob where StatusId = @statusId
But effectively this means somehow duplicating the current "state" of a RepairJob both in the workflow instance and in the database. It means that my workflow actions need to do something when activated that fires off the database update.
Is this the accepted use for Workflow Foundation? How are other people using it?
Many thanks in advance.