JC: Added wf_event to model and fixed bug for wf validation. Added spec when data error in wf. Added @erb_code to controller for failed action. spec passes.