fixed missing exception handling
fixed workid recording
uniformized the new job state model