This document will not disclose the topic why you need fsm.
But if you implement fsm, then you need to do it as nearly as possible in the data.
This document will explain how you can implement it with PostgreSQL and gives developers maximum freedom.