Krace, you need to use workflow actions. The workflow object can automatically generate a list of available actions for the current state. See Kharcha for an example of how to do this.