Hi all,
I need some advice on how to code an application that essentially moves monetary transactions from state to state when certain actions are carried out by users. The states could be NEW, VERIFY, READY, LIVE, SENT, PROCESSED, ERROR etc. Different deployments of the application will have a slightly different states e.g. one client may require that there be no verification process so the VERIFY state wouldn't exist and a NEW transaction would go straight to READY.
I need some advice on, firstly, how to configure the different states for different clients, secondly, on how to code the logic for moving transactions from one state to another.
So I'm asking what would be a good way to define/configure the states for a particular deployment and how they are linked i.e. from state X move to state Y when A happens. Also how/where to define the logic that makes the changes on the transactions.
I've been looking into design patterns but have not come across one that seems to handle this situation yet. If I've understood correctly, the state pattern is not suitable for this even tough the name might suggest so. Please correct me if I am wrong. I'm sure there must a pattern that takes care of this so your advice on this issue would be very appreciated.
Thanks.
Ziad