0

I'm exploring envers at the moment and working through the documentation. There is one of my requirement which envers doesn't fulfil (as I think right now). Maybe it does and someone can point me to something or has another solution for this.

The requirement is the need to review changed data by a second user. The second user can choose to approve or reject the change. On approve the change should be made on reject the change should be rolled back. Does envers support this or should I just insert my own "approved" flag in the original database table?

Kai
  • 38,985
  • 14
  • 88
  • 103

1 Answers1

0

No, Envers does not support that. You want to consider if you are not looking for a workflow-like solution (especially if this could evolve into a more complicated flow involving several users, and so on).

Envers is really only meant for auditing data. There's no built-in rollback either, for example.

adamw
  • 8,038
  • 4
  • 28
  • 32
  • Ok, thanks for this. Can you share a link to a "workflow-like solution" which could be interesting for me? – Kai Apr 25 '12 at 07:00
  • I would probably look at jBPM, for example? Generally as a model I would have another entity which would hold a relation to the entity in question plus the state of that entity in the "workflow". Putting it all in one table may cause problems. – adamw Apr 25 '12 at 16:32