Help a CRUD programmer think about an "approval workflow"

Posted by gerdemb on Stack Overflow See other posts from Stack Overflow or by gerdemb
Published on 2010-03-11T19:04:28Z Indexed on 2010/03/11 19:09 UTC
Read the original article Hit count: 239

I've been working on a web application that is basically a CRUD application (Create, Read, Update, Delete). Recently, I've started working on what I'm calling an "approval workflow". Basically, a request is generated for a material and then sent for approval to a manager. Depending on what is requested, different people need to approve the request or perhaps send it back to the requester for modification. The approvers need to keep track of what to approve what has been approved and the requesters need to see the status of their requests.

As a "CRUD" developer, I'm having a hard-time wrapping my head around how to design this. What database tables should I have? How do I keep track of the state of the request? How should I notify users of actions that have happened to their requests?

Is their a design pattern that could help me with this? Should I be drawing state-machines in my code?

I think this is a generic programing question, but if it makes any difference I'm using Django with MySQL.

© Stack Overflow or respective owner

Related posts about database-design

Related posts about database-schema