Workflow

Now the workflow is saved in the database. Every state defines whether a new version will be creates automaticly or not. Some bugs in the version system are still there (but it is not only a thing of the workflow).